- Using Virtual Assistant
- Create an Entity
Create an Entity
An entity consists of an entity name, entity items, and item synonyms. Follow these steps to create an entity.
- Navigate to the Entities page by selecting the Entities tab on the navigation menu.
- Click Add Entity. A new entity tab is opened.
- In the Entity Name field, enter
a name that describes the new entity.
For example, you might want to create an entity to represent currencies (CURRENCY), languages (LANGUAGE), cities (LOCATION), or other categories of data important to your customers. If there are no existing entities with the same name, the entity is automatically saved.
Entity names can contain only numbers, letters and underscores; they can’t contain spaces, and they’re always uppercase. If you enter an entity name in lowercase text, it’s converted.
Entity names must be unique but you can create entities with the same or similar meanings, for example, LOCATION and PLACE. So before creating a new entity, scroll through the Entities page to see if an existing entity meets your requirements.
- In the Entity Items field, enter
an item name.
An item is one possible value for the entity. For example, if you create an entity, CURRENCY, then a possible value for the entity might be British Pound. You can add the same item to more than one entity, but an item must be unique within the entity.
- Click Add Item.
The new item is displayed in the first row of the item list.
Note: If you don’t define at least one item for an entity, the entity can’t be used in matching user expressions to intents. - For each item, you can optionally specify synonyms in the Synonyms field to ensure that the item represents all
ways that users might refer to the item.
For example, if you create an item value of British Pound for the CURRENCY entity, then you might want to add GBP, pound sterling, or quid, as synonyms for the item.
Listing multiple ways that users might refer to the same value helps improve the virtual assistant’s accuracy. If you want to enter a number of synonyms for an item, enter each word followed by a comma.
Like item names, synonyms must be unique within the entity.
- In the Reference Value field, you can optionally enter a reference value. If you don’t assign a value, the item name is automatically assigned.
- Add additional items to the entity as required by specifying
the item name in the Entity Items field.
For example, for the CURRENCY entity you might want to add items for euro, US dollar, Qatari riyal, and so on.
You can define as many entity items as you want. The total number of items created for the entity is listed at the top of the item list.
The entity is available for you to use in intents in the production environment within minutes. For information on using entities in intents, see Reference an Entity in an Intent.