I like big bots and I cannot lie ...

BotHeader4.png

... You other users can't denyThat when a bot loads up with a big knowledgebaseand throw questions in its faceYou get answers ...OK, enough of that. I saw a tweet by James Marshall (@jamesbmarshall) which he followed up with a blog post where he spoke about building a bot using in less than an hour with zero code.  His jamesbmarshallbot (a chat bot to handle out of office queries) piqued my interest and I wanted to have a go myself to see if the claims were true.I used the QNAMaker website which is heavily wizard based and will either take a FAQ from a page, allow you to upload questions and answers in a tab separated text file or you can manually enter the questions and answers on the page.  Following the instructions on James' blog page I quite quickly was able to create StuartRidoutBot which, similarly to James' bot, would answer queries if I was out of the office.  You can interact with StuartRidoutBot in the following ways:

Next StepsI was happy with the bot but not the standard welcome (Welcome You!) or the response if it couldn't find an answer (the rather abrupt No match found!)With some help from Gary Pretty's blog I found that you could change these standard greeting and response.   I had to slightly modify the approach as I had deployed using the Azure Bot Service.Customising the welcome message

  1. In the Azure Bot Service, go to your bot and ensure you're in the Develop tab.
  2. Select the run.csx file
  3. Find the code highlighted below and edit the message to suit

Edit the error messageIn the Azure Bot Service select the BasicQnAMakerDialog.csx file and find the code highlighted below.

public BasicQnAMakerDialog() : base(new QnAMakerService(new QnAMakerAttribute(Utils.GetAppSetting("QnASubscriptionKey"), Utils.GetAppSetting("QnAKnowledgebaseId"),"Sorry but I can't find an answer.  Could you please rephrase your question?")))

The code highlighted above should be added in (including the comma) as an extra parameter to the QnAMaker definition.SummaryThe Microsoft Bot Framework, QNAMaker service and Azure Bot Service make it really easy to get started.   Hope this helps! Let me know how you get on with your bot.Other useful resourcesJames Mann's YouTube video - Creating an intelligent FAQ bot with QnAMakerDialog

Previous
Previous

Using Microsoft Teams in your next project

Next
Next

Office 365 Planner is here ... and it's awesome!