Ref 4
Ref 4
Ref 4
Abstract— Chatbot is a software application that can whenever you need it. There are two different tasks that takes
stimulate a conversation via text, instead of direct contact with place at the core of a chatbot:
a live human through messaging applications, websites and
mobile applications. Chatbot applications help to make 1)User request analysis: The first task that user request
interactions between people and services by enhancing the analysis performs is to analyses the user’s request to identify
customer experience. Chatbot is widely used in the areas of the user intent and to extract relevant entities from the given
food ordering, ecommerce and transportation, etc. Practically input by the user’s.
it is not possible to find a permanent companion to make us
2)Returning the response: After the user intent is identified
happy all the time. Hence, this paper has planned to design a
then chatbot must provide the most accurate response for the
jollity chatbot to talk with the human users and make sure that
it entertains and give suggestion and motivation in tough times.
user’s requests.
The jollity chatbot is implemented in Rasa, an open-source In general, there are two types of chatbot such as retrieval
conversational AI framework an d it is easy to customize. The based model and generative-based model [2]. Retrieval-
proposed method has added 12 intents with each more than 8 based models [3] (easier) retrieves the responses from a
text examples constituting a total of 100 input samples in predefined response repository or it uses some heuristic ru les
nlu.md and their response in domain.yml . The flow of
to dig out the correct response depending on our input and
interactions is given in stories.md. The jollity chatbot is the context. The heuristic can be either some machine
deployed in Telegram using ngrok and the server URL details
and the access token are given in the credentials.yml. The
learning algorithms or some rule-based classifier. In contrast
system is experimented with various evaluation measures like
generative based model chatbot [4] doesn’t use any
accuracy of the intents, accuracy of the stories and the predefined repository. This contextual AI Assistant is more
confusion matrix to shows that the proposed jollity chatbot advanced and found to be effective. The reason is it
system is more robust and can identify the user intents understands everything from the beginning using Deep
appropriately. learning. Th is adapts the knowledge fro m machine
translation. In machine translation we will translate an input
which is one language to another language whereas chatbot
Keywords—Chatbot, Contextual AI Assistant, Rasa, Rasa NLU, will translate fro m intent classification to response. The
Rasa Core overall flowchart of chatbot is shown in Figure 1.
Authorized licensed use limited to: University of Glasgow. Downloaded on November 01,2020 at 02:35:31 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1
wide range community whereas our chatbot focuses on only Kataria et. al[12] generated a user adaptive chatbot that can
one kind of co mmunity i.e. depressed people. Many chat engagingly with user mit igating the depression of the
depressed people need psychology sessions which are not user.
affordable by a middle class or lower middle class this
chatbots helps this people in their low t imes without costing III. PROPOSED JOLLIT Y CHAT BOT
them a penny. So this chatbot is designed in such a way that The main aim of the jo llity chatbot is to confer with people
it consoles the affected person with the appropriate messages
and help them by suggesting articles, videos and images.
and comforts them with the positive messages like positive
Most of the chatbots are retrieval-based models but the
quotes, motivational videos, and humour videos depending
jollity chatbot is generative based. The jollity chatbot
upon the mood of the user. Initially we have prepared all
possible intents the user might be looking for and the understands the flow of the interaction and can ease the pain
corresponding answers. The system is also trained with more of the user by giving appropriate or exact results to the user.
than ten stories to make the system learn about the user flow In general, chatbots there might not be NLU processing but
of interactions. The developed jollity in our chatbot NLU take cares of spelling mistake and g ives
the most exact result to the user. The follo wing steps shows
The paper is organized as follows. Section II describes how it is done.
about the allied works carried out in chatbots. Section III •Providing instant replay when they want to talk to someone
describes about the proposed jollity chatbot. Section IV during their tough times.
depicts about experimental results followed by the •To engage the users with some fun videos and s ongs.
conclusion in Section V.
•To create a virtual friend for the users.
II. RELATED WORKS •To create interactive interface for the user.
In NLU Training data both the intent and sentences are
The chatbot developed in earlier days maintains a simp le added. For example, sentences like I am feeling stressed, I
conversational flow with the users in a simp le request and am stressed are grouped under the intent stress. So, if a user
response flow. As the research progresses, the recent says, “I am feeling stressed”, or “I am stressed”, Here, the
chatbots can understand the context of the users and the intent would be “stress”. Any Verbs in a sentence is an
flow of interactions and give the appropriate responses. intent. Once the system analyzes the user’s input, the system
Various chatbots developed for handling the people’s must reply to the user. The bot responds to the user by
psychological problems and other chatbots developed using fetching out the appropriate responses. This can be done by
Rasa are discussed in this section. creating more stories in stories.md. In stories, the actions to
Gillian et.al [6] outlined a chatbot for dig ital counselling. be performed by the bot is specified and this helps the bot to
They have suggested that utilization of chatbot enables retrieve appropriate messages back to the user. Stories are
better user interactions and they can talk anytime and sample interaction between the user and bot, defined in terms
anywhere. They have only developed the prototype and of intents captured and actions performed. So, the developer
haven’t started the implementation. can mention what to do if you get a user input of some intent
Bhuvan et. al [7] designed a therapy chatbot that can furnish with/without some entities. The universe in which your
the details regarding the health in formation. The authors assistant operates is called domain. It specifies the list of all
the intents, entities, slots and actions. It also includes
highlighted the advantages of having a therapy chatbot
responses for the things the bot can say. The final
which can alleviate the pain of a person remotely. They also
deployment details are in the credential file. The credential
give a prototype of how the system has to be developed. and token details are stored in this file and this can be used to
Anran Jio[8] developed a chatbot using Rasa for checking deploy the bot on apps like Telegram, facebook, etc,. During
the finance status. The system can identify the user request deployment, ngrok[13] is used as a testing tool. The
and fetch the appropriate response related to finance. The developed jollity chatbot is deployed in Telegram using
system shows better performance than RNN and it is ngrok. The overall samp le flow of the jollity chatbot for the
deployed in wechat. single intent stress is shown in Figure 2.
Falguni et. al [9] developed a chatbot that classifies the text
into emotion labels and categorise the stress level using the
emotion classification. The text are trained using three
different classifiers such as convolutional neural network
(CNN), hierarchical attention network (HAN), recurrent
neural network (RNN). But the system fails in providing the
positive messages.
Delahunty et. al [10] designed a chatbot that can have
conversation with the users and uses machine learning
classifier to identify the depression level of the user and
supports the user. This paper suggests that the further
development of these bots in real-t ime can help users in
many ways.
Fulmer et.al [11] conducted web-based survey and obtained
the depressed students list. These students were given access
to Tess, a conversational chatbot and analyzed the results
after the program. The cost-effective chatbot provides a
better solution compared to the costly therapeutic sessions. Figure 3: Sample flow of Jollity chatbot
Authorized licensed use limited to: University of Glasgow. Downloaded on November 01,2020 at 02:35:31 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1
Stories Module:
Stories are form of training data which are used to train the
rasa core dialogue management models. It represents an
actual conversation between user and the bot and the stories
file is given in Figure 6.
Authorized licensed use limited to: University of Glasgow. Downloaded on November 01,2020 at 02:35:31 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1
Figure 8: ngrok
Credentials Module:
Figure 9: Botfather
Deployment Module:
There are d ifferent messenger platforms to deploy our
chatbot such as slack, Facebook Messenger, Rocket Chat,
Telegram and Google Hangouts etc. We choose Telegram to
deploy our project as it is one of the popular IM p latforms
today which allows users to store messages on cloud instead Figure 10: Jollity chatbot
on just their devices. Building a chatbot in Telegram is
simp le and requires litt le t ime and very few steps to IV. EXPERIMENT AL RESULT S
complete. The proposed jollity chatbot is imp lemented in Rasa X. The
To deploy our bot on Telegram, a new bot is created using *developed chatbot is deployed in Telegram using botfather
BotFather [14]. Ng rok is an application that gives external and ngrok. Various evaluation measures like intent
access to our private system that are behind NAT or a accuracy, story accuracy and confusion matrix are used to
Firewall. A secure tunnel along with the public u rl is created evaluate the robustness of the system. The nu mber o f
on our local machine by using the tool Ng rok as shown in intents correctly identified by the system is given in
Figure 7. The file credentials.yml as shown in Figure 8 that equation 1.
contains credentials to make our bot available on messaging
platforms. In credential.y ml we have access token which we (1)
have request fro m our BotFather as shown in Figure 9 to
control the bot and the developed chatbot is shown in Figure The number of correct flo w of interaction identified by the
10. It takes 0.01 seconds for the jollity bot to respond to the
system is given in equation 2.
user input in telegram.
(2)
Authorized licensed use limited to: University of Glasgow. Downloaded on November 01,2020 at 02:35:31 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1
Authorized licensed use limited to: University of Glasgow. Downloaded on November 01,2020 at 02:35:31 UTC from IEEE Xplore. Restrictions apply.