Hey everyone, this another post in the bot series on how to create a QnA Bot. To create a QnA Bot we are going to use the QnA Maker an the Azure Bot Service.
Prerequisites
- You’ll need a paid Azure subscription. If you do not have an Azure Account you can open a trial from the Azure portal.
- You will need to create a knowledge base using the QnA Maker. Follow the steps in this article to create a KB
- To run the sample code you must have Visual Studio 2017 installed
- You will need the Microsoft Bot Framework SDK v4 template for C#
- To run and test the bot you will need the Bot Framework Emulator
Create your Bot
After you have followed all the steps in this article to create a knowledge base the easiest way to get your bot is to create it via the Qna Portal.
Open the QnAMaker.ai portal, open the knowledge base you just created and go to the PUBLISH tab.
Publish your QnA knowledge base. then the page will change as follows:
Click on the Create Bot button. It will take to to the Azure Portal. Make sure you have logged in with your Azure credentials and create a Web App Bot. Fill in all the fields and click Create. If the QnA Auth key does not fill in automatically, go to the QnA Cognitive Resource and copy it from there.
Wait a couple of minutes until the bot creation process notification reports success. Your bot is ready
Test your bot
As soon as the resource is created open it in the Azure Portal and go to the Test Web Chat tab. Here you can test your bot!
For more customizations open the Build tab. Click Download Bot Source Code to get the Bot Source Code. At this point a popup will open asking you if you want to include app settings. Click yes and download the solution.
Open the solution in Visual Studio 2017 and make any changes you want. Then publish it again in the Web App Service. That’s it you just created a bot in a few easy steps!
To see how to run and debug your bot locally check out this tutorial.