As natural language processing (NLP) technology and chatbot systems over the past few years have evolved quickly, also the usefulness of chatbots has increased. The motivation of chatbots is productivity; they have an instant access to information they refer to and are efficient in assisting users. (Brandtzaeg, 2017, Why people use chatbots. COVID-19 chatbot is an excellent use case example for the technology.
The content of a chatbot consists of the personality, conversation flows and the information it can deliver to the user. Personality is created by interactions and responses and by acting differently in different situations. These responses should be designed so that it maximises the engagement between the bot and the user (Katz, 2019, The Ultimate Guide to chatbot personality, Chatbots Magazine). The COVID-19 chatbot described here aims to use these principles, however due to the efforts required, in a rather minimalistic way leaving plenty of room for future improvements. e.g. in the area of how to handle chitchat.
The COVID-19 data format chosen here is defined by (https://api.rootnet.in/covid19-in/stats/history), which provides COVID-19 data freely for developers.
The conversation is initiated by the end-user. The user starts with a greeting "hi" , "hey" etc. The bot responds with the list that user can ask to bot. if user chooses option 1. The bot asks for the state name. When user enters the state name , the bot replies with the details for cases.
Chatbot's Intro Interface:
Chatbot's Chat Interface:
Chatbot's Tracker Interface:
Deployed Chatbot's Telegram interface:
Installation assumes existing installation of miniconda or anaconda. https://www.anaconda.com/
Below are the simple steps for creating a virtual environment, install pip3 and Rasa Open Source 2.0.
conda create -n RasaEnv python=3.7.6
conda activate RasaEnv
conda install -c anaconda pip3
pip3 install rasa==2.8.11
In case of issue, please refer to Rasa Open Source installation pages: https://rasa.com/docs/rasa/installation/
mkdir rasa
cd rasa
rasa init --no-prompt
This will create a new directlry, under which rasa creates all necessary directories and files.
Replace all files in the rasa directory with the files in the project.
Train the model with command
rasa train
There are additional actions that need to be started before starting the bot evaluation. These are in actions.py
file. To do so, run below commands on two different terminals:
rasa run actions
Start the discussion with rasabot:
rasa shell
Terminal 1(starting ngrok on default port of rasa 5005):
ngrok http 5005
copy paste the url in the credentials file.
Terminal 2(start bot):
rasa run
Terminal 3(start actions file):
rasa run actions
Now just go to "Covid-bot-Aazim" on telegram and start using!
- Rasa. (n.d.). Rasa: Open source conversational AI. URL: https://rasa.com