The underlying language model for your conversational AI solution will remove special characters such as hyphens within any entity definitions that are supplied.
For example, defining an entity to extract a structured number that includes hyphens, such as 050-134-123
would be converted to 050134123
.
When training your language model you may want to preserve special characters such as hyphens to improve its accuracy and ensure pattern matching is applied against the correct data/entity within the utterance.
In this guide, we show you how to use the < >
delimiters in UI Builder to preserve the entity definitions that use special characters.
Before working through this guide, you should be proficient with UI Builder, creating activities and setting properties. Experience in creating boolean logic and condition will also be helpful.
This guide uses the example of booking verification. A booking reference is a 9-digit number separated by hyphens. For example, 123-456-789
.
The language model could be trained with an intent intentBookTravel
several utterances :
# intentBookTravel
- the ticket is 123-456-789
- check on ticket 123-456-789
- check status of 999-123-111
- ticket 123-456-789
- check status please
After training however, the language model would strip each hyphen and only be able to identify 9 consecutive numbers for a ticket, e.g. 1234567689