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.