November 25, 2025

Bot Framework Tutorial 4: Creating a Question and Answer(Qna) Bot

In the Tutorial 2, we learnt how to create a basic bot in Azure. In this lesson, we would take it a step further and learn how to create a question and answer bot.

Content


  1. What is a Question and Answer Bot
  2. Understanding LUIS
  3. The QnaMaker
  4. Steps Build a QnA Bot
  5. Final Notes and Next Step

1. What is a Question and Answer Bot?


This a bot that makes use of a question and answer databases to provide interactions with users by provided responses to user questions.

A question and answer bot allows you to discuss with it and while you ask questions, it provides you with relevant answers based on the content of the knowledgebase.

2. Understanding LUIS


LUIS stands for Lanuguage Understanding Intelligent Service offers a fast and effect way of adding language understanding to applications. Using LUIS, you can use pre-existing models to create Bots that can interact with users in a more natural way.

LUIS allows your application to understand what someone wants in their own words. It makes use of machine learning algorithms to allows developers to build applications taht can recieve input from user in a natural language and then deduce the intended meaning.

Learn more about LUIS from What is LUIS (Language Understanding Intelligent Service)

3. Understanding The QnaMaker


One of the key features of a Bot is to be able to seed it with a list of questions and answers. This list could be in a spreadsheet, document file, pdf, web page etc.

The QnaMaker is a free and easy to use REST API  that trains AI to respond to users’ question in a more human and conversational way.

With QnA Maker you can have a list of predefined questions and answers you have created. Then you can load this data to the service to create a knowledgebase and then trains it to respond to cetain variations of the question in the knowledgebase.

In this tutorial, we would create a Qna Service in QnaMaker and then use this service in the Question and Answer bot we would be creating.

You can read more about QnaMaker from the Qna Documentation https://qnamaker.ai/Documentation

Figure 1 Illustrate how QnaMaker integrates with Bot Framework.

Figure 1: Photo taken from https://qnamaker.ai/Documentation

4. Steps to Create a QnA Bot


Take the following easy steps to complete the process of creating a Qna Bot

Step 1: Create the QnA KnowledgeBase


You will create a list of questions and answers that would be used by the bot.You will do this in Microsoft Word or any other text editor you have. Create the question and answers using the format shown in Figure 1.

Save the file with a name. We will upload this file to QnaMaker

Step 2: Create a new QnA Service


Go to https://qnamaker.ai/
Login using your Microsoft Account

Click on Create new Service.
The new qnaService creation form opens as shown in the Figure.

Enter a name you would like to give to the service
Leave the URL field bland

Scroll down to the Upload File section.
Click Select File and select the file you created in step 1.

After the file have uploaded, click on Create
The window below is displayed. It takes a few seconds to process the request.

When the processing is completed, the next page is displayed

To test the Service, Click on Test on the left side of the page.
Enter ‘Hi’ to see the response
Enter a question  and see if it responds with the correct answer
After testing, you then click on Publish to publish the qna Service

Click on Publish again the complete the deployment process

Then note donw the KnowledgeBase Id  and the Subcription Key as highlighted in the figure

Congratulations!
You have successfully created a qna Service ready to be used in your bot in Microsoft Azure. You can go ahead to close the Window and login to Microsoft Azure

Step 3: Create a Question and Answer Bot in Azure


Visite portal.azure.com
Follow the bot create process to create a Question and Answer bot in Azure.
See how to create a bot here

Important: In the Bot Template, you must Choos Question and Answer

Step 4: Link the QnA Bot to the Qna Service


Go to the Application Setting. This is under App Service Setting
Scroll down to find QnaKnowledgeBaseID and QnaSubscription Key

Now you need to enter the KnowledgebaseID and Subscription key you got from Step 2

When you are done, click on the Save button at the upper part of the window.
Now, you are ready to roll!

So let’s now test our Question and Answer Bot

Step 5: Test thet Bot


Under Bot Managment, Click on Test in Web Chat
Enter one of the questions defined in the Question and Answer file we created
Try some other question
Try entering a question that is not there.??

5. Final Notes


If you have completed this lessons successfully, thumbs up to you! If you have challenges along the line, you can let me know at the form by the left of this page that says, ‘Your Opinion Matters’.
I would also like to tell you  that if you did this successfull, then almost every other aspect of bot framework would not be a bid deal for you.
Let’t now move on to the next steps,  where we would learn how to configure channels for out bot.

0 0 votes
Article Rating
Subscribe
Notify of
guest

27 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
https://www.google.co.id
https://www.google.co.id
6 years ago

I’m not sure where you’re getting your info, but great topic.
I needs to spend some time learning more or understanding more.
Thanks for excellent information I was looking for this info for my mission.

view my data
view my data
6 years ago

Ι have read so many posts concerning the blogger livers butt tһis
piece oof writing іs in faxt a go᧐d piece of writing, keep
іt up.

costume jewellery australia
costume jewellery australia
6 years ago

Aw, this was an incredibly good post. Finding the time and actual effort to make
a very good article… but what can I say… I put things off a lot
and don’t seem to get anything done.

fashion jewellery online australia
fashion jewellery online australia
6 years ago

Pretty section of content. I just stumbled upon your weblog and in accession capital to
assert that I acquire actually enjoyed account your blog posts.
Anyway I will be subscribing to your feeds and even I achievement you access consistently quickly.

Agen Bola
Agen Bola
6 years ago

I do not even know how I ended up here, but I thought this post
was great. I do not know who you are but definitely you are going to a famous blogger if you are not already
😉 Cheers!

bandar Bola
bandar Bola
6 years ago

Someone necessarily assist to make critically posts I might state.
This is the very first time I frequented your website page and
thus far? I amazed with the research you made to make this
particular put up incredible. Magnificent activity!

youtube downloader video
youtube downloader video
6 years ago

Ahaa, its pleasant dialogue concerning this article at this place at this web site,
I have read all that, so at this time me also commenting at this
place.

junk Car removal for Cash ri
junk Car removal for Cash ri
6 years ago

Useful info. Lucky mme I found your web site by chance, and I’m shocked whhy thi coincidence did
not came about earlier! I bookmarked it.

online Youtube Converter
online Youtube Converter
6 years ago

I absolutely love your blog.. Excellent colors & theme. Did you create this amazing site yourself?

Please reply back as I?m looking to create my own website and want to learn where you
got this from or exactly what the theme is named. Kudos!

youtube2mp3
youtube2mp3
5 years ago

Thanks for sharing your info. I really appreciate your efforts and I will be
waiting for your next write ups thanks once again.

rfid Inventory system
rfid Inventory system
5 years ago

When someone writes an paragraph he/she retains thee idea off a user in his/her brain that how a user can understand it.
Thus that’s why thjis piece of writing is great.

Thanks!

youtube2mp3
youtube2mp3
5 years ago

Its like you read my mind! You appear to know
so much about this, like you wrote the book in it or something.
I think that you could do with a few pics to drive the message home a little bit, but other than that,
this is excellent blog. An excellent read.
I’ll certainly be back.

Info Judi Online
Info Judi Online
5 years ago

My spouse and I absolutely love your blog and
find many of your post’s to be just what I’m looking for.
can you offer guest writers to write content available for you?
I wouldn’t mind writing a post or elaborating on a
few of the subjects you write with regards to here. Again, awesome web site!

Youtube To mp4
Youtube To mp4
5 years ago

Awesome article.

RFID access Control
RFID access Control
5 years ago

Just wish to say your article is as amazing. The clarity in your post is simlly excellent and
i can assume you are an expert on this subject. Well wirh your permission let me
to grab your RSS feed to keep updated wityh forthcoming post.
Thanks a million and please keep uup the enjoyable work.

bola168
bola168
5 years ago

Thanks for another great post. Where else may
anybody get that kind of information in such a perfect means of writing?
I have a presentation next week, and I am on the search for such info.

Violette
Violette
5 years ago

It?s nearly impossible to find knowledgeable people on this
subject, but you sound like you know what you?re talking about!
Thanks

Daftar Situs Judi Online
Daftar Situs Judi Online
5 years ago

Your style is very unique in comparison to other people I have read stuff
from. Many thanks for posting when you’ve got the opportunity,
Guess I will just book mark this site.

Situs poker deposit pulsa
Situs poker deposit pulsa
5 years ago

I do not know if it’s just me or if perhaps everyone else experiencing problems with your
website. It appears as though some of the written text
within your posts are running off the screen. Can somebody else please provide feedback
and let me know if this is happening to them
too? This could be a problem with my web browser because I’ve
had this happen before. Thank you

poker online terbaik
poker online terbaik
5 years ago

Hello! I’m at work browsing your blog from my new iphone!
Just wanted to say I love reading through your blog and look forward to all
your posts! Keep up the superb work!

situs Poker deposit pulsa
situs Poker deposit pulsa
5 years ago

What’s up to all, how is all, I think every one is getting more from this web site, and your views are
fastidious in support of new users.

Gtublog.com
Gtublog.com
5 years ago

Aw, this was a very nice post. Finding the time and actual
effort to produce a top notch article… but what can I say… I procrastinate a whole lot and don’t manage to
get anything done.

youtube Converter mp4
youtube Converter mp4
5 years ago

Wohh precisely what I was searching for, regards for putting up.

Poker Online Terbaik
Poker Online Terbaik
5 years ago

Every weekend i used to pay a quick visit this website, because i want enjoyment, as this this web page conations truly
fastidious funny information too.

miegamojo lovos su patalynes deže
miegamojo lovos su patalynes deže
5 years ago

grea points altogether, you just won a new reader. What mmight you suggest in regards to yiur put up that you simply
made a few days ago? Any sure?

Conveyor For Clothing Closets 22315 County
Conveyor For Clothing Closets 22315 County
5 years ago

Hi, I do think thіs iѕ a great website. I stumbⅼeddսpon іt 😉 I wіlⅼ return once again since I bookmarked it.
Money and freedom is the best way to change, may yoս be
rich and continue to help other people.

wholesale nfl jerseys
wholesale nfl jerseys
5 years ago

tnpkol
I always used to read paragraph in news papers but now as I
am a user of internet thus from now I am using net for content, thanks to web.