The concept of context

The chatbot can hold any number of variables in memory, we call these context variables

Entities will be set as a context variable when matched, but forgotten when passed in an entity switch, transformed into the standard context variable “context”.

To use the concept of context, you will need to know how to create intents with entities in it. You will also need to know how to use the entity swtich and the context switch. This section will explain how the concept of context work in Puzzel smart bot.

  • The query from the visitor comes in. The intention (Intent) is to get information on “something”(Entity).

In this case, this "something" is "boats".

Our second query is "How much is it". This time the intent is to get the price of "something". This time we have not stated any entity in the input.  However, the bot remembers that we are talking about "boats" from the previous query.

The training data

In the Intent called "Need information", we can see that we have training sentences that corresponds with this intention.
We also have 6 entites. (aircrafts, trains, boats, cars, bicycles, houses).
We should expect a match when we query the bot.


In the intent called "Prices", we see the training sentences for this intent. It also contains some of the entities that also exist in "Need information".


Last updated