What is an entity?

Now when you know what intent is, let’s get NLP entities explained.

We’ll be using the same example of “order_pizza” intent expressed by the user as the “Can you get me pepperoni pizza with extra cheese please?” utterance.

Although there can be simple intents that do not require any extras, usually there is a number of parameters for each intent that specify the details of what the user wants. In our example these parameters answer additional questions:

  • What kind of pizza does the user want? Pepperoni, Margherita, Boscaiola, Quattro formaggi, etc – let’s call this “pizza_type”.
  • Should there be any extras added? Cheese, mushrooms, pepperoni, etc – that would be “pizza_extras”.

These parameters are called entities, and they can be either obligatory or optional. For example, “pizza_type” entity is obligatory – we cannot deliver pizza unless we know which one it should be. On the other hand, “pizza_extras” entity is optional – the user may want some extras or not.

Let’s look into another example. The user asks “What is the weather in London now?”. The intent is to know the weather in a specific city (let’s say we name this intent “check_weather” and it’s handled by the chatbot skill with the same name). The entity name will be something like “city” then, and the entity value for this utterance will be “London”.

Notice that entity names and entity values are different – the same entity can have multiple values depending on the utterance. “What is the weather in London now?” and “Tell me New-York weather please” both map to the “check_weather” intent but the “city” entity value will be different.

Please refer to the “Connecting Dialogflow agents” manual for more details.

Was this article helpful to you? Yes 1 No 3

How can we help?