Introduction
Recently I have attended Azure Tech Day event in Mumbai, where in Cortana session I came to know about QnA maker provided by Microsoft Bot Framework using Microsoft Cognitive Services. Playing with it for few hours, really found it fantastic to work with.
In this tutorial, will work with Botframework’s QnA maker to create our own QnA Bot.
Pre-requisite
- Zeal to learn Bot Framework.
- Microsoft Live Account.
Create your first QnA bot
Go to https://qnamaker.ai/ OR qnamaker.botframework.com; both lead to the same web portal.
Click on ‘Create new service’.

If you are not logged in, it will ask to log in with Microsoft Live account.
After successful login, QnA Maker will require some basic permissions to get started. Read those permission details carefully and click on Yes to proceed.

Now, QnA Maker will ask to agree with Microsoft Cognitive Terms and privacy statement, as QnA maker is provided under Cognitive Services terms. Check the ‘I agree.’ checkbox and hit on continue to proceed with.

Now, you will landed over to main page where in you can start with creating your own QnA Bot.

Let’s name the service
The first item is naming your service (mandatory). This name will appear as Bot response.

Feeding data
For feeding the data to QnA bot, there are three methods or ways available. We can use any one method or combinations of all three methods as per the requirement.
- FAQ URLs
This will help us gather relevant data about your business and extract QnA pairs that you can later use in your bot. Now this is really cool, we can enter one or more URLs to existing, publicly accessible, FAQ style pages; Assuming or considering the URL are with “FAQ” type HTML structure, QnA Maker service can extract the Qs and As crawling into the same.
For this tutorial, we will be entering Hexaware Technologies' career FAQ section, http://hexaware.com/careers/faq
You can enter multiple URLs also. Clicking on ‘+Add another’ will allow you to add multiple URLs. Once done with entering URL, hit on "Create" button, if you are going with only one method.
For this tutorial, will go one by one selecting the available methods.
Hitting on ‘Create’ will lead to this neat message, saying QnA is extracting URLs for feeding data. Now, the time taken for this could vary with size and number of URLs you are entering.
Once done with extracting QnA pairs, it will land up at below detailed page. As you can see, QnA maker has brilliantly extracted all 9 questions available at provided URL.
Very first QA is to start with greeting to Bot user. By default it has, ‘Hello’ as a response for ‘Hi’, you can modify with your desired response and click on ‘Save and retrain’ button to update the knowledge base. It has following options available, - Tab name ‘Knowledge base
This tab displays all QnA extracted or seeded to QnA maker through any given method and source. - Tab name ‘Test’
Here you can actually test the Bot request response, with all possible matches and even allowing to add multiple questions patterns for the same desired options. - Tab name ‘Setting’
Here, it will display all the basic details, like Service name, URL entered, file name if uploaded. It also provides sample HTTP request for accessing the service once it gets published. Also, you can delete the service from the option available over here in this tab. - Button ‘Save & Train’
This will save and train Bot with all modified changes done to the knowledge base.. - Button ‘Publish’
It will publish our Bot, will be available with public HTTP URL and ready to use.
- Link Button ‘+ Ad new QnA pair’
This allows us to add new set of questions and answers by adding new row to existing QnA set.
You can also delete any question from the list, or, can add alternate question for the same response by clicking on three dots that appear at right top corner of Test area.
- FAQ files
Again, this is super cool, it allows you to take preexisting content, and just import it directly; you can directly upload files containing your question and answer pairs. As of now it supports .tsv, .pdf, .doc, .docx, format each under 2MB. It allows to upload up to five files containing questions and answers in sequence.
Click on ‘Select file’ and upload desired file with supported format. Hit on Create once done.
For this article, I have copied demonetization FAQ from RBI site which is publicly available, in to word file name qnafaq.docx and uploaded the same.
It’s in below format.
Again, after clicking ‘Create’ it will take few seconds and will land up to knowledge base screen reading data from the document uploaded.
- Manual Addition
This is you can very do at any step, also by adding URL or document. As mentioned earlier Knowledgebase page gives provision to add Question Answer, additional phase manually.








Bhavik PatelPosted Jan 18, 2017, 9:35 AM
Nice information. thanks for sharing !
Madan BhintadePosted Jan 16, 2017, 4:41 AM
Thanks for sharing. I will take a look at QnA Maker
Abhishek KumarPosted Jan 10, 2017, 1:48 AM
Very informative..thanks for sharing...
Humayun Kabir MamunPosted Jan 8, 2017, 5:34 AM
Thanks Kasam for this wonderful article...