Custom Entities

You can create custom entities to extract information from user input that is specific to the use cases of your skills.

Because the built-in entities extract generic information, they can be used in a wide variety of bots. Custom entities, on the other hand, have a narrower application. Like the FinancialBot’s AccountType entity that enables various banking transactions by checking the user input for keywords like checking, savings, and credit cards, they’re tailored to the particular actions that your bot performs.

Composite Bag

A composite bag is a grouping of related entities that can be treated as a whole within a conversation. Using composite bags enables a skill to extract values for multiple entities in one user utterance, which allows a conversation to flow more naturally. Early on in the designing of your skill, you should identify these groups of related entities, which often reflect clear business domains, and build composite bags for them.

For example, a composite bag for a pizza might include entities for type, size, crust, and extra toppings. If a user enters "I'd like a large pepperoni pizza with a gluten-free crust", the skill could extract "large", "pepperoni", and "gluten-free" from that input and not need to prompt the user for those values individually.

You can configure the composite bag entity to resolve its constituent items in different ways: it can prompt for individual entity values when they're missing from the user input, for example, or it can use the value extracted by one if its entities to resolve a second entity.

Composite bags can also include other types of items, such as those that store location and accept free text and attachments.

Composite bag entities allow you to write much shorter, more compact dialog flow definitions because they can be resolved using just one component. See Configure Composite Bag Entities for details on creating and configuring composite bags.

ML Entities

An ML (machine learning) entity uses a model to identify the entity values in a user message. You build this model from training utterances with annotations: labeled text that corresponds to an entity. In the following utterances, Flo's and SFO can be annotated for an entity that identifies vendors for an expense reporting skill:
  • Reimburse me $100 for dinner at Flo's
  • SFO charged $2.75 for parking on May 25th
You can start off by providing your own annotated utterances, but you can bulk up the training data by sourcing Entity Annotation Jobs through Data Manufacturing. After you train the entity, it can interpret the context of a message and generalize entity values. This flexible "fill-in-the-blanks" approach allows an ML entity to recognize values even when they're not included in the training set.

Because anticipating the format or wording of user messages is challenging, especially for multi-lingual skills, you may want to use an ML entity in place of the less flexible Value List and Regular Expression entities. Despite fuzzy matching, Value List entities (both static and dynamic) can often detect entity values only when they match their values or synonyms. "Computer engineer" might not match "computer engineering", for example. Regular Expression entities restrict the user input to matching a predetermined pattern or the wording that proceeds or follows an entity value. ML entities, on the other hand, are adaptable and can be made more so through robust training data.

Value List Entities

An entity based on a list of predetermined values, like menu items that are output by a Common Response component. You can optimize the entity’s ability to extract user input by defining synonyms. These can include abbreviations, slang terms, and common misspellings. Synonym values are not case-sensitive: USA and usa, for example, are considered the same value.

Dynamic Entities

Dynamic entities are entities whose values can be updated even after a skill has been published.
Note

Dynamic entities are only supported on instances of Oracle Digital Assistant that were provisioned on Oracle Cloud Infrastructure (sometimes referred to as the Generation 2 cloud infrastructure). If your instance is provisioned on the Oracle Cloud Platform (as are all version 19.4.1 instances), then you can't use this feature.
Like value list entities, dynamic entities are enum types. However, dynamic entities differ from value list entities in that their values are not static; they may be subject to frequent change. Because of this – and also because dynamic entities can contain thousands of values and synonyms – the values are not usually managed in the UI. They are instead managed by the Dynamic Entities API (described in REST API for Oracle Digital Assistant).
Note

Enhanced speech models created for dynamic entity values are currently trained only after a finalized push request is made from the Dynamic Entity API, so if you change dynamic entity values through the UI, the change won't be included in the enhanced speech models after you retrain the skill. Your changes can only be included after the next update from the API. To preserve your changes, the request's copy parameter must be set to TRUE.

Regular Expression

Resolves an entity using a regular expression (regex), such as (?<=one\s).*(?=\sthree). Regular expressions allow your skill to identify pre-defined patterns in user input, like ticket numbers. Unlike the other entity types, regex-based entities don’t use NLP because the matching is strictly pattern-based.

Entity List

A super set of entities. Using a travel skill as an example, you could fold the entities that you’ve already defined that extract values like airport codes, cities, and airport names into a single entity called Destination. By doing so, you would enable your skill to respond to user input that uses airport codes, airport names, and cities interchangeably. So when a user enters “I want to go to from JFK to San Francisco,” the Destination entity detects the departure point using the airport code entities and the destination using the cities entity.

Derived

A derived entity is the child of a built-in entity or another entity that you define. You base this relationship on prepositional phrases (the "to" and "from" in utterances like I want to go from Boston to Dallas or Transfer money from checking to savings). Derived entities can’t be parent entities. And because the NLU Engine detects derived entities only after it detects all of the other types of entities, you can’t add derived entities as members of an entities list.