How to Create a QnA Bot in Azure

This Azure tutorial, we will discuss how to create a QnA bot in azure. You can follow the step by step tutorial to create a QnA bot in Microsoft azure.

Microsoft Bot Framework is an amazing framework that people are using it more and more to build Bots these days because it is so simple to put together a Bot very quick.

When talking about the bot framework, and chatbots in general, people usually assume that these are all using some clever logic and Natural Language Processing (NLP) to deliver a chunk of business logic via a natural language interface.

With the bot framework this is most likely implemented by wiring up the Language Understanding Intelligent Service (LUIS): originally a stand-alone, (optionally) self-training, natural language understanding service, but now part of Microsoft Research’s Cognitive Services – previously “Project Oxford” – a collection of extremely powerful machine learning APIs for processing images, video, text, speech, to extract meaning.

As a simple bot application let’s create a conversational bot. So this article will be based on creating a bot application that supports QnA or else known as FAQ bot in Azure.

Create a QnA Bot in Azure

As the first step, you must log in to your azure portal and need to create a new service => Search for “QnA Maker” and then create the service with selecting the resource group and pricing tires.

The following image contains the creating azure QnA service.

create qna maker in azure

As per the following image, we should provide a name for the service and select the subscription with the location.

create a qna bot in azure

So the deployment is now ready for the usage. The following image contains the success message of the completeness of the deployment.

create qna maker bot

Then you can navigate to to create the QnA Bot. There you need to login from the account you have created your service. Now you will see what are the available Azure directories and according to the directory, your subscription and your available bot services you created.

In the qnamaker, there are 5 steps to create the QnA Maker bot app.

Step 1: Create QnAMaker app in azure. (this is what we did previously)

Step 2: Connecting the app created in azure.

Step 3: Naming your knowledge base (QnA Maker knowledge base (KB) is own content, such as FAQs or product manuals)

Step 4: Populate the Knowledgebase using FAQ page, pdf, .doc, .docx, .xlsx, containing questions and answers in sequence.

Step 5: Create your Knowledge Base.

Let’s create this.

The following image contains creating the knowledge base for the QnA Maker.

azure qna bot

In step 2, we can select the QnA Service which we created in Azure and select the language you need to chat.

azure create qna bot

In the step 3, you can set the name. Then in the step 4, you need to add a URL or File to extract the question and answers. Here for this I have mentioned the Xamarin FAQ page in

The next option is Chit-Chat

microsoft azure qna bot

This is a new option in qnamaker. Adding chit-chat to your bot makes it more conversational and engaging. The chit-chat feature in QnA maker allows you to easily add a pre-populated set of the top chit-chat, into your knowledge base (KB). This can be a starting point for your bot’s personality, and it will save you the time and cost of writing them from scratch.

Then the last step: creating the knowledge base.

azure chatbot qna
azure qna maker

Finally, now you can see your knowledge base with the extracted question and answers.

qna maker bot sample

And also from here, you can just add a new question and answer pair. Like the below image, you can just add new questions.

qna maker tutorial
qna maker knowledge base

Likewise, you can add any questions and answers. At the bottom of the page, you can see the imported Chit-chat pre-trained question and answers.

how to Create a QnA Bot in Azure

Finally now we can save and train the knowledge base.

steps to create a qna bot in azure

Now we came to the finalizing points of our QnA Bot.

microsoft azure chatbot qna

Now we will test the knowledge base.

microsoft azure qna maker
azure qna maker knowledge base

Now you can publish your Bot Service.

azure qna maker bot service
create a qna bot in microsoft azure

So, now you can see the request URI of your deployed bot application. You can just request this URI and get back the response as the answer.

create qna maker bot azure

You may like following Azure tutorials:

Likewise, you can create this as a sample bot application. In addition, you can use Luis service to understand the user’s input and match words and then it will return an answer with much confidence.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.