Entity types are used to control how data from  the end-user input is extracted.

Entity types.

Entity type defines the type of information you want to extract from the user’s input. For example, vegetable could be the display name of an entity type.

System entities.

Customer Care provides pre-defined system entities that can match many common types of data. For example, there are system entities for matching dates, email addresses, true/false and text.

Custom entities.

You can also create your own custom entities for matching custom data. For example, you could define a furniture entity that can match the types of furniture available for purchase at an online interior design store..

Methods (Type kryssar man för när man lägger till en entity)

There are 2 types of methods to 

1. Key. (Vi säger Keywords)(Entity entry)

For each entity type, there could be many Keywords (entity entries). Each entity Key (entry) provides a set of words or phrases that are considered equivalent. For example, if vegetable is an entity type, you could define these three Keys (entity entries):

  • carrot
  • scallion, green onion
  • bell pepper, sweet pepper
Keywords. (Entity reference value and synonyms)

Some Keys have multiple words or phrases that are considered equivalent, like the scallion example above. For these Keys, you provide one reference value and one or more synonyms.

Fuzzy matching

By default, entity matching requires an exact match for one of the Keys (entity entries). This works well for single-word Key (entity entry) values and Keywords (synonyms) but may present a problem for multi-word values and synonyms. For example, consider a ball entity that should be matched for the following end-user expression parts:

”red ball”
”ball red”
”small ball”
”ball small”
”small red ball”
”small ball red”
”red small ball”
”red ball small”
”ball small red”
”ball red small”

For a match to occur, you normally need to define a Key (entity entry )value and Keywords (synonyms) for each of these permutations. However, with fuzzy matching enabled, the ordering of the words in a value or synonym does not matter. The following will trigger a match for all of the examples above:

”red ball”
”small ball”
”small red ball”

2. Regular expression.

Some entities need to match patterns rather than specific terms. For example, national identification numbers, IDs, license plates, and so on. With regular expression entities, you can provide regular expressions for matching.

Each Regular expression entity corresponds to a single pattern, but you can provide multiple Regular expressions if they all represent variations of a single pattern. During bot AI training, all Regular expressions of a single entity are combined with the alternation operator ( | ) to form one compound regular expression.

For example, if you provide the following regular expressions for a phone number:

  • ^[2-9]\d{2}-\d{3}-\d{4}$
  • ^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$

The compound regular expression becomes:

  • ^[2-9]\d{2}-\d{3}-\d{4}$|^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})
Limitations of Regular expression

The following limitations apply

Fuzzy matching cannot be enabled These features are mutually exclusive.

Maximum number of 50 regular expression entities.

The maximum length of compound regular expression for an entity is 1024 characters.

This website uses cookies to ensure you get the best experience on our website.

How to get started

we'd love to have your feedback on your experience so far