Entity is a part of user's input that could be extracted by Aimylogic to the named variable. It is a way to fetch some useful data from the user's query (text or speech).

For example, if user says something like "Please book the room number 5 at 5 pm tomorrow", Aimylogic can extract number 5 and date-time formatted to "09/20/2018 17:00". Thus your bot logic has a deal with language-independent variables.

Supported entities

Aimylogic contains a set of System entities and enables you to create your own ones, named Custom entities.

How to use entities

You have to define entities in training phrases in Intents block. Thus bot can understand what exactly it has to extract from the user's input.

In the example above we have to define a phrase like "book room $NUMBER at $DATETIME". Here we've referenced to two system entities - NUMBER and DATETIME (all system entities are upper-cased). If the user says something close to such a phrase, Aimylogic extracts two variables ($NUMBER and $DATETIME) with a language-independent values (2 and date-time structure accordingly). Then your bot can use these variables in it's logic the same way as any other variables.

For example your bot can extract some entities during the conversation with the user and then post these data to the external database. Or perform some action depending on the particular values of these entities.

Entity alias

By default Aimylogic creates a variable with entity's name once it was extracted from the user's query. You can define your own variable name using double colon. For example

book the room $NUMBER::room

Aimylogic will create a variable named room instead of NUMBER in this case.
Was this article helpful?
Thank you!