How to create a FAQ chatbot using QnA maker

Hakim Elakhrass
arinti
Published in
4 min readAug 4, 2017

--

Most chatbots need to have the ability to answer basic FAQs. Adding this functionality can be a tedious task. QnA maker is a Microsoft tool that allows for the easy creation of FAQ chatbots.

These bots can be stand alone or connected to an existing bot to extend its functionality. You can access QnA maker through the web frame work or a REST API.

How it Works

The QnA Maker allows you to connect your existing knowledge base into a chatbot. You can feed a number of different formats straight into the web app and the QnA maker takes care of the rest.

After loading your knowledge base into the QnA maker you can train and test the bot. In the testing process you can correct the bot if it makes any mistakes.

Finally when you are satisfied with the bot you can connect it to your existing bot or set up a stand alone bot using the Microsoft Bot framework.

Example

Now we get into the fun stuff. A short tutorial on how to create a bot using the QnA maker. Firstly we have to identify our knowledge base. Suppose you are the government of Flanders and you would like to make it easy for people to get information about the drive code (wegcode). Well since you already have an FAQ page set up on your website it will take you minutes to create this bot.

First Steps

The first thing you will have to do is create an account. Then on the landing page you have to click on ‘Create new service’.

QnA Maker Landing Page

Here you can fill in the name of the bot and add the preexisting knowledge base. Once you hit create it will take a few seconds to launch the service.

Your bot is now ready for testing! You will see all of the QnA pares in a spreadsheet like document.

Loading your knowledge base

What I usually like to do is add some extra chitchat functionality to make your bot more personable. A few jokes and responding to insults usually does the trick.

Clicking on the test window will lead you to a web based test bot. There you can ask your bot questions. It will try to answer them. If it answers wrongly you can correct it to some extent. If it can’t find the answer at all it will also tell you.

Another thing that I should mention but you probably already realized is that the bot works in multiple languages, I have created a dutch language bot for this example.

You can see here that you do not have to ask it in the exact why the question was loaded. It uses LUIS based NLP to extract meaning out of your questions. Once you are happy with how your bot is responding you can link it to any bot you already have running.

If you would like to run it is a stand alone bot, the easiest way to do this to create a bot on Azure. This will allow you to connect your QnA Maker bot to almost any chat channel!

Final Thoughts

QnA maker allows for the quick and easy addition of FAQ functionality to existing bots or for new stand alone FAQ bots. This allows you to plug in your existing knowledge base straight into your bot. It is free, fast and efficient.

Of course this is just one piece of a bots functionality. Most likely you would like your bot to have much more functionality. This can be created using Microsofts Bot framework. Please keep your eyes open for my blog about using Microsoft Bot framework to create even more complex bots. If you have any question please feel free to contact me!

--

--

Passionate about life and knowledge. Interested in meeting new people and exchanging ideas.