Intelligent Bot 2022
Intelligent Bot 2022
net/publication/359166891
An Intelligent College Enquiry Bot using NLP and Deep Learning based
techniques
CITATIONS READS
2 536
7 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Vijaya Saraswathi Redrowthu on 17 March 2022.
Abstract— Every year freshers and their parents do visit The Aim of taking up this project is to provide a chat-
our college website in order to get their queries clarified. Also, bot system that deals with academic activities like
college students do visit the website in order to get their queries inquiring about admissions, fees structure, getting details of
resolved. Thus we felt the need for an ‘Intelligent Enquiry Bot’ departments, etc. And using this chat-bot system, the
to be associated with the official college website. The Bot freshers, students and faculty can directly clear their
should be intelligent enough to resolve the queries of freshers, queries in lesser time.
parents, students, and faculty. The college enquiry chatbot is
designed using certain algorithms which understands and To give a roadmap of this paper, in section 1 there is an
analyzes the user queries. This System is basically a web
introduction about the paper, then it consists of literary
application that provides valid responses to the various queries
of the users, which will make use of Natural Language
survey in section 2, the methodology in section 3, followed
Processing (NLP) and Long Short Term Memory (LSTM) by the system design in section 4, implementation & testing
networks, which are a special kind of recurrent Deep Neural in section 5, later there is results & discussion in section 6
Networks (DNN). In this paper, we have completed building a and finally in section 7 there is conclusion & future scope.
quite intellegent chatbot based on NLP and DNN for basic
college-related enquiries and admission related queries II. RELATED WORK
especially.
According to Ms. Ch. Lavanya Susanna Et al. A
Keywords— Chatbot, NLP, Deep Learning, RNN, LSTM. Student chatbot project is developed with the help of a code
igniter which is widely called as a php framework. It
I. INTRODUCTION analyzes the user queries and also perceives user
messages. [1]. As per Prof. Ram Manoj Sharma Et
Chatbot is an intelligent software program that interacts al. proposal, a college enquiry chatbot system that was made
with humans[6]. A chatbot works similar to human-like using AI (Artificial Intellegence) algorithms and included
conversations on chat. Its primary task is to help users by few modules like Online chatbot, Online Noticeboards,
providing answers to their questions by understanding what
etc. [2]. P.Nikhila Et al. have collectively designed a chatbot
human wants and guides them to their desired outcome.
using AIML (Artificial Intelligence Mark-up Language) to
Nowadays, various chatbots are responsible to solve a
number of business related tasks in order to improve make a response to user queries. Here, to customize the
customer experiences across many industries like Insurance, Alice bot that could be a chat-bot application supported
E-Commerce, Banking, Healthcare, and many others[3]. Alice free code the AIML was used [3].
A Deep Learning chatbot uses Natural Language Payal Jain Et al. has built up a database that
Procesing (NLP) in order to map user inputs to some intents. consisted of all the related information and also created a
It will classify the messages to send a prepared response. web interface (UI) that has two sections. One of them was
Thus, using deep learning and natural language processing, for basic clients and another was for the admin [4].Authors
the chatbot becomes an intelligent software piece that Sagar Pawar, Omkar Rane have developed a UI for which
enables it to process, comprehend and as well response using the users have to register before accessing the chatbot. This
the natural language understanding. Usually, we use special paper [5] uses the Bigram, sentence similarity score, and
RNNs called LSTMs to build a chatbot. retrieval of the matched template to give the response. As
per Harsh Pawar Et al.[6] a chatbot was designed by them
When using NLP to develop a chatbot, the main thing using the database knowledge. Their proposed system had
one should achieve is to create a chatbot that requires very online enquiry and chatbot system. They used various
little or say no human interaction at all[1]. However, it is programming languages in development. They created a
tough to improve answers and selecting best model to user-friendly graphical user interface to send and receive
guarantee the most relevant response in the field of chatbots.
user responses. In another paper [7], chatbot designed was a
hospital appointment system whose goal was to get a A. Building Front End
doctor’s appointment. That system used a end-to-end gated We used ReactJS to build the front-end and Python as a
memory networks model, which was an end-to-end back-end. The ML-Model for chatbot was build and
supervised model with automatically learned gating incorporated into the backend. Coming to the front-end the
mechanism in order to perform dynamic regulation of the components mentioned in the hierarchy below were used to
memory interaction. build the UI for the chatbot. Moreover, the UI is also
responsive for the different screen sizes.
An artificial chatbbot proposed by Nitesh Thakur Et
al.[10] used NLP (Natural Language Processing) for making
chatbot. It could be done in two ways, namely written text
and verbal or voice communication. However, written
communication is easy than verbal communication. This
paper had some emerging capabilities for increasing the
speed, and processing in virtual human interaction systems.
Another chatbot developed by Amit Tiwari Et al. [11] made
use of artificial intellegence based algorithms to analyse
users queries and understand their message. Its answered
appropriately to the user queries. If the answers were found
to be invalid, the user just needed to select the invalid
answer button which would notify the admin about it. Fig.1 Frontend Modules Hierarchy
Admin could then access a portal to view invalid answers
and delete them or to add a specific answer to that
equivalent question. Nidhi Sharma Et al. [14] have As shown in the above “Fig. 1”, there are three main
developed a website and has three modules front end, components for the React App:
chatbot, the backend is admin login and chatbot is a college a) Header Component – which displays the college’s
enquiry bot that provides the information regarding fee name and logo as a header
structure of the different courses using NLP, pattern
matching. b) Footer Component – which displays a footer for the
webpage which usually has a copyright
In a paper,[15] Question Answering Systems were used
as information access systems in order to try to answer NLP c) Chatbot Component – which is the main component
based queries. This type of system selects the most for this project. It is further subdivided into 4 other
appropriate answers by making use of linguistic features components as mentioned below. This component is
available in the NLP techniques. A paper [16] proposed responsible for the rendering of the chatbot’s UI for the
another approach to identify the facts that are most end-users. Its sub-components are:
important in the texts. It consisted of a method to build a
chatbot which could simulate some historical figure and i. UserMessage Component – which is responsible for
which could answer all kinds of questions about the life displayingthe user queries that are entered by the user
experience of that figure. Another paper used a sentence- in the message box provided after sending to the
similarity score [17] to obtain similarity between both the chatbot
input pattern and the output pattern. This process was done
in the Relational Database Management Systems ii. BotReplyComponent – which is responsible for
(RDBMS). This chatbot consisted of a core and an interface displaying the replies of the chatbot for the queries
which is accessing that core. And the database had tables to made by the user after getting a response from the
store the knowledge, and the interpreter is a stored program backend
of function and procedure sets in order to require the
pattern matching. iii. MessageBox Component – which provides an input
box where the user can write their queries and send the
III. PROPOSED SYSTEM
message to the chatbot by clicking a send button
While building this intelligent college enquiry bot provided by the side of it.
system, we have followed the below mentioned steps.
iv. ErrorMessage Component – whichdisplays the
A. Building front-end various error messages captured in different
B. Building back-end circumstances and notifies the user about it by error
C. Creating the proposed chatbot model text.
D. Connecting the front-end to back-end
B. Building Back -end
The below is a brief discussion on each of the steps Then speaking of the backend, we have written several
followed in the mentioned methodology: methods for several specific functionalities. The below are a
few modules and their descriptions we had used in our
backend.
a) Intents Module – which is the data file containing all i. Tokenization – where it is the process of breaking
the predefined patterns and their corresponding down the complete input text (i.e., user query) into
responses. It is stored in the form of a JSON (JavaScript smaller parts i.e., words. Then we iterate through the
Object Notation) file. patterns that are provided in the intents file and then
tokenize the sentences using “nltk.word_tokenize()”
b) Preprocessing Module – which consists of the function. After that, we append every word contained
preprocessing methods in order to clean the sentences in the words list to create a classes list for the tags in
and perform NLP techniques like tokenization and the intents file.
lemmatization.
ii. Lemmatization – This is a process of converting a
c) Chatbot Training Module – which is responsible for word to its lemma (root) form. We also then create a
using preprocessing module methods to clean the data pickle file to store the python objects which we used
and split the data into train and test sets. It also involves while predicting the responses. It generally finds the
creating, training and saving the deep learning model root word from the given word.
d) Model Related Module – which is basically a wrapper c) Creating training and testing data
to help the chatbot training module to deal with the
deep learning model and perform operations on it. In it As a next step, we create the training and testing data by
there is contained the information regarding the model splitting the available data. Our input data is the patterns and
and also the weights of the neurons. output data is the classes to which the pattern belongs. As
the computer couldn’t understand textdata, we will convert
e) Chatbot Module – It can be called the main module the text into numbers.
that is responsible for connecting the chatbot to the
Flask app. It serves as a backend which receives user d) Building the deep learning model
query from UI and sends back the bot’s responses
through REST APIs. As we now have the data i.e., both training and testing
data ready, we now concentrate on building a Deep Neural
C. Creating the proposed chatbot model Network model. As far as speaking about the Deep Learning
It is basically a retrieval-based chatbot making use of model, we created a model consisting of 3 layers as follows:
technologies like NLTK, Keras, Python, etc. In order to
compile the model we used the stochastic gradient descent
(SGD) along with nesterov accelerated gradient as an
optimizer and also it gave good results for this model.
The back-end test cases are written for the API requests
being sent from UI to backend and receiving the proper
response from backend back to the UI.
V. RESULTS & DISCUSSION “Fig. 9” & “Fig. 10” represent the testing reports for the
The React UI’s Front-end and Python Back-end unit- front-end and back-end respectively.
testing reports are as follows:
The deep learning model we have used was trained to be
very accurate in returning appropriate responses to the user
queries. It almost achieved an accuracy of 99% after training
it for about 200 epochs.
ACKNOWLEDGMENT
The below “Fig. 11” consists of few plots depicting the This research was supported by VNR VJIET. We are
model’s accuracy and loss based on the training and thankful to our colleagues who provided expertise that
validation data sets. As you can see, after 200 epochs, the greatly assisted the research, although they may not agree
accuracy has been maximized whereas loss has been with all of the interpretations provided in this paper.
minimized.
REFERENCES
[1] Ms.Ch.Lavanya Susanna, R.Pratyusha, P.Swathi, P.Rishi Krishna,
V.Sai Pradeep, “College Enquiry Chatbot”, International Research
Journal of Engineering and Technology (IRJET), e-ISSN: 2395-
0056, p-ISSN: 2395- 0072, Volume: 07 Issue: 3 Mar 2020 pp 784-788
[2] Assistant Prof Ram Manoj Sharma, Chatbot based College
Information System”, RESEARCHREVIEW International Journal of
Multidisciplinary, ISSN: 2455-3085 (Online), Volume-04, Issue03,
March-2019, pp 109-112.
[3] P.Nikhila, G.Jyothi, K.Mounika, Mr. C Kishor Kumar Reddy and Dr.
B V Ramana Murthy on , “Chatbots Using Artificial Intelligence”,
International Journal of Research and Development,Volume VIII,
Issue I, January/2019,ISSN NO:2236- 6124, pp1-12.
[4] Payal Jain, “College Enquiry ChatBot Using Iterative Model”,
International Journal of Scientific Engineering and p 80-8Research
(IJSER),ISSN (Online): 2347-3878, Volume 7 Issue 1, January 2019,
p3
[5] Sagar Pawar, Omkar Rane, OjasWankhade, Pradnya Mehta, “A Web
Fig. 11 Model Accuracy & Loss Based College Enquiry Chatbot with Results”, International Journal
of Innovative Research in Science, Engineering and Technology,
ISSN(Online): 2319- 8753, ISSN (Print): 2347-6710, Vol. 7, Issue 4,
VI. CONCLUSION & FUTURE SCOPE
April 2018,pp 3874-3880.
The goal of our proposed system is to help the students to [6] Prof.K.Bala, Mukesh Kumar ,SayaliHulawale, Sahil Pandita,
get information about their college activities and to post their “Chatbot For College Management System Using A.I”, International
admission-related queries on the go from anywhere, even Research Journal of Engineering and Technology (IRJET) e-ISSN:
2395-0056, p-ISSN: 2395- 0072, Volume: 04 Issue: 11 | Nov -2017,
outside the college. Another main motive is to reduce the pp2030-2033.
workload on the college staff and reduce the response time [7] Jincy Susan Thomas, Seena Thomas, “Chatbot Using Gated End-to-
for a user queries. For this, we have proposed a web-based End Memory Networks”, International Research Journal of
chatbot system with the combination of Deep Leaning and Engineering and Technology (IRJET) e-ISSN: 2395-0056, p-ISSN:
NLP based techniques. It had almost 99% accuracy score in 2395-0072, Volume: 05 Issue: 03 Mar 2018, pp 3730- 3735.
[8] Prof. Suprita Das, Prof. Ela Kumar, “Determining Accuracy of
giving appropriate responses to the users for their queries. Chatbot by applying Algorithm Design and Defined process”, 4th
The performance as well as accuracy is very considerable for International Conference on Computing Communication and
our chatbot system along with very small response time. Automation (ICCCA), 2018, 978-1-5386-6947-1/18/2018 IEEE, pp
1-6.
[9] Prof.K.Bala, Mukesh Kumar ,SayaliHulawale, Sahil Pandita,
In future, using AI/ML/DL, chatbots can provide students “Chatbot For College Management System Using A.I”, International
with learning material in an interactive manner on any topic, Research Journal of Engineering and Technology (IRJET) e-ISSN:
help them learn quicker through visuals, speech or video and 2395-0056, p-ISSN: 2395-0072, Volume: 04 Issue: 11 | Nov -2017,
evaluate their responses to gauge their learning. They can be pp 2030-2033.
used for – [10] Nitesh Thakur, AkshayHiwrale, Sourabh Selote, Abhijeet Shinde
and Prof. Namrata Mahakalkar, “Artificially Intelligent Chatbot”,
a. Admission process – To assist through documentation Universal Research Reports , ISSN : 2348 – 5612, Volume : 04 ,
Issue : 06, July - September 2017, pp 43-47.
guidelines, enrollment procedures, campus info, [11] Amey Tiwari, Rahul Talekar, Prof.S.M.Patil, “College Information
generate more inquiries, etc. Chat Bot System”, International Journal of Engineering Research
b. Recommending courses – A personalized assistance to and General Science, ISSN 2091-2730, Volume 5, Issue 2, March-
students on courses offered and resolving queries on April, 2017, pp 131-137.
[12] Malusare Sonali Anil, Kolpe Monika Dilip, Bathe Pooja Prashant,
curriculum, credits, internship opportunities, etc. “Online Chatting System for College Enquiry using Knowledgeable
c. On boarding students – FAQ resolution on Database”, Savitribai Phule Pune University, Preliminary Project
orientations, campus visits,events, etc. Report, pp 1-53,2017.
[13] Balbir Singh Bani, Ajay Pratap Singh, “College Enquiry Chatbot
d. Student/Faculty Support point – to offload the staff’s Using A.L.I.C.E (Artificial Linguistic Internet Computer Entity)”,
work of solving repetitive queries. International Journal of New Technology and Research (IJNTR),
Student/Faculty Feedback - Collect students’ feedback ISSN:2454-4116, Volume-3, Issue-1, January 2017 Pages 64-65.
through conversations on learning sessions, campus [14] Ms.Ch.Lavanya Susanna, R.Pratyusha, P.Swathi, P.Rishi Krishna,
environment, course improvement, etc. V.Sai Pradeep, “College Enquiry Chatbot”, International Research
Journal of Engineering and Technology (IRJET), e-ISSN: 2395-
0056, p-ISSN: 2395-0072, Volume: 07 Issue: 3 Mar 2020 pp 784- 4/13 $26.00 © 2013 IEEE. "Designing a Chat-bot that Simulates a
788. Historical Figure".
[15] Agnese Augello, Giovanni Pilato, Alberto Machi' ICAR - Istituto di [17] BayuSetiaji, Ferry Wahyu Wibowo , Department of Informatics
Calcolo e Reti ad Alte Prestazioni CNR - Consiglio Nazionale Engineering STMIK AMIKOM Yogyakarta, Yogyakarta, Indonesia,
elleRicercheVialedelleScienze , 978-0-7695-4859-3/12 $26.00 © 2166-0670/16 $31.00 © 2016 IEEE "Chatbot Using A Knowledge in
2012 IEEE . "An Approach to Enhance Chatbot Semantic Database-Human-to-Machine Conversation Modeling".
Power and Maintainability: Experiences within the FRASI Project"
[16] Emanuela Haller, Traian Rebedea Faculty of Automatic Control and
Computers university Politehnica of Bucharest, 978-0-7695-4980-