Start Presentation

Chat Bots on Azure

Working with Microsoft QnA Maker + Bot Framework

By Kyle Mitofsky, Principle Developer at Vermont Department of Health

@KyleMitBTV

Recording - 7/16/20

youtube thumbnail


Overview


Acknowledgements


Chat Bot Demo


Demo Sites


Technology Stack


QnA Maker


QnA Maker GUI

QnA Maker GUI


QnA Maker Data

{
    "id": 4534,
    "answer": "**What are the symptoms of COVID-19?**\n\nPeople with COVID-19 have had a wide range of symptoms reported – ranging from mild symptoms to severe illness. Symptoms may appear 2 to 14 days after exposure to the virus. ...",
    "source": "KB-COVID",
    "questions": [
        "What are the symptoms of COVID-19?",
        "How can I tell if I have Covid-19?",
        "what symptoms should I look for",
    ],
    "metadata": [
        {"name": "category","value": "symptoms and sickness"},
        {"name": "subcategory","value": "symptoms"},
    ],
}

Qna Maker API


Bot Framework

Create a bot with the ability to speak, listen, understand, and learn from your users with Azure Cognitive Services.


Bot Channels


Bot Framework Web Chat


FAQ Site


Eleventy


Structured Data

Use FAQ Structured Data

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": " What are the symptoms of COVID-19?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "People with COVID-19 have had a wide range of symptoms reported – ranging from mild symptoms to severe illness. Symptoms may appear 2 to 14 days after exposure to the virus. Not everyone infected with the COVID-19 virus has symptoms. People with these symptoms may have COVID-19:"
      }
    }
  ]
}

Triage & Training


Application Insights

traces
| where message contains "GenerateAnswer"
| extend input = tostring(customDimensions.Question),
        answer = tostring(customDimensions.Answer),
        scoreInt = toint(round(todouble(customDimensions.Score))),
        convoId = substring(itemId, 0, 7)

Pricing

Service Test Prod Total
Azure Cognitive Search F - $0/mo B - $75/mo $75/mo
App Services Plan D1 - $9.50/mo S1 - $73/mo $82/mo
Cognitive Services F0 - $0/mo S0 - $10/mo $10/mo
Bot Services F0 - $0/mo S1 - $.50/1k msg $6/mo
Total $9/mo $164/mo $174/mo

Lessons Learned


Lesson #1

Plan a lot of time for training


Lesson #2

Get content authors involved early


Tips & Tricks


Tip #1

Problem: Multi-authoring editing is still difficult

Solution: Use MS Teams / IM to manage authoring


Tip #2

Problem: Question order isn't deterministic

Solution: Repeat question wording in answer


Tip #3

Problem: IDs are lossy during publish

Solution: Use API and lots of logic


Demo

  1. Create Knowledge Base - https://www.qnamaker.ai/
  2. Add chitchat + question
  3. Test / Train
  4. Publish
  5. Create Bot
  6. Embed Bot

Resources


Chat Bot Presentation ⭐ <-- you are here

docgov.dev/slides/chat-bot/

Covid Bot Repo

VermontDepartmentofHealth.github.io/covid-bot/


Community Resources


Thank You!