An entity is a possible piece of information that can be used in an utterance.
What are Entities?
Entities are the objects or concepts in the specific bot that you’re building. These entities allow the bot to extract the meaning behind a specific word in the user’s query. You can also define synonyms for a specific entity so that when your user uses that instead of the name of the entity, the bot knows that it’s basically the same thing.
Intents allow your bot to understand what the user wants to do and entities represent the information that is relevant to the user’s intent. Entities allow the bot to extract useful information from an utterance that is relevant to the user’s intent.
For example, from the utterance, Book me a suite for three nights starting tomorrow, the bot might parse it as:
- suite - a room type entity
- tomorrow - a date type entity
- 3 nights - a number type entity
Dialog Engine supports creating entities in two ways:
- an entity can use any of the predefined entity types
- an entity can be a custom type entity that you can define in the Custom Entity Type screen.
Predefined Entity Types
The four built-in entity types are currently available by default in Dialog Engine:
- de:datetime : maps any date and time values.
- de:amountOfMoney : maps any amount values.
- de:duration : maps any duration type values.
- de:number : maps any numeric values.
Add a custom entity
- Click Add Custom Entity Type from the Entities page.
- Enter a name for the custom entity and click Save.
- Type a value for the custom entity and press Enter.
- Add more entity values as needed.
Use synonyms for custom entities
You can also add synonyms for an entity so that Dialog Engine can recognise the value when identifying the slots. For example, an entity value of New York can have the synonyms: Big Apple or NYC. This allows the bot to understand that when the user says NYC, it is mapped to New York.
- Select the Allow Synonyms checkbox to enable adding synonyms.
- Click the Enter synonym field next to the entity value and type an alternate name or value this entity value can have and press Enter.
- Add more synonyms, if needed.
To delete any synonyms, hover over the synonym and click the X that appears.
Delete custom entities
- Click the Delete button next to the entity value.
- Click Delete in the confirmation dialog.