College Enquiry Chatbot Using Rasa Framework
College Enquiry Chatbot Using Rasa Framework
Abstract—The growth of technologies like Artificial Contextual AI Chatbot [5], [6]. It is known to have
2021 Asian Conference on Innovation in Technology (ASIANCON) | 978-1-7281-8402-9/21/$31.00 ©2021 IEEE | DOI: 10.1109/ASIANCON51346.2021.9544650
Intelligence (AI), Big Data & Internet of Things (IoT), etc. has significant effect on chatbots and contextual assistants. Rasa
marked many advancements in the technological world since makes the chatbot more dynamic as compared to the
the last decade. These technologies have a wide range of conventional chatbot as it can understand the user’s input and
applications. One such application is “Chatterbot or data over a wider domain as compared to the conventional
“Chatbot”. Chatbots are conversational AIs, which mimics the chatbot [5]. Since, it requires less dataset as compared to
human while conversing & eliminates the need of human by conventional chatbot the model will take less time to train
automating mundane tasks. In the study undertaken, we have itself, hence reducing the system complexity.
created a chatbot in education domain & it is named as
“College Enquiry Chatbot”. This chatbot is a web-based Rasa framework develops chat-bot with artificial
application that analyses and understands user’s queries and intelligence and has capability to train itself with very less
provides an instant and accurate response. Rasa technology is data. Rasa being open-sourced, gives user the scope to
used to construct this chatbot. It’s an open-source technology, customize things according to their needs. Such chatbots can
which uses its two main packages i.e., Rasa Core & Rasa have multiple integrations and can connect number of data
Natural Language Understanding (NLU) in order to build a sources at a time [7].
Contextual AI Chatbot. NLU is used to infer the intent and to
extract the necessary entities from user input & the Rasa Core
provides the output by building a probabilistic model with the II. LITERATURE SURVEY
help of Recurrent Neural Network (RNN). Evaluation of the For the study undertaken we reviewed some papers &
model is done by getting a confusion matrix and performance have presented them as follow: Introduction of pair of open-
measures like Precision, Accuracy & F1 Score which come out source python libraries which are Rasa NLU & Rasa Core,
to be 0.628, 0.725 and 0.669 respectively on average basis. This which can be used to build conversational agents is presented
chatbot’s accuracy, lack of dependability on human resources,
in this paper [8]. They curated these libraries so that any
24 x 7 accessibility and low maintenance creates various
person with minimal knowledge of programming can
opportunities for its implementation. This conversational agent
can not only be used in educational institutions but also in
develop a chatbot. They also demonstrated their ‘probability
places where enquiry becomes a tedious task. of selecting action’ part of Rasa Core by asking it some
questions. These libraries are still under active development
Keywords—Chatbot, AI, Rasa, Rasa NLU, Rasa Core, NLP, & support for reinforcement learning, making NLU robust to
Web Application, Enquiry Chatbot typos and slang, and supporting more languages are some of
the topics under development.
I. INTRODUCTION A chatbot is developed is developed by the authors D.
Chatbots are software-based applications with embedded Prakash [9] which collects data related to student’s
knowledge, that aids in stimulating conversations with attendance & marks. This chatbot was created using Rasa
human users via textual or auditory methods [1-3]. platform & user interface is developed using Django. This
Extending Applications of Chatbots to domains like helper bot is trained to answers queries pertaining to
education has become the need of the hour in today’s fast- student’s academic performance & attendance. This bot
growing era of technological world [4]. Today, institutes provides good accuracy with queries related to student’s
have started designing their own enquiry bots to automate marks & attendance, but the queries outside this aren’t
their conversations with the students. These chatbots act as a answered with great accuracy. The efficiency of this chatbot
campus guide by helping the users find an accurate response can be increased by training it using some complex data &
to their queries. feature like voice recognition can also be implemented.
This paper is based on College enquiry chatbot built In [10], a functional framework has been designed for a
using Rasa Framework, made with an objective of helping chatbot, which integrates Rasa NLU & neural networks.
students with their admission related queries. RASA is an Intent Recognition & entity extraction is implemented in this
open-source technology, that uses packages like RASA Core system. The system is developed using two different
& Rasa Natural Language Understanding (NLU) to build a methods, by Rasa NLU & Neural Networks (RNN). This
2
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap
Fig. 5. Stories
IV. RESULT
A. Data Validation
Validating our training data makes sure that there are no
errors or major inconsistencies in our domain, NLU, or story
data. If data validation shows any kind of error, training the
model will also result in a failure or it may yield a bad
performance, so it’s a good practice to run this check before
Fig. 7. Domain-Responses training our model. For our domain the data validation does
not result in any kind of conflicts or inconsistencies in NLU
D. Deploying the chatbot using socketio and Story data (as shown in Fig. 11), hence we are ready to
Firstly, we create a webpage where we would like to run train our final model.
our chatbot using basic html and css code, then we would
configure the credentials.yml file (as shown in Fig. 8) to B. Confidence Level
activate the socketio channel by defining its credentials i.e., Rasa uses this technique of classifying the intent behind
the user and bot message events along with the session the message based on the confidence level rank i.e., the
persistence status. Then we need to include a <script> tag (as intent which gets the highest confidence level (on a scale of 0
shown in Fig. 9) in our html file of our web page, we need to to1) is ranked first for that particular message and is chosen
call an api inside this script tag to include Rasa-webchat to be the predicted intent, where 0 is for least confident value
which is a feature-rich chat widget to deploy virtual and 1 is for most confident value. The confidence score
assistants made with Rasa on any website. Then we need to entirely depends on the type of training data that we have
run our local Rasa server and pass on the port number of this provided in the NLU dataset i.e., larger the training dataset
Rasa server to socket URL section inside the script tag so provided to each intent, the more confidently the model
that our Rasa server gets connected to socketio endpoint each would be able to identify or classify the said intent from the
time we open our webpage. Finally, the chat bot appears on user’s message with greater accuracy. For our model we are
our web page and we are ready to chat with our bot (refer getting an average confidence score between 0.98-0.99
Fig. 10). which clearly states that
Fig. 8. Credentials.yml
3
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap
Fig. 11. Data Validation
4
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap
Fig. 13. Intent Confusion Matrix
the model is confident enough to predict the said intent from the slots being filled up diagonally, which signifies that the
the user’s message (refer Table. 1). model has a true prediction for that particular intent. Similar
is the case for our trained model which shows that our model
C. NLU & Core Test has predicted all the intents accurately without any confusion
Using “rasa test” command inside the CLI gives us the and the diagonal values represent the total number of
provision to run the tests on NLU and Core data of our samples that it has predicted correctly for that particular
model and helps us to visualize our trained model in the form intent. The intent histogram in Fig. 15 allows us to visualize
of confusion matrix and histograms. The intent confusion the confidence level against all the predictions from the
matrix in Fig. 13 shows us that which intents are mis- training samples. The correct and incorrect predictions are
understood for others, if all the intents are mapped or shown by blue and red bars respectively.
predicted correctly then the matrix would have resulted in all
5
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap
Fig. 14. Story Confusion Matrix
6
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap
Fig. 16. Report Log (Testing Data)
7
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap
V. CONCLUSION [3] K. Deepika, V. Tilekya, J. Mamatha and T. Subetha, "Jollity Chatbot-
A contextual AI Assistant," 2020 Third International Conference on
The College Enquiry Chatbot, developed using Rasa, Smart Systems and Inventive Technology (ICSSIT), 2020, pp. 1196-
which being an open-sourced framework gives great 1200, doi: 10.1109/ICSSIT48917.2020.9214076.
functionalities and NLP toolbox through its Rasa stack. By [4] H. Gawade, V. Patil, P. Vishe and S. Kolpe, “College Enquiry Chat-
easing the task of deployment and server creation, it helps to Bot System,” International Journal of Engineering Research &
Technology, vol. 9, no. 9, pp. 741-742, September 2020, doi:
focus, improve and add various functionalities in Chatbot, so http://dx.doi.org/10.17577/IJERTV9IS090396
that it becomes complete and more intuitive to use. Using
[5] M. Joshi and R. K. Sharma, “An Analytical Study and Review of
appropriate set up, we can very well do the job of intent Open Source Chatbot Framework,” International Journal of
extraction and keep the user involved in the conversation by Engineering Research & Technology (IJERT), vol. 09, no. 06, June
the dialogue management even with less data. Using this 2020. [Online]. Available: https://www.ijert.org/an-analytical-study-
chatbot will not only benefit the students to solve their query and-review-of-open-source-chatbot-framework-rasa
but also the institution to offer courses in demand, know [6] J. Shabbir, M. U. Arshad and W. Shahzad, “NUBOT: Embedded
current trends and manage intake seats accordingly. Addition Knowledge Graph With RASA Framework for Generating Semantic
Intents Responses in Roman Urdu,” February 2021. [Online].
of new questionnaires after failure of chatbot to respond it Available: https://arxiv.org/pdf/2102.10410.pdf
correctly will ensure it updating in database and can answer [7] A. Jiao, “An Intelligent Chatbot System Based on Entity Extraction
it through notification or as and when asked in future. Using RASA NLU and Neural Network,” IOP Conf. Series: Journal
Moreover, a problem rarely faced by chatbot with a ‘person of Physics: Conf. Series, 2020, doi:10.1088/1742-
with disability’ (PwD) can choose to type or speak according 6596/1487/1/012014
to their dormant ability with the addition of feature such as [8] T. Bocklisch, J. Faulkner, N. Pawlowski and A. Nichol, “Rasa: Open
Voice recognition. Many a times aspirants which are from Source Language Understanding and Dialogue Management,”
December 2017. [Online]. Available:
different parts of country and don’t understand English, https://arxiv.org/abs/1712.05181
Multi lingual feature can be introduced. Hence this chatbot [9] D. Prakash, B. Mahesh, H. N. Mohammed Azharuddin, G. Namratha
could find its place in many institutions because of its and J. Madhura, “Chatbot in Education System,” International Journal
accuracy, lack of dependability on human resources, 24x7 of Engineering Science and Computing, vol. 9, no. 5, pp. 21926-
accessibility and low maintenance. 21929, May 2019.
[10] K. Bhaskar, “Conversational AI chatbot using Rasa NLU & Rasa
Core: How Dialogue Handling with Rasa Core can use LSTM by
REFERENCES using Supervised and Reinforcement Learning Algorithm,” Medium,
[1] S. Pawar, O. Rane, O. Wankhade and P. Mehta, “A Web Based Accessed: 10 May, 2021. [Online]. Available:
College Enquiry Chatbot with Results,” International Journal of https://medium.com/@BhashkarKunal/conversational-ai-chatbot-
Innovative Research in Science, Engineering and Technology, vol. 7, using-rasa-nlu-rasa-core-how-dialogue-handling-with-rasa-core-can-
no. 4, pp. 3874-3880, April 2018. use-331e7024f733.
[2] S. Punith, B. Chaitra, V. Kotagi and R. M. Chethana, “Research Paper [11] Abdellatif, K. Badran, D. Costa and E. Shihab, "A Comparison of
on Chatbot for Student Admission Enquiry,” Journal of Advancement Natural Language Understanding Platforms for Chatbots in Software
in Software Engineering and Testing”, vol. 3, no. 1, pp. 1-9, 2020. Engineering," in IEEE Transactions on Software Engineering, doi:
10.1109/TSE.2021.3078384.
8
orized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on February 07,2025 at 04:33:51 UTC from IEEE Xplore. Restrictions ap