Overview of entities

An entity is a particular detail needed to specify the user’s intent so that the intent can be carried out. For example, if the user’s intent is to order an espresso drink from a coffee shop, an agent needs specifics to actually carry out the order.

  • What kind of drink?
  • What size?
  • Hot or cold?

Entities are like boxes that hold the answers to these sorts of questions. Entities for a drink-ordering intent might include COFFEE_TYPE, FLAVOR, TEMPERATURE, and so on. You can link entities and their values to the parameters of the functions and methods in your client application logic.

Intents and relevant entities

If an entity applies to a particular intent, it is referred to as a relevant entity for that intent. The idea of relevant entities is important:

  • When annotating a sample, if you have provided an intent, the suggested entities are limited to those relevant for that intent. This greatly simplifies the annotation process.
  • The NLU models interpret and return only entities that are relevant to the intent of the query.

User-defined entity types

Mix.nlu supports the following user-defined entity types:

Predefined entity types

Mix.nlu also supports two classes of predefined types:

Modifiers and anaphoras

Mix.nlu also provides some mechanisms to modify, combine, and refer to the existing types:

Entities and sensitive data

Your application may end up collecting user input that contains sensitive personally identifiable information (PII), whether intentionally or unintentonally. For the security of user data, this information needs to be assigned to a sensitive-flagged entity in Mix.nlu so that it can be identified by your model (whether relevant to a specific intent or not), and redacted in your event logs.

You need to pay special attention to this sort of information when designing an ontology. You need to define entities to capture these kinds of information, and designate the entities as containing sensitive information that needs special treatment in logs.

For more details on how to handle sensitive data in Mix.nlu, see Handling sensitive information.