Defining Slots and Slot Types

We will define slot type and slot values for “AnswerIntent.”

The user can utter any city around the world as they answer questions. Does this remind you of the concept of variables? A variable is a good analogy for the concept of slots.

We need to define a slot to represent the answer. However, before we define the slot, we need to define the slot type.

A slot type is analogous to a class in Object-Oriented Programming. It represents a grouping of similar entities.

For example, the grouping of cats, dogs, and cows could be defined by the slot type animal.

Similarly, to define the grouping of cities around the world, we will create a slot type called answerCity.

To do this, click on the “Slot Types” section on the left navbar and then click on “Add Slot Type.”

Get hands-on with 1200+ tech skills courses.