Continuing our series on “Must Know Dialogflow Concepts”, we look at contexts in this article.
Here is the official definition:
While this is a good definition, it is possible to define contexts much more simply.
The Dory Bot
To understand contexts, you first need to understand what a Dory bot is.
An article on VentureBeat describes it as follows:
Contexts add memory to your chatbot conversation session
In the article snippet above, there is a reason Alexa can’t remember where “there” is. (Note: I don’t know if Alexa still has this issue, but you get the idea)
Chatbots are not human like in their ability to process what went before in the conversation. As a result, Alexa has no context for the word “there”.
But there is a way to simulate this memory of previous messages – and that is to use contexts in Dialogflow.
While I will not be going into any detail how this can be achieved, the important takeaway is that it can be done using Dialogflow contexts.
Note: At the same time it is also quite a complex feature to understand and implement. This means there are some limits on how well you can do this “remembering”.
In Dialogflow, contexts are used to add memory to a conversation session and avoid creating Dory bots.