Hello
Let’s see a tutorial that consists of creating a chatbot the Azure Portal and QNA Maker to be able to solve questions that a person asks.
Create a new knowledge base
-
Sign into to the QnA Maker portal with your Azure credentials and select Create a knowledge base.
-
If you have not already created a QnA Maker service, select Create a QnA service.
-
Select your Azure tenant, Azure subscription name, and Azure resource name associated with the QnA Maker service from the lists in Step 2 in the QnA Maker portal. Select the Azure QnA Maker service that will host the Knowledge Base.
-
Enter the name of your knowledge base and the data sources for the new knowledge base.
- Give your service a name. Duplicate names and special characters are supported.
- Add URLs for data you want extracted. See more information on the types of sources supported here.
- Upload files for data you want extracted. See the pricing information to see how many documents you can add.
- If you want to manually add QnAs, you can skip Step 4 shown in the preceding image.
-
Add Chit-chat to your KB. Choose to add chit-chat support for your bot, by choosing from one of the 3 personalities.
-
Select Create your KB.
-
It takes a few minutes for data to be extracted.
-
When your Knowledge Base is successfully created, you are redirected to the Knowledge base page.
Create a QnA Bot
-
In the Azure portal, select Create a resource.
-
In the search box, search for Web App Bot.
-
In Bot Service, provide the required information:
- Set App name to your bot’s name. The name is used as the subdomain when your bot is deployed to the cloud (for example, mynotesbot.azurewebsites.net).
- Select the subscription, resource group, App service plan, and location.
-
To use the v3 templates, select SDK version of SDK v3 and SDK language of C# or Node.js.
-
Select the Question and Answer template for the Bot template field, then save the template settings by selecting Select.
-
Review your settings, then select Create. This creates and deploys the bot service with to Azure.
-
Confirm that the bot service has been deployed.
- Select Notifications (the bell icon that is located along the top edge of the Azure portal). The notification will change from Deployment started to Deployment succeeded.
- After the notification changes to Deployment succeeded, select Go to resource on that notification.
Chat with the Bot
Selecting Go to resource takes you to the bot’s resource.
Select Test in Web Chat to open the Web Chat pane. Type “hi” in Web Chat.
The bot responds with “Please set QnAKnowledgebaseId and QnASubscriptionKey in App Settings. This response confirms that your QnA Bot has received the message, but there is no QnA Maker knowledge base associated with it yet.
Connect your QnA Maker knowledge base to the bot
-
Open Application Settings and edit the QnAKnowledgebaseId, QnAAuthKey, and the QnAEndpointHostName fields to contain the values of your QnA Maker knowledge base.
-
Get your knowledge base ID, host url, and the endpoint key from the settings tab of your knowledge base in the QnA Maker portal.
-
Sign in to QnA Maker
-
Go to your knowledge base
-
Select the Settings tab
-
Publish your knowledge base, if not already done so
-
Test the bot
In the Azure portal, select Test in Web Chat to test the bot.
Your QnA Bot answers from your knowledge base.
Thanks to the excellent guide
For step #5 the only options for bots are Echo and Basic and there’s no option to change the SDK versions.
Hello Ami
Yes, I need to update, now there is an efficient way to create the knowledge base and the chatbot.
Thanks for your comment.
Best regards
Victor Villar