Skip to content

Quickly build a chatbot to support your employees with the related answers on "COVID-19", "remote working", "wellbeing" and other vital topics at the time of uncertainty. And host it for FREE !

Notifications You must be signed in to change notification settings

LazaUK/AzureBot-Covid19FAQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

QnA Bot, to support your team with the latest answers on the vital topics of interest. Costing you nothing, i.e. gratis!

With coronavirus pandemic now spreading across the world and, unfortunately, claiming human lives, it's really vital to provide people with the up-to-date information on the latest learning and recommendations from the reliable health authority sources.

With certain cities or even countries now in a lockdown mode, more and more people start to practice social distancing and work from home. Social anxiety and new ways of working can be challenging during periods of uncertainty. So, affected or worried people may require advice on how to stay healthy (physically and mentally), while being isolated.

Chatbot is a platform which can be particularly useful here. You can select specific sources to feed its knowledge base. Make your bot operate 24 x 7. Support multiple languages. And easily activate relevant channels, to communicate with your users in the apps of their choice: be it Web interface, MS Teams, Slack, Telegram or something else.

Sounds interesting ? If yes, just follow some simple steps below to create your own bot, train it on the frequently asked questions (FAQ) from the leading health organisations and make it then work on your external Web site (with template for a demo Web site provided) and internal MS Teams chats.

Note: Solution described here requires access to an Azure subscription. Microsoft Azure is one of many cloud platforms, offering chatbot building and hosting capabilities. Depending on your preferences and access options, as an alternative, you may build similar bot solutions on top of Amazon's Lex or Google's Dialogflow platforms as well.

Covid-19 FAQ bot in minutes:

Building QnA bot is extremely easy and you indeed can enable access to your knowledge base via bot in minutes.

  1. First of all, open QnA Maker Web site, sign-in with your Microsoft account and then click "Create a knowledge base" option; Step1.1

  2. Next, click "Create a QnA service" button in "Step 1" as shown below; Step1.2

  3. You will be re-directed to your Azure subscription. Fill in the template form, and make sure to set pricing tier for "QnA Maker service" to F0, and for the supporting Azure Search service to F, if you want to host your Bot components for free. Then click "Create" button; Step1.3

  4. Azure will start deployment of the relevant resources in your target resource group. If successful, you should get notification similar to this; Step1.4

  5. By default, App service plan for the Web component is set to a chargeable S1 pricing tier. To switch to the free pricing tier, open your app service plan (you can find it by the resource type in your resource group), select "Scale Up (App Service plan)" on the left navigation bar, click "Dev/Test" tab, select F1 pricing tier and then click "Apply button as shown below; Step1.5

  6. Now, return to our QnA Maker Web site and click "Refresh" button in "Step 2"; Step1.6

  7. Once refreshed, you should be able to find your newly created QnA Maker service in the right Azure subscription. Also, you can select now the target language for your QnA service (set to "English" in example below); Step1.7

  8. Give a meaningful name to your Knowledge Base (KB) in "Step 3"; Step1.8

  9. In "Step 4" you can specify sources to feed your knowledge base. It can be populated from Web sites (containing FAQ), uploaded from files (e.g., in PDF, MS Word, MS Excel, etc. formats) or typed manually. For this example, I'm populating my KB with Covid-19 FAQs from the World Health Organisation and UK National Health Service (NHS) Trust Web sites; Step1.9

  10. In "chit-chat" section you may choose "personality" for your bot, so that it can answer some additional small talk questions. This will enrich your KB with additional question/answer details, so you bot may respond to various greetings, as an example; Step1.10

  11. Now, in "Step 5", you can click "Create your KB" button, to setup your knowledge base and populate it with the data from the configured sources; Step1.11

  12. Once created, you will see a window like this with the content of your new KB; Step1.12

  13. You may test bot's knowledge base, by clicking "->Test" button, then typing your question and pressing "Enter"; Step1.13

  14. If happy with your bot's answers, click "Save and train", then switch to "Publish" tab and click "Publish" button; Step1.14

  15. In the new window, click "Create Bot" button; Step1.15

  16. You will be re-directed to your Azure subscription, where you can set the pricing tier of your Azure Bot Service to F0 (free one) and the click "Create" button; Step1.16

  17. Once Web App Bot is deployed in Azure, you may verify its functionality by selecting "Test in Web Chat" in the left navigation bar and then typing your messages in the Test window. Step1.17

If you get replies similar to what is shown on the screenshot above, congratulations - you have successfully completed setup and training of your bot !

Next step would be to make it accessible in your platform of choice.

Embed your bot into Web site:

Azure Web App Bot can communicate with external world via so called "channels". Those channels are built for the relevant messaging platforms, e.g. Skype or Telegram. To find out more about supported channels, please consult Microsoft documentation here.

By default, Web App Bot has "Web Chat" channel activated. It means that you can easily start using it on your Web site. Step2.1

To do that, open your newly created Web App Bot in Azure, click "Channels" on the left navigation bar, then click "Get bot embedded codes" and finally click "Click here to open Web Chat configuration page" link. Step2.2

Now click "Show" link to make one of the secret keys visible and use to replace <YOUR_SECRET_CODE> placeholder in provided embedded code sample. You can paste this embedded code now into the source code of your target Web site. Step2.3

Web sites can be built using various Web development frameworks: be it ASP.Net, Django, Angular or anything else. But surprisingly, you can build a Web site even using standard MS Office app, e.g. MS Word. To prove it, I've created a demo Web site which you can clone from this repo.

Simply clone it, replace <PUT_YOUR_SECRET_CODE> placeholder in line # 1059 with the secret code from your Web Chat configuration page as describe above and you will get fully functional Web page with embedded QnA Chatbot, similar to what is shown below. Step2.4

Enable your bot in MS Teams:

Web site normally serves your external audience. But what if you want to enable chatbot capabilities for your internal audience, e.g. employees?

No problems at all. If you company uses MS Teams as an example, you would need to activate relevant channel in your Bot's configuration first.

Open your Web App Bot resource in Azure, select "Channels" option from the left navigation bar and click MS Teams icon. Step3.1

Next, press "Save" button. Step3.2

After few seconds, you should get MS Teams channel activated for your bot and shown with the "running" status in the list of available channels. Step3.3

Now, switch to your MS Teams client, select "App Studio" from the left navigation bar, click "Manifest Editor" tab and then click "Create a new app" button. Step3.4

Note: If you don't have App Studio installed, you may add it to your MS Teams client from MS Teams app studio by clicking ... from the left navigation bar and searching for an "App Studio" app.

In "1. Details -> All Details" section enter description for your bot and generate an App ID. Step3.5

In "2. Capabilities -> Bots" choose your Azure bot from "Existing bot" tab's drop-down list and then define its scope in MS Teams, e.g. "Personal" and "Team" for your users to chat with the bot directly and within specific teams. Step3.6

In "3. Finish -> Test and distribute", use "Install" button (if you have MS Teams administrator access) or "Download" button (to send .ZIP package with the manifest details to your MS Teams administrator) to make your bot available in your MS Teams environment. Step3.7

If successful, then you should be able to chat now with your bot directly from within MS Teams. Step3.8

Keep your knowledge base up-to-date:

As content on the source Web sites may change because of the latest learning, developments and discoveries, it's important to keep your bot's knowledge base up to date. To do that, open your KB on QnA Maker Web site, open "Settings" tab, tick "Refresh content" against relevant Web site, click "Save and train button" and then open "Publish" tab to move your changes from the test to the production index. Step3.9

About

Quickly build a chatbot to support your employees with the related answers on "COVID-19", "remote working", "wellbeing" and other vital topics at the time of uncertainty. And host it for FREE !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages