Entities & Variables
The term Entity refers to a piece of organized data that must be extracted from a user's input. It is a parameter that guides the conversation. Entities are often nouns, such as a product or service, a named object or the time and date, etc.
Entities offer context to an intent itself. They allow your bot to fulfill a user's request by describing the intent in more detail.
Take the taxi booking service as an example:
“I’d like to book a taxi for tomorrow”
“Cancel my reservation for 5 p.m.”
“My booking number is 5GB0586”
“I need to get to London quickly”
“How to use a business voucher”
All the data in bold can be treated as entities as long as they are valuable and important to the dialogue's direction.
Extracting entity values
Automate will automatically extract entities from a phrase, once trained.
Above, we see that "taxi_type" is understood, being trained on a variety of vehicle types.
The numeral "7" is also extracted to understand the number of passengers.
The time of "today" is also understood by Automate as a system time entity, a in-built entity of Automate.
Variables
Variables are created automatically from entities that have been used in the training data.
The names of the variables correspond 1:1 to entities. Variables serve to retain important data across the dialogue.
In the flow, you can indicate what variable you’re expecting to get at a specific moment of the conversation:
And condition the following steps upon different values of your variable:
For safety reasons, you cannot delete an entity that has a corresponding variable; you can do it once the variable is deleted too.
Automate does not allow:
- Adding two of the same synonyms inside one entity
- Adding the same entity name for both the same entity type and different types
Automate allows, so we need to pay attention to:
- The same synonyms within different entity types (only the entity that is the highest in the hierarchy is detected; in the case of two entities from one category, only one is detected)
Entity hierarchy:
- Keyword (top)
- MTT
- Regex
Updated 6 months ago