In this article we will learn how to use Dialogflow to convert a FAQ document into a conversational experience.
What you’ll learn
- What is Knowledge Connector
- How to set up Dialogflow Knowledge Connector
- How to test the agent
- Basic concepts and constructs of Dialogflow. For introductory Dialogflow tutorial videos that covers basic conversational design check out the Deconstructing chatbot series.
- You could check out the video before you begin, for a visual learning experience.
Top 4 Bot Tutorials
What is Knowledge Connector?
NOTE: Knowledge Connector is a Beta feature so the feature and functionality may change.
Knowledge connector complements the defined intents by parsing documents such as FAQs or articles to find questions and responses.
Questions are added as training phrases and answers are added as responses. To configure them, you define one or more knowledge bases, which are collections of documents. At the time of this article, CSV and HTML files are supported for ingestion.
It is common for an agent using knowledge connectors to also use defined intents. Knowledge connectors offer less response precision and control than intents. When using both intents and knowledge connectors, you should define your intents to handle complex user requests that require special handling and precision, and let knowledge connectors handle simple requests with responses automatically extracted from your documents. When you identify content in FAQs that you want to expand on, you can convert the questions into defined intents, giving you full control.
Steps to set up Knowledge Connector
Use an existing Dialogflow agent or create a new one. If you do not know how to create an agent, refer to the third episode of the Deconstructing Chatbot series where we build an appointment scheduler. You could also refer to this article.
Because this is a beta feature we start by going to the gear icon and enabling the beta option.
Now, we are ready to create our knowledge connector. Select the Knowledge Beta from the left pane and click “Create Knowledge Base”
Give it a name and save.
Now, go back to the Dialoglfow agent and create the first knowledge connector.
- Give it a name, I called it “Compute Engine FAQ”
- Select a knowledge type — it is FAQ
- Select Mime type — in this case, it is a HTML file.
- And we add a URL to the document. I am using this https://cloud.google.com/compute/docs/faq
- Once you have filled, click create.
And with that, the Knowledge connector has created the FAQ chatbot, Click on the Compute Engine FAQ.
We see that the questions are parsed into requests and responses neatly.
Click on Add response to enable the automated responses and save.
Before testing, be sure to enable the chatbot. Click on the checkbox beside the name of the FAQ and click enable.
Test Your Chatbot!
Now we are ready to test! In the simulator on the right, query your Dialogflow agent with “what is pricing for compute engine” and you will see a response from the bot. Try out more examples like “How do I get support”. You will notice that even if you do not type the exact same question from the FAQ it still gets mapped to the correct intent. That’s the beauty of knowledge connector.
You created a FAQ chatbot from a HTML or CSV file in less than 2 mins. Try this awesome beta feature and create some chatbots to answer those FAQ questions automatically!! Once you do, don’t forget to share the experience with here in comments.
- Check out the Dialogflow website here for documentation, APIs and more.
- Follow Deconstructing Chatbots video series and subscribe to Google cloud platform youtube channel
- Try Dialogflow, it is free to build a bot! Check it out.
Don’t forget to give us your 👏 !
Deconstructing Chatbots: How to create FAQ Chatbot with Dialogflow was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.