The Difference Between Entities and Slots: A Definitive Answer

Guy TONYE
Voice Tech Global
Published in
6 min readSep 3, 2021

Here is a quick test for you. Take a look at this phrase from a person using a bot to gather information:

Tell me about the training to become a Conversation Designer.

Which of the following would you say is correct?

  1. The intent is TrainingInquiry and “Conversation Designer” is the Value of the slot “Profession”.
  2. The intent is TrainingInquiry, “Conversation Designer” is the Slot.
  3. The intent is TrainingInquiry, “Conversation Designer” is the Entity.

If you have no idea what the answer is, you’re not alone. When we ask this question in our Conversation Design (CxD) Training classes, we get all three answers.

In this article, we will review where the confusion comes from and what CxD looks like using real-world examples. By the end, you will know how to ace this quiz.

What happens when a bot processes what you say

Let’s start with unpacking what happens when a user interacts with a bot.

Take a Space Agency Bot that is capable of helping someone book a ticket on the next rocket ship going into space.

The user says “I want to book a ticket to go to Mars in 2023,” and a number of things happen in seconds.

First, the machine learning system (or ML, for short) in the bot tries to identify if that sentence matches one of the intents it has been trained on. An intent is a goal that the user has that is programmed into the bot. Usually, the ML system is programmed with more than one intent.

For the Space Agency bot in this case, it has been programmed with an intent called BookTicket. Other potential intents could be CancelTicket, or ChangeBooking.

Second, to book the ticket, the bot needs the destination, the trip date, and the number of desired tickets. This is required information for an intent. The technical term for this type of information is slots.

The Space Agency bot will try to fill in the slots using the information in the user utterance (or what the user asked for). “Mars”, “2023” and “one” (deducted from the “a”) are good candidates to fill the slots. These details are called slot values.

Finally, the bot provides a summary result. Here are the results from the Space Agency example:

Intent: BookTicket

Slots:

  • “Destination” with a Slot Value of “Mars”
  • “Trip Date” with a Slot Value of “2023”
  • “Number of tickets” with a Slot Value of “one“
The image describes the steps that happen when a bot processes a user utterance
User Utterance Processing By ML

How Conversation Designers train bots to understand humans

To get a bot to understand a request, it needs training.

The training consists of feeding the ML system that the bot uses with intents.

For all the intents the conversation designer wants a bot to detect, they provide a name and a list of annotated phrases.

The conversation designer for the Space Agency bot names the book a ticket intent: BookTicket.

Here are a few annotated phrases they might provide:

  • “I want to get {NumberOfTicket} {TripDate} ticket to {Destination}”
  • “I want to book {NumberOfTicket} ticket to {Destination} in {TripDate}”

{NumberOfTicket}, {TripDate}, and {Destination} are the slots we mentioned earlier. They represent the information necessary for conversation designers to include so that the bot can return an accurate response to the user, as long as it has detected the right intent.

Understanding Slot Types

Slot types are crucial because they indicate the possible values that can be in a slot. For the machine to train, it will need to know what the types of slots are.

There are a few standard slot types. These are:

  • Text: Any word or group of words.
  • Numeric: Any number, “1” or “one”.
  • Date: Any expression of a date, for example, “Tomorrow”, “March 2042”.
  • Time: Any expression of time, for example, “Four forty-four PM”, “Sixteen fourty-four” or “half past nine”.

In our example, the {NumberOfTicket} will be of the Numeric slot type, and {TripDate} will be of the Date slot type.

But what will be the slot type of {Destination}? We can use Text, but since this slot type allows any words, it will not be specific enough. A user could say they want to go ‘there’ and would get nowhere.

To solve that, when training the ML system, conversation designers can create something called a custom slot type. These slot types need a name, a list of values, and possible synonyms for each value.

Custom slot types are also called entities. An entity is a finite list of values and synonyms that can be used as a slot type when none of the standard types are a good fit (ie. text, numeric, date, and/or time).

In our Space Agency bot example, we can define an entity with the name CelestialObject, and give it many values, for example:

  • “Mars” with the synonyms “red planet”, “4th planet”
  • “Moon”
The image describes the steps and the assets (intent, slot, slot type, entities) required for ML training
ML Training Process

When we assemble everything for the Space Agency Bot, we feed ML with:

Intent: BookTicket

Phrases:

  • “I want to get {NumberOfTicket} {TripDate} ticket to {Destination}”
  • “I want to book {NumberOfTicket} ticket to {Destination} in {TripDate}”

Slots:

  • NumberOfTicket (Type: Numeric)
  • TripDate (Type: Date)
  • Destination (Type: Entity, CelestialObject)

Where does the confusion between Entities and Slots come from?

From the last section we have the following:

  • Slot: a required piece of information for the intent.
  • Slot Type: the kind of information that a slot can have.
  • Entity: a custom type for a slot with a finite list of values.

When we look at all the available conversation design tools, the terminology above tends to get a little confusing. As you discover more, you’ll learn that different platforms use different terminologies for each concept:

  • Amazon, for its Alexa Development, uses slots, slot types and slot values. Amazon defines entities as custom slot types.
  • Google, in Dialogflow, solely uses entity. Slot types are entity types, slot values are entity entries. The one interesting thing is, the terminology Google uses changes again. In the next step after intent detection, Google uses the term… “slot” filling.
  • IBM Watson is similar to Google in using solely entity with entity name for slot type.
  • Voiceflow uses entity and entity type instead of slot and slot types.
  • Botmock uses variable and variable types for slot and slot types, and also uses entity as the custom slot type.
The image describes the terminologies use by each platform for intent, slot, slot type and entity.
Terminologies Broken By Platform

Let’s look back at our earlier quiz.

“Tell me about the training to become a Conversation Designer.”

Which of the following would you now say is correct about this user utterance?

  1. The intent is TrainingInquiry and “Conversation Designer” is the value of the slot “Profession”.
  2. The intent is TrainingInquiry, “Conversation Designer” is the slot.
  3. The intent is TrainingInquiry, “Conversation Designer” is the entity.

The answer is … 1 🙂.

Remember: Slot and entity are the terms used to describe the information that conversation designers feed into machines. A slot can take the following slot types: dates, times, text, and numbers. Entities are specific to custom slot types, like a ‘planet’ custom slot type, for example.

In classes at Voice Tech Global, we recommend our students focus on the definition of slot and entity when working with the technologies available. Then they can navigate between tools and platforms without confusion because they understand how terms are defined first.

Test yourself

Now that you’re a slot, intent expert, it’s time to do a little test.

Take this quiz to verify your understanding of the concepts. 🙂

P.S.: There is a surprise at the end if you get everything right!

What does CxD training actually look like?

Once conversation designers have their intent definitions, with the slots and entities, the actual machine training begins.

In our Foundations in Conversational Experience Design (FCxD) course, we cover the entire process in different no-code tools. We focus on helping those interested in conversational design begin a career as a practitioner.

Students who take the FCxD course leave with real-world experience, a polished portfolio, and are introduced to a whole new world of employment opportunities. Find the full syllabus and course details here.

If you liked this story, please give us a clap 👏👏🏻👏🏽.

Feel free to share in the comments if our guide has helped you understand how bots work, the difference between slot and entity, or your own questions about conversational design.

--

--

Guy TONYE
Voice Tech Global

Software engineer, Google Cloud Platform Certified Data Engineer, Co Founder @ VoiceTechGlobal