In my last article “Build FAQ Knowledge Base with QnA Maker”, I have explained steps to create knowledge base from existing FAQ pages using QnA Maker service.

In this blog as a next step, I will explain how we can convert this FAQ knowledge base into a chatbot using Azure Bot Service.

To use Bot Service, if you have at least an Azure Account. If not, you can start one for free. To create a Bot, follow the below steps:

  1. Log into the Azure Portal
  2. Click on New > AI + Cognitive Services > Web App Bot
    Web App Bot
  3. A new blade will open with information about the Web App Bot.
  4. In the Bot Serviceblade, provide the requested information to create a Bot Service:
  • Bot Name: This will be our Bot name and used to respond to Chat with the user
  • Subscription: Microsoft Azure Subscription, you can very well try this out with the free trial subscription also.
  • Resource Group: This is a logical grouping of all Azure resources. Bot service is part of Azure resources it must be associated with either existing resource group or create a new resource group.
  • Location: Select the data center region you would like to use
  • Pricing tier: This defaults to S1 Standard, change this to FO (10K Premium Messages) Or else you will pay for the service
  • App Name:It should be unique application name for the bot which consists of alphanumeric and underscores characters only up to 35 characters. The App name cannot be changed once the bot is created.
    App name in azure chatbot
  1. Scroll down and fill remaining details:
  • Bot template: As we are using FAQ knowledge base which is in question and answer form, select Question and Answer
  • App service plan/Location: You will need to create a new one or use an existing.
  • Azure Storage:This is a data storage account. You can create either a new or use an existing one.
    Azure Storage
  • Application Insights:This service is not free, so be careful about turning it on.
  • Microsoft App ID and password: Select Create New option if you need to enter a Microsoft App ID and password manually. Otherwise, a new Microsoft App ID and password will be automatically created for you in the bot creation process. See the below image:

Application Insights

  1. Click Createto create an Azure Bot. It will validate provided choices, and on completion, it will begin the deployment.
  2. On completion of deployment, we would have Azure Bot service. Now to consume the knowledgebase we have created using QnA Maker service, we need to connect both services.
  3. To connect the Azure Bot service, select your bot, it’ll be the one which has a TYPEof Web App Bot
  4. From the left menu, click on APP SERVICE SETTINGS > Application Settings.
  5. Scroll down to App settings There are two blank settings called QnAKnowledgebaseId and QnASubscriptionKey.
    App setting
  6. Provide your valid QnAKnowledgebaseId and QnASubscriptionKey from your QnA Maker service.
  7. Click Save
  8. To test this newly created Bot, click on Test in Web Chat on the left side and ask queries based on the knowledge base.
    Test in Web Chat
  9. By default, bot will be configured and running for Web Chat
  10. To check all the channels for this bot, click on Channelson the left menu. There are more channel options available like Teams, Skype, Cortana, etc.
    Azure chatbot Channels
  11. To test a chatbot in Web Chat, click on Test in Web Chat option under BOT MANAGEMENT section in the left panel
    BOT MANAGEMENT in Azure chatbot
  12. Now enter a message and bot should respond leveraging the knowledge base created using QnA Maker service.

QnA Maker service

Note: If the Web Chat control is not fully loaded after a few minutes, try refreshing the page.

In this blog, I have explained how you can create a basic Web App Bot by using Bot Service and tested the bot's functionality by using the built-in Web Chat control within Azure. I hope the entire blog series helped you understand and explore the capabilities of Azure Bot Service and QnA Maker service. You can view the entire blog series here:

  1. Everything about Microsoft QnA Maker
  2. Build FAQ knowledge base with Qna Maker
  3. How to convert FAQ into a Bot using Azure Bot Service

Posted by Advaiya

    Let's connect to make technology work for you.





    Please tick the options most relevant to your business challenges
    Decision makingBusiness productivityCustomer experienceTechnology-led innovationDigital transformation


    [By using this form you agree with the storage and handling of your data by this website.]