/Solution-Starter-Kit-Communication-2020

Materials for the Call for Code 2020 solution starter kit for crisis communication in the context of COVID-19.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

COVID Crisis Communications Starter Kit

This solution starter was created by technologists from IBM. Translations are available: JP

Authors

Contents

  1. Overview
  2. Video
  3. The idea
  4. How it works
  5. Diagrams
  6. Documents
  7. Datasets
  8. Technology
  9. Getting started
  10. Resources
  11. License

Overview

What's the problem?

In times of crisis, communications systems are often overwhelmed with people trying to find basic information about testing, symptoms, community response, and other resources. When communication lines get clogged, people who need real help can't get through. Chatbots help respond to tens, even hundreds, of thousands of messages a day.

How can technology help ?

Whether via text, phone, websites, or communication apps, conversing with chatbots and other AI-enabled resources can play a critical role in helping communities quickly understand crucial information and free up customer service resources to focus on higher-level issues.

IBM Watson Assistant service helps you build, train, and deploy conversational interactions into any application, device, or channel. Creating a chatbot using Watson Assistant can help address the issues that our users face while trying to gather accurate, relevant information. Whether you're trying to learn the latest news about Covid-19 or learn where there's testing in your area, a chatbot can play a major role in helping communities quickly understand crucial information and free up customer service resources to focus on higher-level issues.

Video

Call for Code Solution Starter: Water sustainability in the context of climate change

The idea

COVID-19 has citizens looking for answers about symptoms and testing sites as well as current status of schools, transportation, and other public services. Using Watson Assistant, this Call for Code Starter Kit has designed a virtual assistant pre-loaded to understand and respond to common questions about COVID-19, scan COVID-19 news articles using Watson Discovery and respond to COVID statistics inquires with data from trusted sources.

With this Watson Assistant powered Crisis Communications Starter Kit you can integrate a chatbot into your Call for Code solution in an IBM Cloud hosted web server, using a Slack integration or via a Node-RED Dashboard. 

It can:

  • Respond by sharing consistent, accurate COVID-19 information
  • Help citizens quickly and easily access the latest information through their channel of choice – voice, text or collaborative tool
  • Free valuable resources by automating answers to common COVID-19 questions
  • Dynamically update information with the latest developments and recommendations

The challenge for you is to build out from this framework to create a more complete solution.

How it works

Diagrams

Website integration with COVID-19 crisis communication chatbot

Crisis Comms Architecture diagram

  1. User visits a website with the COVID-19 chatbot and asks a question.
  2. Node.js web server calls the Watson Assistant service hosted in IBM Cloud.
  3. Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user question.
  4. Source COVID-19 FAQ information from trusted CDC data.
  5. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  6. IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
  7. Watson Discovery scans news articles and responds with relevant articles.
  8. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  9. IBM Cloud Function calls the COVID-19 API to get statistics.
  10. Watson Assistant replies to the user inquiry.
  11. Node.js web server displays the chat answer to the user.

Slack integration with COVID-19 crisis communication chatbot

Crisis Comms Architecture diagram

  1. User invokes a COVID-19 Slack integration chatbot app and asks a question.
  2. Slack app calls the Watson Assistant service hosted in IBM Cloud.
  3. Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user question.
  4. Source COVID-19 FAQ information from trusted CDC data
  5. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  6. IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
  7. Watson Discovery scans news articles and responds with relevant articles.
  8. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  9. IBM Cloud Function calls the COVID-19 API to get statistics.
  10. Watson Assistant replies to the Slack application.
  11. Slack app displays the chat answer to the user.

Voice enabled COVID-19 crisis communication chatbot using Node-RED

Crisis Comms Architecture diagram

  1. User visits a voice-enabled Node-RED website with the COVID-19 chatbot and asks a question.
  2. Node-RED records the speech wav file and calls the Watson Speech to Text service hosted in IBM Cloud.
  3. Watson Speech to Text uses machine learning to decode the user's speech.
  4. Watson Speech to Text replies with a transcript of the COVID-19 question and Node-RED calls Watson Assistant service hosted in IBM Cloud.
  5. Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user's question.
  6. Source COVID-19 FAQ information from trusted CDC data
  7. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  8. IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
  9. Watson Discovery scans news articles and responds with relevant articles.
  10. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  11. IBM Cloud Function calls the COVID-19 API to get statistics.
  12. Watson Assistant replies to the user inquiry and Node-RED sends the text transcript to Watson Text to Speech.
  13. Watson Text to Speech encodes the message in the user's language.
  14. Node-RED plays the chat answer wav file to the user.
  15. User listens to the chat answer.

Documents

Trusted sources for COVID-19 information

Tutorials and documentation:

Datasets

Technology

IBM technology

Open source technology

Getting started

Prerequisite

Set up an instance of Watson Assistant

Log in to IBM Cloud and provision a Watson Assistant instance.

Step 1. From the IBM Cloud catalog, provision an an instance of Watson Assistant. Watson Assistant Catalog

Step 2. Launch the Watson Assistant service.

Step 3. Click Create assistant and follow these detailed instructions for how to create an assistant. Watson Assistant Photo2

Step 4. Name the Watson Assistant instance COVID Crisis Communication Watson Assistant Photo3

Step 5. Click Add Dialog skill to add this to your assistant. Follow the documentation if you have questions. Watson Assistant Photo4

Step 6. Click Import skill > Choose JSON file and import the skill-CDC-COVID-FAQ.json file. Watson Assistant Photo5

Step 7. Go back to the All Assistants page. From the action menu ( ), open Settings. Watson Assistant Photo6

Step 8. On the Settings tab, click API Details on the left and make a note of the Assistant ID and Api Key for future use. Watson Assistant Photo7

Step 9. Go back to the All Assistants page and click on the Skills link. Watson Assistant Skills

Step 10. On the Skill page, click on the action menu ( ), open View API Details. Watson Assistant Skill Properties

Step 11. On the Skill Details page, make note of the Skill ID for future use. Watson Assistant Skill Details

Step 12. Go back to your dialog skill and click on the Preview Link button on the side to get a link to test and verify your assistant. Watson Assistant Photo9

Step 13. Ask the Watson Assistant chatbot some questions about COVID-19.

Connect your chatbot to data sources via a webhook

Now that you’ve created your Watson Assistant-enabled chatbot, you need to connect it to a data source. With Watson Assistant, you need to do this via a webhook.

A webhook is a mechanism that allows you to call out to an external program based on something happening in your program. When used in a dialog skill, a webhook is triggered when the assistant processes a node that has a webhook enabled. The webhook collects data that you specify or that you collect from the user during the conversation and save in context variables. It sends the data as part of a HTTP POST request to the URL that you specify as part of your webhook definition. The URL that receives the webhook is the listener. It performs a predefined action using the information that you pass to it as specified in the webhook definition, and can optionally return a response.

Follow these instructions for setting up webhook with the Watson Assistant chatbot you just provisioned.

Integrate your COVID-19 chatbot with Slack

Now that you have a functioning Watson Assistant, let's deploy it to Slack. Slack is a cloud-based messaging application that helps people collaborate with one another. After you configure a dialog skill and add it to an assistant, you can integrate the assistant with Slack.

When integrated, depending on the events that you configure the assistant to support, your assistant can respond to questions that are asked in direct messages or in channels where the assistant is directly mentioned.

Read these instructions to learn how to integrate your COVID-19 chatbot with Slack.

Slack Gif

Integrate your COVID-19 chatbot with Node-RED

Want to create a voice-enabled chatbot? This tutorial teaches you how to create a voice enabled chatbot using Node-RED and the Watson Assistant, Watson Speech to Text, and Watson Text to Speech nodes.

Embed your COVID-19 chatbot on a Node.js website

Finally, you can embed your COVID-19 crisis communication chatbot on a Node.js website.

Disclosures

This tool is intended to provide information based on currently available CDC and other public information to help you make decisions about seeking appropriate medical care. This system is not intended for the diagnosis or treatment of disease or other conditions, including COVID-19, and you should not provide any personally identifying or private health information.

This Watson Assistant bot is populated with data that is sourced from the following resources:

License

This solution starter is made available under the Apache 2 License.