Engati - User Guide
Harnessing Conversational Inte...

Entities

14min

Entities are data points or values that you can extract from a conversation/user query. This allows you to customize what kind of information you are collecting, how you want to associate it and even add your own custom set of values if needed. Also when a group of values leads to the same answer you can use entities rather than creating FAQs for all the variables. 

For Instance, the enrolment procedure for all the courses in an institute is the same. A common user query may be “How can I enrol for the Artificial Intelligence course?” Similarly, there can be a number of queries in the same context for different courses. Here rather than creating different FAQs for each subject you can create an entity set with custom values and add all the course names to it and it will give relevant answers each time the query is triggered. 

Availability

This functionality is provided to all our customers. It  can be accessed by clicking on the Train tab in the left panel and selecting Entities

Terms and Definitions 

Terms 

Definitions 

Entity

It is a data point or value which you can extract from a conversation/user query. This helps you to customize what kind of information you are collecting or how you want to associate it or want to add some custom value to it. For more information on entities and intents.

FAQ

Frequently Asked Questions (FAQs) are the standard queries relevant to a product or a service. For more information on FAQs .

Intent 

Intention/Purpose of the user in the conversational flow. 

Context 

Based on the previous conversation of the user on the bot it maintains the relevance of the communication.

System Defined Entities 

These are commonly used entities that are pre-defined in the system 

Custom Entities 

These are the entities that can be defined by the user as per their use case. 

Entity Management

Creating an entity

Step 1: Navigate to Train > Entities > +Add Entity and create an Entity.

Step 2: Fill in the fields available. For your convenience, we have provided descriptions for each field, indicating the values to enter in each.

Document image

  • Entity Name : This field allows you to give a name to your entity.
  • Entity Type : Based on your use case you can select the type of your entity.

Step 3: Your entity is created and is now ready for use in the conversations.

Naming your Entities

You can give any name to your entity related to the information you are collecting, for e.g – booking_date, courses, products, etc. The only restriction being you cannot add a space or a slash character in the name. Also, it cannot be the same as a built-in entity type like – number, date, time, etc. The name is important because this will be used extensively for using the extracted values in the conversation.

You can define multiple entities of the same type in cases where the usage is different or we want different values to be associated there. For example – For a travel bot, I can have booking_date and travel_date as separate entities although both are of Date and Time types.

Types of Entities

IF you look at the drop-down for entity types, you would see a lot of options to select from. They can be categorized as built-in or system-defined entity types or custom-defined entity types [Custom Values option].

Built-in or System entities

These are the common entity types we have seen being used and handled as a separate types so that it is convenient for the bot admins to start using these right away for the standard use-cases. All options other than the Custom Values would fall into the Built-in or system entity types. Some of the notable ones are – Number, email address, phone numbers, date and time and its different variants including duration and ranges, amount, quantity, URLs and others.

Document image


Custom Entities

This is a special type of entity where you can define a type and then define values that are custom to your bot, organization or domain.

You can add the various values of a particular type in different rows, in case there are variations of a particular value, those can also be added by a comma separating those options.

In the example below, if you are building a bot for an online course site, courses will be a data type commonly used in various conversations. So, you can define the various courses listed out and then intents can be a linked-to request for a course also in which case the user input will be matched to the defined type and persisted.

Document image


Entities usage

Entities can be associated with FAQs primarily to look for specific pieces of data/information from the user intent. You can define which entities to look for in the particular intent. You can also define which of the entities are mandatory for the intent to qualify. If those values are not retrieved, the bot will prompt the user to enter these and only then continue to the response resolution.

Entities can also be used specifically in the Request User data section to extract the values. You can also now request for multiple entities in a single query and then the bot will intelligently associate the values appropriately as per the defined types. In case the values are missed, they can be prompted again.

Once defined, these entities can be used to associate with an intent where the information will automatically be collected as per the entity definition and be tagged to that entity. To refer to the extracted values associated with an entity anywhere in a flow, you can just do that via {{context.booking_date}}.

As we mentioned earlier, entity values can be referred to by using double braces notation {{context.booking_date}}. Some of the entity types here are complex entities and have parts to the values they contain. You can refer to them by qualifying the entity name along with the specific part. Just to highlight this aspect, let’s say we were just interested to know or use the month value of booking_date above. We can do that by using {{context.booking_date.month}}. 

These options would automatically come up in the auto-complete. Here are some of the other options for a date –

Document image


Scenario

Lets Consider a Scenario for a better understanding. Query: How can I enrol in the IoT Course?

Now there may be the same procedure for enrolling in a set of subjects. Let’s say Database Management, Artificial Intelligence, Machine learning, Data Mining, and IoT.

The procedure to enrol for each of them is the same. Instead of creating 5 FAQs, you can create an Entity of type Course with the name of all the courses in it. 

Step 1: Navigate to Train > Entities > +Add Entity and create an Entity

Document image


Step 2: Return to the FAQ page and incorporate the created entity into the entity section.

To employ this entity, select the word that will be substituted by one of the entities based on the end user's query. Initially, include the entity created in the entity section, then double-click on the custom value provided in the question section. A dropdown menu will appear, allowing you to select your entity.

Document image


Deletion of entities

One should be very careful while deleting entities if they are being used in intent or in the paths. If these are deleted, it could lead to unstable flow behaviour or inconsistent values. Ensure that the entity to be deleted is not used anywhere in the flows or intents and then proceed for deletion.

Renaming of entities

Renaming of entities is allowed but there is a restriction that the entity must not be in use in intent or flow before, else again as is the case with delete, it might lead to inconsistent behaviour.

That covers everything about Entities. I trust that reading this documentation has provided a clearer understanding of how to make the most of the Entities section on our platform.

If you face any issues or queries please reach out to us at [email protected].

Updated 03 Apr 2024
Doc contributor
Doc contributor
Did this page help you?