Create FAQ Bot Using Dialogflow Knowledge Connector

Bots are the hotshots in the customer support market. Additionally, with the rise of self-service, bots have become more important. In this post, we will learn how to create an FAQ bot. It’s simpler than you imagine.

We will be using Google Dialogflow’s Knowledge Connectors. These are nothing but a set of documents that feed questions to your bot and helps your fetch answers for the same.

While building a bot in Dialogflow, you define intents that reflect the questions your users may ask. What Knowledge Base Connector does is to complement the defined intents by parsing documents such as FAQs and articles to find questions and responses.

  • Questions are automatically added as training phrases
  • Answers are automatically added as responses
Image for post
Image for post
  • With the help of the Knowledge Base Connector, we can set up the bot to answer repetitive questions which will save more time
  • This would be more interactive and easy for the users
  • It removes the manual process of defining a lot of intents and their answers

Since we have already learned why Knowledge Base Connectors are important. Let’s deep dive into using them to create FAQ bot.

Steps to Create FAQ Bot

For creating an FAQ knowledge base, first, we need to have an existing agent or create a new agent in the Dialogflow console. Agents are nothing but bots in your Dialogflow console.

Please refer this Dialogflow Doc to know how to create agents in Dialogflow

Please note that the Knowledge Connector is a beta feature, you have to enable the “ Enable beta features and APIs “ in the Dialogflow:

  1. Click on the ⚙️ (Gear icon) on the left side panel near the Agent name.
  2. Under the “BETA FEATURES” section, enable the “Enable beta features and APIs” option
Image for post
Image for post
Image for post
Image for post

On the left-hand side panel, click on the “ Knowledge” option and select the “ CREATE KNOWLEDGE BASE

You can give your knowledge base a suitable name and save it. I have saved it as KB — FAQ.

Now, click on “ Create the first one “ option to create a knowledge document.

Image for post
Image for post
  • Enter a ‘Document Name’, which can be any name
  • Select the ‘Knowledge Type’
  • For the knowledge type ‘FAQ’, 2 mime types (the type of data you are going to feed to the bot) are supported
Image for post
Image for post
  • For the knowledge type ‘Extractive Question Answering’, 3 mime types are supported
Image for post
Image for post
  • Give a ‘Data Source’ to the document: Data source is the file from where all the data for your Knowledge Base will come. It can be provided as a file on cloud storage ☁️ or local 🖥️, you can also give this as a URL to a public page.
Image for post
Image for post

Once you filled all the required fields, click ‘CREATE‘. The document will parse the HTML page.

Now the knowledge connector has created an FAQ chatbot.

Take a look at data inside FAQ by clicking on ‘view details’.

Image for post
Image for post

The document is parsed into Questions and Responses.

Image for post
Image for post

Click on “ADD RESPONSE” to enable the automated responses.

Image for post
Image for post

Also, make ensure that you’ve enabled the bot.

Image for post
Image for post

Now, your FAQ bot is ready for testing.

Try any questions and you can see the responses from the bot.

Image for post
Image for post

Add this bot to your websites and apps

We have successfully created FAQ bot using Dialogflow Knowledge Base Connectors. However, we need to add it to our website or apps. For this, we will be using Kommunicate’s rich chat widget.

For integrating Knowledge Base Connector, you can either integrate a new bot or edit an existing one. Here are the instructions for integrating a new bot in Kommunicate.

You can also edit an already integrated bot in Kommunicate:

Image for post
Image for post
  • Enter your Knowledge Base ID and click ‘Save and proceed
  • You can add multiple IDs by separating them by a comma.
Image for post
Image for post
  • To get the Knowledge Base ID, go to the ‘DIAGNOSTIC INFO‘ section in the Dialogflow
  • It will be in the below format

# Format: projects/<Project ID>/knowledgeBases/<Knowledge Base ID>.

An example is mentioned below,

Image for post
Image for post
  • After integrating the Dialogflow Knowledgebase ID, you can test the FAQ chatbot with questions.
Image for post
Image for post

In this way, you can create FAQ bot by using the Dialogflow knowledge connectors.

Don’t forget to give us your 👏 !

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Chatbots Life

Best place to learn about Chatbots.

Sign up for Latest from Chatbots Life

By Chatbots Life

Watch entire Chatbot Conference on Youtube Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Devashish Datt Mamgain

Written by

Cofounder @Applozic | @kommunicate.io, love building products and writes about technology

Chatbots Life

Best place to learn about Chatbots. We share the latest Bot News, Info, AI & NLP, Tools, Tutorials & More.

Devashish Datt Mamgain

Written by

Cofounder @Applozic | @kommunicate.io, love building products and writes about technology

Chatbots Life

Best place to learn about Chatbots. We share the latest Bot News, Info, AI & NLP, Tools, Tutorials & More.