How To Develop An Azure Chatbot using QnA Maker?

How To Develop An Azure Chatbot using QnA Maker

Conversational AI chatbots are currently the rage in the market. Take any website, app or a mobile site, chances are highly likely that you would be interacting with a bot to get your questions answered.

Specifically, chatbots are highly beneficial and useful in fintech, and healthcare segments, where some of the most redundant and repeating questions can be more easily answered by chatbots than humans. Apart from answering questions, chatbots are also used to accomplish tasks such as booking tickets, scheduling appointments and more.

If you’re someone looking to build a chatbot for your service, this post is just for you. Nowadays chatbots are very popular. We can see them on any website. It helps us to see, hear like humans. The main objective of the Chatbot, we will get from booking sessions or appointments with any business like a Teacher, doctor, etc. It is very easy to integrate any platform like Microsoft teams, WhatsApp, Skype, and many more.

Here we go for Azure bot service and QnA maker.

Developing AI Powered Chatbots Using Microsoft Azure QnA Maker:

QnA maker helps users create a chatbot without the need to code. To do that, we need to create a Knowledge base , where you add questions and relevant answers. Once all knowledge databases are created, you can initiate a test using the Webchat tab.

To do this, you first need to create an Azure Free or Purchase account. Simply go to https://portal.azure.com/

In Microsoft Cognitive Services, it is part of Azure. The Create a Knowledge Base page is wizard-like and the first step is where we will connect to Azure.

As shown in the above  image, you need to create a QnA maker Azure service and fill all the required fields.  Then Press the ‘Review + Create’ button and after some time, a QnA maker instance is created. (In our case, the QnA maker’s Azure service name is sales-qna).

Now, move on to the Resource group (in which we have created App services) and select sales-qna clicked on ‘QnA Maker Portal’ under second section.

Now, we are on the QnA maker page. Here, we can create a Knowledge base by following these steps:

Step-5: Click on ‘Create your KB’ button

As shown above, display all the questions and answer pairs. You can also add a few more questions and answer pairs using the ‘+’ sign. 

Sometimes users cannot be expected to answer in a single word or sentence. In such cases, we can use Multi-turn conversation.

Here (https://github.com/Azure-Samples/cognitive-services-sample-data-files/blob/master/qna-maker/data-source-formats/multi-turn.docx )  you can download that sample file for Multi-turn conversation.

If you want to upload more files and URLs into KB, use the ‘Settings’ button,  edit and update KB name and URLs and Files.  After updating any value,  you need to click on the ‘Save and train’ button to retain the saved changes. Also, we can manage Files and URLs and also Import-Export KB.

Besides, we can test KBs using different cases before publishing. In that popup, we can test Questions, answers and multi-turn conversations.

You will now be able to see the ‘Create Bot’ button. Using this button, you can create a web bot.

Web App Bot

The bot is almost ready. . Add a name for your app and ensure it is different from the name you’ve given to your QnA maker service. 

Specify SDK language here. After creating a bot, you can download the code from Azure to the local development environment and do custom changes.

Select Test in Web Chat to test your bot.

Wrapping Up

There you have it! Your first chatbot. As you keep working on it, you would figure out ways to make interesting changes and additions to optimize your chatbot and make it more interactive. Let us know in the comments what other features you would like to implement in it.

The following two tabs change content below.

Jigar Prajapati

Sr. Software Developer (.Net) at DEV Information Technology Ltd
Jigar Prajapati is a trained B.E computer engineering with GTU and professional senior software developer in DEV IT Ltd with over seven years of experience in the IT field. Jiger has strong expertise in Desktop application development by using various technology like .Net (WPF, C#, XAML, Third-party controls) and is able to work for .NET CORE API and Angular. He has the skill to quick understand problems and give quick solutions. Jiger wants to be a senior partner in a top law firm in the future and spend his leisure time into listening to music, playing video games, traveling, and exercising.

Latest posts by Jigar Prajapati (see all)

2 thoughts on “How To Develop An Azure Chatbot using QnA Maker?

  1. Pingback: Guide to build Efficient Customer Support Using Power Virtual Agent

Leave a Reply

Your email address will not be published. Required fields are marked *