The tutorial for today is about system entities in Dialogflow.
Each intent parameter has a type, called the entity type.
Because are many entities then you need a system entity.
The system entities allow agents to extract information like address, emails, currency, and phone numbers, favorite options like colors, foods, or any piece of information for your assistant.
The assistant uses entities in the system entity to guide the user and get information for the developer.
The system entity has two types of entities: custom and system.
Entities of the system type are already defined because they are elementary for any person.
Custom entities are specific to the assistant.
Thus, if we want a food assistant, we will implement customized entities as follows: cold food, fast food, hot food, packaged food …
An entity has options for any existing entities:
- Define synonyms
- Regexp entity (custom entity only)
- Allow automated expansion (custom entity only)
- Fuzzy matching (custom entity only)
With this information, the developer solves two essential issues: he knows what the user wants and does not invest in a real person.
To use this entity system, I will use the old project and add these entities.
Select the Entities from the menu.
Type food name for the new custom entity, select Define synonyms and press the SAVE button.
Add values for this entity like hot food or fast food.
Because the assistant use in the last tutorial indents … now the assistant can use entity created by us and named food for each entity: hot food or fast food.
Now the virtual assistant will know other synonyms related to the same coverage area called by us in the entity: food.
I add these Training phrases for my indent Space:
- Do you like food?
- Do you have food?
- I want food.
In the Action and parameters add these:
What food do you want?
In the Responses section I add this:
$food is ready in 5 minutes.
We have $food.
Do you like $food?
Yes. I like $food.
This is all. My assistant knows about the term food as an entity.
This is a limited basic example that can be tested on my account.