Entities
Entities are terms or objects that provide context for an intent (question category). An entity is the tool that lets you drill down to the options (values) you want your end user to choose from.
Values
The values are the options that derive from an entity. Different choices you have decided upon, that dig further into specific information your virtual assistant needs, in order to resolve any issue. Values can also in turn provide more context, so that you can dig even further into specific information.
Synonyms and patterns
In the Entity | Value | Synonym/Pattern triad, synonyms and patterns represent the last layer.
Synonyms
You can use synonyms to declare different ways the user can refer to each value. The following table shows a possible implementation of an entity that uses synonyms.
Entity @payment_methods
Values | Type | Synonyms/Patterns |
---|---|---|
card | Synonym | visa mastercard credit debit |
bank | Synonym | bank transfer |
web | Synonym | PayPal |
Patterns
You can use patterns to control the way you ask for information. You can write patterns in the form of regular expressions. Patterns have very specific structure like dates, telephone numbers, email addresses, credit card numbers, ZIP codes and more.
The following table shows a possible implementation of an entity that uses patterns:
Entity @contact_info
Values | Type | Synonyms/Patterns |
---|---|---|
Pattern | \S+@\S+ | |
phone | Pattern | \d{10} |
Add a new entity
- While in your brain, click on the
Entities
tab. - Click on the
+
icon and change the name and description of your entity. - Add the entity values along with their synonyms or patterns.
Each value can contain either synonyms or patterns, not both.
Import an entity
To import an entity, click on the import icon on the top right in order to select a local CSV file. The CSV file must have the following format:
- Four columns with headers
Entity
,Type
,Value
,Synonyms/Patterns
. - Optional: Under
Entity
, include the name of your imported entity. - Under
Type
, write eithersynonym
orpattern
. - Under
Value
, include the value of the entity. - Under
Synonyms/Patterns
, include the comma separated synonyms or patterns.
Once you upload the file, the values with their synonyms and/or patterns are visible. Save to add the entity to your brain.
You can also download an example CSV file, containing an entity.