Develop Question And Answer Bot Service Using Microsoft QnA Maker

Introduction

In our custom web sites, one basic requirements is a FAQ page or FAQ documents. So, using this FAQ content, we can write our own Bot Service using Microsoft QnA Maker. It is a free web-based service to respond to user's questions in a conversational way. So, we have no need to develop, train, and manage the Bot service by using Microsoft QnA Maker. In this article, I will explain how to configure Question and Answer Bot Service using Microsoft QnA Maker.

Steps to create QnA Bot Service

  1. Go to https://qnamaker.ai/ site.



  2. Login with any of your Microsoft ids.



  3. After successful login, agree on the terms and privacy statement.


  4. It will take you to your already existing services. If no services are found, it will show the below screen.



  5. Click on “Create new service” to create a new QnA Bot Service.



  6. Enter the new Bot Service name.


  7. Enter the new FAQ URL of your web site. In this example, I have entered Microsoft site FAQ URL “https://www.microsoft.com/en-us/software-download/faq”.



    Basically, any FAQ URL page should contain question and answer format, as shown below.



  8. We can add multiple FAQ site URLs to build QnA Bot. Give more relevant answers by clicking on “+Add another” link.

  9. If no FAQ URL is there for your site, then upload the files containing your question and answer pairs.


    This file should contain the question and answer format, as shown below.


  10. We can add multiple files also.
  11. If we missed some questions and answers, we can add it in the next step also.

  12. Click on "Create" to create the new Bot Service.


  13. If any error occurs and you are not able to fetch the question and answer for Site URL or document uploaded, it will display the error. We need to update it with proper URL or document.

  14. After forming QnA Service, it will display the questions and their relevant answers. We can edit the questions and answers here. We can add new entries also.



  15. We can test the Bot by clicking on Test tab. Enter the question and in reply, the Bot service will give a relevant answer.



  16. We can edit the service by clicking on "Settings" tab.



  17. After completing all the changes, we need to “Save and retrain” the Bot Service.



  18. Finally, we need to "Publish" the Bot Service.



  19. We can review the changes made to the QnA Bot Service and click on "Publish" button.



  20. Our QnA Bot Service will be deployed successfully. It will show the sample HTTP request with knowledge based id and subscription key.



  21. By using the HTTP request, we can build our own UI for this QnA Bot Service.

Summary

Thus, you have learned how to configure Question and Answer Bot Service using Microsoft QnA Maker.


Similar Articles