Previously, I wrote about the Microsoft Azure Bot Service and briefly explained how it works. Today, I will delve deeper into the topic and present how to configure a Question and Answer (QnA) chatbot hosted on the Microsoft Azure cloud platform. I will also show you how it can enhance your customer experience.
Before I present the QnA bot configuration, let’s just quickly revisit the kinds of chatbot templates available in Azure:
A QnA bot can help you for instance with FAQ automation. Users do not have to search answers to their questions somewhere on a website or in a document. Instead, they can just ask the chatbot a specific question, and it will respond with a clear answer.
Another use case is where a chatbot can help with reducing the number of repetitive questions sent to the support team. Rather than sending an e-mail, your users can just ask the bot.
QnA bot setup
Now we have an idea of what to use the QnA chatbot for, let’s go over its configuration.
Bot Knowledge Base
A simple Question and Answer (QnA) chatbot does not require writing a single line of code. Everything can be configured in the QnA Maker portal.
1. Click the Sign In button in the top right corner and log in with your Microsoft Account (if you do not have one yet, you will need to create it first).
2. From the top panel select Create a knowledge base.
3. Click Create a new QnA service.
4. At this point, you should see the Microsoft Azure portal. You’ll need to complete some necessary information about your bot.
Required information in detail
- Name – name of the QnA web service for the bot knowledge base, e.g. SupportTeamBotQnA
- Subscription – Microsoft Azure subscription on which you will host your chatbot
- Management pricing tier – tier which indicates how to charge the service (per how many calls). Select the F0 tier
- Resource group – there is an option to indicate whether to create the bot in a dedicated resource group or an existing one
- Search pricing tier – tier which indicates how to charge our service with reference to search functionality. Please select the Basic plan
- Search location – location for our Search service
- App name – name of your chatbot which will be included in the app url
- Website location – location of the QnA service
- App Insights – tools to monitor your bot performance. In this case you can disable them.
5. After a few seconds, the QnA Maker service is created and ready for further configuration.
6. Return to the QnA portal and move to step number 2. Please select Microsoft Azure Directory ID, Azure Subscription Name and Azure QnA service which we created in the Azure portal.
7. In step 3, enter the Knowledge Base name, which in this case is
8. Click Create your KB button in step 5.
9. Now it’s time to add some questions and answers to the bot Knowledge Base. Click Add new QnA pair.
10. On the left side of the table you can type a question and on the right side you should provide the answer.
11. Click the Save and train button to apply changes to your knowledge base.
Publishing the chatbot
Once your knowledge base is ready, it is time to publish the bot so it can be available for users.
1. Click the Publish button from the top bar and then select the Publish option.
Congratulations! You’ve deployed your QnA bot.
Bot conversation tests
Now you’ve published your chatbot, it is ready for some tests in the same portal.
1. From the top panel, select My knowledge bases. Click on your newly created knowledge base.
2. Click the Test tab to display a chat window where you can type your question and get an answer from the bot.
Integration with Azure Bot Service
The QnA Maker portal enables bot setup. Communication with the chatbot is done through REST API. To enable additional communication channels like web chat control or Skype, you will need to use the Microsoft Azure Bot Service. An active Microsoft Azure subscription is required.
1. In Microsoft Azure portal choose Create a resource.
2. Type Bot in search window, then select Web App Bot and click the Create button.
3. Subsequently, a blade should appear with configuration options.
There are a few details which should be provided to configure your bot with Azure Bot Service.
Details for configuration
- Bot name – in our case it is the same as in the QnA portal, i.e. SupportTeamBot
- Subscription – define the Microsoft Azure subscription which will host the bot
- Resource group – there is an option to indicate whether your chatbot will be created in a dedicated resource group or an existing one
- Location – where you’ll place the resource group
- Pricing tier – in our example we’ll select Free
- App name – name of the web application, it can be the same as the chatbot name
- Bot template – as I mentioned in the beginning, there are five bot templates. In this case, please select the Question and Answer bot template
- App service plan/Location – it is possible to adjust scalability of web applications hosted on Azure which is connected to pricing
- Azure storage – chatbot can collect some data. To enable this, you should create persistent storage
- Application Insights – tools to monitor your bot performance. In this case you can disable them
- Microsoft App ID and password – you should register the chatbot application as a Microsoft application with a unique ID and password. The Auto create App ID and password function generates them automatically.
Once configuration is ready, click the Create button. After a few seconds, the QnA bot service is enabled.
Click SupportTeamBot Web App Bot to open the blade with details.
To correctly integrate your QnA bot with Azure Bot Service, two values should be provided in Application Settings:
You can find these values in the QnA portal in Settings tab. Keep them somewhere safe.
Now in the Azure portal, open the Application Settings tab and paste values as shown below and click Save.
Communicating with your QnA bot through different channels
Microsoft Azure Bot Service enables communication with the bot through different channels such as Skype, Microsoft Teams or Facebook Messenger.
I would like to present how to configure the Skype channel, so users can add your bot to contacts list and start a conversation with it. You will need to install a Skype client first.
1. Open the Web App Bot blade in the Azure portal and select Channels.
2. Select the Skype channel.
What you need to notice here, is that Bots in Preview are limited to 100 contacts and are not searchable in Skype. You have to submit your bot for review before it can become available. I will present communication with the chatbot in Preview.
3. The configuration blade should display with an option to delete channel.
4. Skype channel should be now visible on your channels list.
5. Click Skype and then click the Add to Contacts button. Your bot will automatically appear in your Contact list.
Congratulations! You can now chat with your chatbot through Skype.
In my previous article I described Microsoft Azure Bot Service, including bot templates. Today we went through Question and Answer (QnA) bot configuration to show how it can improve communication and interact naturally with users.
You can use this template for automating FAQs or in any other scenarios where your customer service agents have to answer multiple repetitive questions, leaving them free to focus on other tasks.
Additionally, we’ve seen how to set up communication with chatbot through Skype client. What’s important is that integration with Microsoft Azure Bot Service enables access to the chatbot from many different channels such as Slack, Facebook Messenger or Microsoft Teams, depending on what your users make use of most frequently.