In times of isolation, we are all thinking how can we help people understand the situation that the world is going trough. So it occurred to me to create a small Bot that can help answer some of the most common questions regarding this virus. I start my development at 5:00 pm on a Sunday, March 22, 2020, on my fifth day of quarantine for this virus.

Analyzing the necessary requirements to create a bot as quickly and easily as possible, the first thing I consider is the QnA Maker service provided by Microsoft.

QnA Maker

QnA Maker is one of the Services provided by Microsoft. This service helps a bot answer user questions, matching it with the best possible answer from its knowledge base. Microsoft suggests using this service for cases in which you want to provide customers with information they may be looking for frequently, support documentation or product manuals.

Architecture

We will use the web portal to create the knowledge base. This portal makes it easy for users from different backgrounds update, train and publish their knowledge base for consumption. (You can also use the REST-based API). This content will be stored in Azure Search, and the access endpoint for client applications is deployed as Azure App Service.

Once the knowledge base is created and published, the QnA Maker data and runtime will make your service available.

Lets create our Bot.

*You need to have an Azure Subscription to work on this tutorial, learn how to get a free one here. 

1 – Go to the portal https://www.qnamaker.ai/ and sign in.

2 – Select in the menu the option “Create a Knowledge Base”

image

3 – Select Create a QnA service option, which will take you to Azure portal to create the QnA Maker service and the associated Azure app service that will host it in this portal.

image

4 – In Azure fill the information and select Create.

image
image

5 – Once de service has been created we need to connect it to our knowledge db, return to QnA Maker Portal, and follow with step 2. Press the “Refresh” option. So the service you just created will appear.

image

6 – Next, name your KB and Create your KB.

image
image

7 – Once your KB is created you will be redirected to the panel to configure it.

image

Since I dont have the knowledge to upload all the information I can:

  • Give access to a professional so he/she can upload the information.
  • Upload a file (doc, pdf, etc) with the information.
  • Import the FAQ from different URL (reference your sources). 

8 – We will click the “settings” button in our menu. In the “Manage Knowledge base” option i will add the url https://www.cdc.gov/coronavirus/2019-ncov/faq.html the site which has the information i need for my bot to use. Then click “save and train”

image

Once done, select the option “Edit” you will see the information listed as “Source” you can edit all information listed as you wish.

image

9 – After editing, press “Save and Train”. and then “Test” to test the bot.

image

10 – Finally press the “publish” option to deploy the service and press “create bot” option. Once its created you can follow the steps to add the bot to your website or to connect it to other channels like Skype, Slack, etc. Check here to learn how to connect a bot to a channel.

image
image
image