How to build the interactive learning bot
Let us take a look at the intents in this chatbot.
Default Welcome Intent
Notice the following
- this intent contains the Welcome event, which means it is automatically triggered when the chat widget loads
- it includes the training phrase “Start over”
- it prompts the user to answer a question by choosing between two suggestion chips
Here is what it looks like inside the chat widget:
If the user answers No to the slot filling question, we simply ask the next question.
What if the user said “Yes” to the first question?
Now, if you have been following my website, you probably know that I recommend people avoid the slot filling feature as much as possible.
If the user answers “Yes”, it is like the wrong answer to the question. 🙂
We show them an info card rich response, with a blurb (“Why I avoid using slot filling”) and a link to an article which explains why you should avoid slot filling in Dialogflow.
We will do the same for the other questions in this interactive learning bot. All the remaining intents work in essentially the same way.
Download agent ZIP file
You can get the agent ZIP file from my Dialogflow Messenger Example Bots course.
How to mark lessons as complete
Once you register for this course, you will be able to mark lessons as complete.
How to unlock all the lessons
Once you register for the course, make sure you click on the "Take this course" so you can unlock and watch all the lessons in the course.