FAQ bot in less than 5 minutes | Google Dialogflow Knowledge base

Vaibhav Malpani
Vaibhav Malpani’s Blog
4 min readAug 15, 2018
Want to convert your FAQ page into a Chatbot? Want to have more interactive and easy way to let users know details about your company?Want a Chatbot to answer repetitive questions for you?

Now after using Google Dialogflow’s Knowledge Base, you can achieve all of this is less than 5 minutes without writing a single line of code.

To start using the knowledge you should have a Google account. Login to Dialogflow and create a new agent.

How to Create an agent:

1. On the left-hand side, you will find an option as ‘create new agent’.

2. Give your agent an appropriate name and select create a new Google project. After that click ‘create’

Enabling BETA Features:

1. Click on settings button which is just beside the name of your agent.

2. In that ‘general tab’ you will have to enable BETA FEATURES in order to use Dialogflow knowledge base as it is in BETA state now

Creating a Knowledge Base:

1. On the left-hand side of the window click on Knowledge

2. Select ‘create knowledge base

3. Enter a suitable knowledge base name and click on ‘create the first one’ to start

4. Enter values according to your data.

Document Name: this can be anything that you want

MIME type: this is the type of data you are going to feed to the bot. It has options like (text/plain, text/html, text/csv, application/pdf)

Knowledge Type: this can be selected as FAQ

Data Source: this can be provided as a file on cloud storage or local, you can also give this as a URL to a public page.

5. Wait for it to generate all the data from the source that you have provided. This usually takes about 3–5 minutes depending upon the size of your data.

You can see ‘sample store FAQ’ knowledge base has been created.

6. Select ‘Add response’ button.

7. You can look at the content of data inside FAQ by clicking on ‘view details’. It should look something like this.

8. $Knowledge.Answer[1] indicates that it will show the best matching answer to the user.

9. If you select Facebook Messenger or Skype you can add multiple answers this way

10. Now Let’s Test out the Bot. Make sure you select save and wait for the bot to get trained.

11. For multiple answers, you can get a card like this

Benefits:

  1. Earlier if you have to build a FAQ bot, you will have to enter all the data manually in an intent, training phrase for the question and also add responses for all the FAQ.
  2. This might seem okay for 8–10 FAQ question but this process will take a lot of time if there are like 150–200 FAQ questions.

Limitations:

  1. Knowledge Base needs to be in a structured format.
  2. Knowledge Base cannot be used to form FAQ from websites that require authentication.

If you liked this post, clap for it; follow me if you want more such posts!

--

--

Vaibhav Malpani
Vaibhav Malpani’s Blog

Google Developer Expert for Google Cloud. Python Developer. Cloud Evangelist.