Microsoft’s Bot Framework is available for developers to create and connect interactive bots to everyday conversational platforms such as Skype, Facebook Messenger and Microsoft Teams. The QnA Maker is a service that provides a quick and easy way to add question and answer support to your bots and apps. The bot will be able to take a User’s questions and respond back in a natural way and all this can be developed and deployed very simply. This blog will go through an example using a product manual to create a question answering bot.
To start you would need to navigate to https://www.qnamaker.ai/, sign in using your Microsoft Account and then select ‘Create a knowledge base’. The first two setup steps shown in the screenshot above require you to create and select a QnA Service. Selecting the ‘Create a QnA service’ button will redirect you to the Azure Portal, guiding you in creating your own service.
Step 3 will allow you to name your knowledge base, followed by Step 4 which is used to populate it. To populate your knowledge base, you can provide a URL for a data source, a document file such as a word or pdf file or you can leave this part empty and populate the questions and answers manually once it has been created.
In the example above, I attached a user guide for the Samsung Galaxy S9 as my knowledge base source. After adding the pdf file and selecting ‘Create your KB’ in Step 5, the QnA bot knowledge base began populating. Around two minutes later my knowledge base was ready to be tested. The screenshot below shows a snippet of the 33 pages worth of questions and answers created from the attached pdf.
After selecting ‘Save and train’ in the top right corner of the screen, I was able to test my QnA bot within the browser with the ‘Test’ button. The screenshot below shows a test conversation. As you can see there is already some language understanding capability during testing as it was able to connect the input question to correct answer. If you select ‘Inspect’ from this test window, you’re able to see the returned answer with a confidence score and alternate answers, which could have been returned. From this window you can select preferred answers and even provide more answers.
Once you’re satisfied with the QnA source you have created, you can select the Publish button and publish the QnA knowledge base to be used publicly. The success page will provide you with a sample HTTP request, which you can use to connect your newly created service to a bot or an app.