- Step by Step Dialogflow Part 1 – Introducing the FAQ bot
- Step by Step Dialogflow Part 2 – Preparing the FAQ list
- Step by Step Dialogflow Part 3 – Creating an agent from the FAQ list
- Step by Step Dialogflow Part 4 – Intent Mapping
- Step by Step Dialogflow Part 5 – The Wimbledon Finals bot
- Step by Step Dialogflow Part 6 – Populating the entities
- Step by Step Dialogflow Part 7 – Declaring Intents with Entities
- Step by Step Dialogflow Part 8 – Completing the WFBot Intent definitions
- Step by Step Dialogflow Part 9 – how Intent Mapping works under the hood
- Step by Step Dialogflow Part 10 – The Vending Machine Bot
- Step by Step Dialogflow Part 11 – Using contexts to maintain state
- Step by Step Dialogflow Part 12 – Using input and output contexts to manage state
- Step by Step Dialogflow part 13 – Webhooks
- Step by Step Dialogflow part 14 – The florist bot
- Step by Step Dialogflow Part 15 – Identifying intents in the florist bot
- Step by Step Dialogflow Part 16 – How contexts help intent mapping
- Step by Step Dialogflow Part 17 – Follow up intents
- Step by Step Dialogflow Part 18 – Dichotomous key bot
- Step by Step Dialogflow Part 19 – Creating the vending machine bot with follow up intents
This step by step guide was written when Dialogflow was still API.AI. Over time, I have learnt a lot more about how Dialogflow works, and distilled my learning into a simpler and more straight forward Intro to Dialogflow course (free). I have left this guide as is for people who have linked to it, but I recommend that you to learn from the newer material.
In the previous post, you used the interactive console on the right hand side to test your agent's responses for different questions from the user.
In this post, I will give an overview of what is happening, and what is the expected behavior.
The main feature of a bot building service such as API.AI is to look at the words typed (or said) by the user, and map it to a list of expected phrases. This is called intent mapping. While there is a lot of machine learning logic which goes on underneath the hood to make this happen, for the bot programmer, this is like a black box which works as follows.
The first condition in the flowchart - "Does it match any of the existing phrases?" is based off the list of "User says" questions you created for the FAQ. API.AI is looking for similarity.
Suppose, the user were to type "What is the meaning of life?", it will not match any of the "User says" phrases we have used. So the flowchart will select the first (top) NO branch and trigger the fallback intent.
There is also a second condition in the flowchart, as you have noticed. This condition checks if the current context is a match. We will look into contexts in more detail in a later post, but you can think of it as an additional criteria that must be satisfied before an Intent is chosen as the right mapping.
This ends the discussion about our first FAQ bot. The goal of building the FAQ bot was to get a basic idea of what Intents are and how intent mapping works. Next we will be looking at entities.
Want to learn the basic concepts of Dialogflow in 2 hours? Check out the Dialogflow Basics course