Create and integrate QnA Maker chat bot with MS Azure & Asp.Net

Recently everyone is trying to add bot framework with their existing web site.If you want to add a Qna maker immediately with your FaQ page then MS Azure QnA maker is a good option as we can create bot with in 30 mins.Lets see how?

Prerequisite:

1.Ms Azure Valid subscription.
2.Knowledge in Asp.Net 
3.Predefined questions and answer sets in Excel form or any web sites FAQ page.

As we said QnAMaker is a very simple way to create bot with predefined question and answer set.

Steps to Create:

1.Got to QnAmaker.ai site by microsoft.
2.Sign in to the page.
3.Create QnA maker Service.It will redirect you to azure portal you signed in.If you don't have yet please create one and ensure you have enough credits in it.please see below.


4.Now you can access this QnA services in the QnAmaker.ai site.see below.



5.Now you need to populate knowledge base.Here I have added the FaQ page of a Website.


You can add multiple URLs if you want or as I mentioned you can upload the Excel sheets also.

6.Now we just save it.You can see the derived questions and answers in the next page.



in the above page you can add your own custom questions and answers also.

7.Now here we go Save test and Train the Bot.And publish it.


Once published you will get the Published URL here.


Now Your bot is ready You can use this API with any UI bot framework.If you want to connect to different channels like Cortana, Facebook Messenger, Telegram, Skype, you can create a function bot in azure and connect to this bot.

Lets see how to create it.

1.Go to azure portal and create the function bot like below.


And in the application settings you can set the bots base URL, QnAAuthKey, QnAKnowledgebaseId.



You can Get this from the URL you got once you created the QnA maker.
3.Go to channels and get the code or connect to you r channels.For now I have generated the code by get code option in the channels.like below,


 Keep this IFrame in your Existing Application. 

See the output:



You can get the code :

Git hub URL


Pretty easy ! simple !!

Comments

Popular posts from this blog

Telerik c# MVC Grid customizing Paging with Custom sql query + Dapper

Configure Facebook Webhook[WebSub protocol]

SendGrid Integration with c#