concept phrase in category chatbot

This is an excerpt from Manning's book Building Chatbots with Microsoft Bot Framework and Node.js.
Let’s take the echo chatbot that we built in the first chapter and add simple string matching to it. But before we do that we need to come up with a list of sample queries for each of the five intents we want to handle. Each collection will contain phrases that relate to that intent. We can define the collections for each intent as follows
The best way to understand entities is to think of them as variables or slots that can take multiple values inside a phrase which can be understood better by looking at Figure 4.1. For example, in our case we want our bot to be able to handle questions like “how to do a push up?”, “how to do a sit up?” and similar questions for each kind of workout. Instead of thinking of them as separate intents, we can consider workout type as a variable or a slot that can take different values inside the phrase “how to do a <workout type>?”. ‘workout type’ now acts as an entity that can take on multiple values like ‘push up’, ‘sit up’ etc. This is much simpler than creating a separate intent for each phrase corresponding to a workout.
Figure 4.1 Entities are like variables or slots which can take multiple values of a certain category. In this case the variable would be workout type and it can take on different values like “pushup”, “sit-up”, “deadlift” etc.
![]()
Similarly, for the intent about getting nutritional information you can think of food item as a variable or slot in the phrase, “give me nutritional information about <food item>?”. Now ‘food item’ can take on multiple values that we define for it.