This solution starter was created by technologists from IBM. Translations are available: JP
- Donna Byron - IBM
- John Walicki - IBM
- Matt Price - IBM
- Mofizur Rahman - IBM
- Pooja Mistry - IBM
- Upkar Lidder - IBM
- Overview
- Video
- The idea
- How it works
- Diagrams
- Documents
- Datasets
- Technology
- Getting started
- Resources
- License
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.
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.
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.
- User visits a website with the COVID-19 chatbot and asks a question.
- Node.js web server calls the Watson Assistant service hosted in IBM Cloud.
- Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user question.
- Source COVID-19 FAQ information from trusted CDC data.
- Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
- IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
- Watson Discovery scans news articles and responds with relevant articles.
- Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
- IBM Cloud Function calls the COVID-19 API to get statistics.
- Watson Assistant replies to the user inquiry.
- Node.js web server displays the chat answer to the user.
- User invokes a COVID-19 Slack integration chatbot app and asks a question.
- Slack app calls the Watson Assistant service hosted in IBM Cloud.
- Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user question.
- Source COVID-19 FAQ information from trusted CDC data
- Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
- IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
- Watson Discovery scans news articles and responds with relevant articles.
- Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
- IBM Cloud Function calls the COVID-19 API to get statistics.
- Watson Assistant replies to the Slack application.
- Slack app displays the chat answer to the user.
- User visits a voice-enabled Node-RED website with the COVID-19 chatbot and asks a question.
- Node-RED records the speech wav file and calls the Watson Speech to Text service hosted in IBM Cloud.
- Watson Speech to Text uses machine learning to decode the user's speech.
- Watson Speech to Text replies with a transcript of the COVID-19 question and Node-RED calls Watson Assistant service hosted in IBM Cloud.
- Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user's question.
- Source COVID-19 FAQ information from trusted CDC data
- Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
- IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
- Watson Discovery scans news articles and responds with relevant articles.
- Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
- IBM Cloud Function calls the COVID-19 API to get statistics.
- Watson Assistant replies to the user inquiry and Node-RED sends the text transcript to Watson Text to Speech.
- Watson Text to Speech encodes the message in the user's language.
- Node-RED plays the chat answer wav file to the user.
- User listens to the chat answer.
- How-to guides for chatbots
- Learning path: Getting started with Watson Assistant
- Chatbot with Watson Discovery
- Chat Bot Slack Deployment
- Node-RED Slack Integration
- Train a speech-to-text model
- Making Programmatic Calls from Watson Assistant
- IBM Cloud Voice Agent with Twilio
- Watson Assistant
- IBM Watson Assistant
- Watson Discovery
- Watson Speech to Text
- Watson Text to Speech
- IBM Cloud Functions
- Register for an IBM Cloud account.
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.
Step 2. Launch the Watson Assistant service.
Step 3. Click Create assistant and follow these detailed instructions for how to create an assistant.
Step 4. Name the Watson Assistant instance COVID Crisis Communication
Step 5. Click Add Dialog skill to add this to your assistant. Follow the documentation if you have questions.
Step 6. Click Import skill > Choose JSON file and import the skill-CDC-COVID-FAQ.json
file.
Step 7. Go back to the All Assistants page. From the action menu ( ⋮
), open Settings.
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.
Step 9. Go back to the All Assistants page and click on the Skills link.
Step 10. On the Skill page, click on the action menu ( ⋮
), open View API Details.
Step 11. On the Skill Details page, make note of the Skill ID
for future use.
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.
Step 13. Ask the Watson Assistant chatbot some questions about COVID-19.
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.
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.
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.
Finally, you can embed your COVID-19 crisis communication chatbot on a Node.js website.
- Follow the COVID-Simple installation instructions
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:
- Most static responses provide information found on the CDC's COVID FAQ Page: https://www.cdc.gov/coronavirus/2019-ncov/faq.html
- Dynamic infection and death counts are sourced from Johns Hopkins University via the following API: https://www.covid19api.com/
- Dynamic news stories are sourced from Watson Discovery's news feed. Additional information on that service can be found here: https://www.ibm.com/watson/services/discovery-news/
This solution starter is made available under the Apache 2 License.