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:

slotfilling.NO

If the user answers No to the slot filling question, we simply ask the next question.

slotfilling.YES

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.

contextlifespan.NO

contextlifespan.YES

followupintents.NO

followupintents.YES

wildcard.NO

wildcard.YES

flowchart.NO

flowchart.YES

Download agent ZIP file

You can get the agent ZIP file from my Dialogflow Messenger Example Bots course.

>