- 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.
This is the first part of a multi-part guide I am writing on API.AI. This series came about as a result of a question I saw on the API.AI forum, where someone asked if there were any step by step guides. When I began learning API.AI, I sometimes felt that many of the online resources do not really take a step by step approach - here, by step-by-step I mean an approach where they focus on one thing at a time as they teach.
The way bot building frameworks are built, it does look like you need to simultaneously learn many different concepts and isolated concepts are not very helpful. So my first goal is to create what I call "microbots" - they are too focused and even a little too contrived to be of much practical use, but they serve as useful resources for learning.
This is intended as a resource and guide aimed mainly at programmers. At the moment, building moderately complex chatbots is not quite "push button". As we go further along, I expect that you will be able to write some code on your own to get your bot working.
If you are completely non-technical, you can still follow along for the first three bots I will be building where I will teach you how intents, entities and contexts work. You can also ask your questions in the API.AI discussion forum. If you are interested in private online coaching, see end of post for contact info.
The FAQ Bot
The Frequently Asked Questions bot is one such microbot which may not have too many practical applications. An FAQ bot simply returns the best resource/post/article on a given website which matches the user's question. The FAQ bot is limited on many levels.
- A search engine can usually do what the FAQ bot can
- If it only provides "one and done" answers to a user's question, it is not very conversational. There is nothing chatty about such a bot.
- It is not likely to be as comprehensive as the search on a website
However, even an FAQ bot can actually be an improvement sometimes. For example, the default WordPress search is not very good when the keywords used are not present in the article. Since the FAQ bot uses natural language processing techniques, it is more likely to use word stems, synonyms and such and still provide good answers when the keyword varies from what is usually seen in the article.
In addition, suppose you have a website where people repeatedly ask the same type of questions. An FAQ bot can actually be very helpful for them since you can make it work for many different variants of the same question.
So what does an FAQ bot look like? Here is a screenshot:
The FAQ bot we will be building will be an FAQ bot for API.AI itself.