0% found this document useful (0 votes)
95 views35 pages

Implementation of A Chatbot

Car Rental System is a Java Netbeans application for the companies who rent out the cars. From this application user will able to register themselves as a user , view available cars, book the car of their choice and make online payment . I have used netbeans IDE as a platform and used java and MYSQL as a database.

Uploaded by

Anjali Shingavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views35 pages

Implementation of A Chatbot

Car Rental System is a Java Netbeans application for the companies who rent out the cars. From this application user will able to register themselves as a user , view available cars, book the car of their choice and make online payment . I have used netbeans IDE as a platform and used java and MYSQL as a database.

Uploaded by

Anjali Shingavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Implementation of A Chatbot

A
Preliminary Project Report
Submitted by

Ms. Anjali Shingavi 2041065

Ms. Priti Sonawane 2041066

Ms. Ishwari Vaidya 2041071

Ms. Zahida Rashid 2041073

SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE IN THE PARTIAL FULFILMENT FOR THE
REQUIREMENT FOR THE AWARD OD THE DEGREE OF

BaĚelor of Computer Engineering

Under the guidance of

Mrs. Gyankamal Chhajed


(Assistant Professor)

Department of Computer Engineering


Vidya Pratishthan’s Kamalnayan Bajaj Institute of Engineering and
Technology
Bhigawan Road, Vidyanagari
Baramati-413133
2020-2021
Vidya Pratishthan’s
Kamalnayan Bajaj Institute of Engineering and Technology, Baramati
Department of Computer Engineering

Certificate
This is to certify that the Preliminary report for Project Entitled

Implementation of A Chatbot
Ms. Anjali Shingavi 2041065
Ms. Priti Sonawane 2041066
Ms. Ishwari Vaidya 2041071
Ms. Zahida Rashid 2041073
is a bonafide work carried out by students under the supervision of Mrs. Gyankamal Chhajed and it
is submitted towards the partial fulfillment of the requirement of Bachlor of Engineering (Computer
Engineering).

Project Guide HoD Dept. of Comp. Engg.


(Mrs. Gyankamal Chhajed) (Dr. S. K. Shinde)

Principal
(Dr. R. S. Bichkar)
Acknowledgments
In our effort to complete the project "Implementation of A Chatbot" in the final Year of Engineering in
the stream of Computer Engineering, we greatly thankful to all the people without whose assistance,
guidance and effort we would not be able to complete out our project successfully.

We heartly thanks to our guide ‘Mrs. Gyankamal Chhajed’ who through his experience
encouragement and constant guidance helped us to shape our project to the present stage without his
help our project could not be completed. We are also thankful to our principal ‘Dr. R.S.Bichkar and our
HOD ‘Dr. S.K.Shinde’ for their guidance and support.

Ms. Anjali Shingavi


Ms. Priti Sonawane
Ms. Ishwari Vaidya
Ms. Zahida Rashid
Abstract

This project is centralise on creating a chatbot to be used by students to get their inquires responded
easily from the college website. This chatbot has the ability to make friendly conversation, respond the
course and the faculty details, answer the frequently asked questions and also calculate the fees on the
basis of student input as well as event information of the library.

To build the chatbot, Microsoft Azure Bot service as well as Microsoft Cognitive services namely
Text analytics, LUIS (Language Understanding Intelligent Service) and QnA Maker are used.

There are many chatbot fail to accommodate anything outside of the script. To overcome this
problem this chatbot extend the implementation of current chatbot by adding active learning and
sentimental analysis. As sentimental analysis properly realizes user’s query as positive, negative and
neutral, the system is partially successful in adding empathy to the chatbot. It is because the system
requires the more rigorous data to handle all queries which are off script. For such problems active
learning improves the chatbot performance. The more focus is on the speech recognization feature so that
the user can easily get response by speaking.
ii

Contents
Acknowledgments i
Abstract ii
List of Figures v
1 Introduction..................................................................................................................................... 1
1.1 Problem Definition....................................................................................................................... 1
1.2 Introduction.................................................................................................................................. 1
1.3 How does Chatbot work.............................................................................................................. 2
1.4Motivation……………………………………………………………………………………………………………………………………2

`
3 Software Requirement Specification............................................................................................. 5
3.1 Scope of Project............................................................................................................................ 5
3.2 Project Objective.......................................................................................................................... 5
3.3 Project Constraints....................................................................................................................... 5
4 Functional Requirement................................................................................................................. 6
4.1 Retrieving Input............................................................................................................................ 6
4.2 Output........................................................................................................................................... 6
4.3 System Administrator.................................................................................................................. 6
4.4 User Requirement........................................................................................................................ 6
4.5 Technical Requirement................................................................................................................ 7
5 Non Functional Requirement......................................................................................................... 8
5.1 User Interface............................................................................................................................... 8
5.2 Security.......................................................................................................................................... 8
6 System Requirement..................................................................................................................... 10
6.1 Hardware Requirement............................................................................................................. 10
6.2 Software Requirement.............................................................................................................. 10

CONTENTS
7 Specification 11
7.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.3 Proposed System ................................. 13
7.4 Advantages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.5 Disadvantages
7.6 Limitations
7.7 Application ................................. 14
7.8 System at Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Implementation of A Chatbot iv VPKBIET, Baramati

List of Figures
8 System Design…………………………………………………………………………………………………………… 15
8.1 Gantt Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.2 Data Flow Diagram of Level 0. . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.3 Data Flow Diagram of Level 1. . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.4 Data Flow Diagram of Level 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.5 Use Case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.6 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8.7 Activity Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
8.8 Sequence Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8.9 Component Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
8.10Deployment Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9 Conclusion……………………………………………………………………………………………………………. 26
A Glossary………………………………………………………………………………………………………………. 27
Bibliography………………………………………………………………………………………………………… 28
v
1 Introduction

1.1 Problem Definition


Implementation of A Chatbot For an Educational Institute with Natural
Language Processing.

1.2 Introduction

A chatbot is an artificial intelligence software that can simulate a conversation (or a chat)
with a user in natural language through messaging applications, websites, mobile apps or
through the telephone.

This project is focusing on creating a chatbot to be used by students to get their queries
responded easily from the college website.

A chatbot is a program which can do real conversations with textual and/or auditory
methods.

A Chatbot is a software tool that interacts with users on a certain topic or in a specific
domain in natural, conversational way using text and voice.

For many different purposes, chatbots have been used across wide range of domains,
including marketing, customer service, technical support, as well as educational and training.

Rather than creating a human like smart machine application, it is about creating effective
digital assistants who are able to provide information, answer questions, discuss a specific
topic or perform a task.

1
1.3 How does Chatbot work
This project is focusing on creating a chatbot to be used by students to get their queries
responded easily from the college website. A chatbot is a program which can do real
conversations with textual and/or auditory methods [1]. Using Artificial Intelligence (AI),
chatbots can simulate human conversations. There are two categories of chatbots. One

category is command based chatbots where chatbots rely on a databank of replies and

heuristics. The user must be very specific while asking the questions so that the bot can

answer. Hence, these bots can answer limited set of questions and cannot perform function
outside of the code. The other category is chatbots based on AI or machine learning
algorithms, these bots can answer ambiguous questions which means the user do not have
to be specific while asking questions. Thus, these bots create replies for the user’s queries
using Natural Language Processing (NLP).

Figure show how a chatbot works. Whenever a user asks any query, the bot will
first analyze the request, then identifies intents and entities, builds a response and sends it
back to the user. Now, intents mean intention of the query and entity means details of that
query. For example, if a student wants to know the office hours of a faculty the intent
will be office hours and entity will be name of the faculty in this case.

AI-powered chatbots are motivated by the need of traditional websites to provide a


chat facility where a bot is required to be able to chat with user and solve queries. When
live agent can handle only two to three operations at a time, chatbots can operate without

2
an upper limit which really scales up the operations. Also, if any school or business is
receiving lots of queries, having a chatbot on a website takes off the load from support
team. Having a chatbot clearly improves the response rate compared to human support
team. In addition, since millennials prefer live chats over a phone call, they find a chatbot,
which provide a highly interactive marketing platform, very attractive. Furthermore, a
chatbot can automate the repetitive tasks. There can be some scenarios where a
business or
school receives same queries in a day for many times and support team must
respond to
each query repetitively. Lastly, the most important advantage of having a
chatbot is that it
is available 24/7. No matter what time it is, a user can get a query solved. All these
advantages of a chatbot constitute the motivation to implement a College Enquiry Chatbot.

Before implementing College Enquiry Chatbot, various existing chatbots were


reviewed such as Amazon Shopping App [3], Alexa [4], Bank of America (Ericabot) [5]and
CNN news bot [6]. In order to understand the requirement of a chatbot, consider an example
of Amazon Shopping App. In this app, when a customer buys an item, he/she does not have
any information about how to return the item. To get this information, the customer must call
and wait to talk to customer representative for a long time. However, this whole process is
tedious for a customer. Hence, Amazon created a chatbot to answer simple queries of
customers.

1.4 Motivation:
To design and develop a bot which will be able to answer questions related to
institute. A bot which will help students to get their inquiries responded easily from
the institute website.

Implementation of A Chatbot VPKBIET, Baramati

3
Literature Survey

Idea of First Paper


In this paper, they examined many publications from the last five years, which are
related to chatbots.

Idea of Second Paper


Then they presented different related works to their subject, and the AI concepts
needed to build an intelligent conversational agent based on deep learning models. They
described the Natural Language Understanding, Natural Language Generation and
Automated Speech Recognition.

Idea of Third Paper


They presented a functional architecture that they propose to build an intelligent
chatbot for health care assistance.

Idea of Fourth Paper


This paper aim is to explore manager’s perception of chatbots to help understand the
initiation of financial chatbots and forecast the future of their service in South Korea, which
has seen active use of chatbots by financial firms.

4
Idea of Fifth Paper
In this paper, we proposed a cognitive system to improve the user experience in
searching for academic information with a chatbot.

Idea of Sixth Paper


The paper identifies the key digital literacy and employability skills that
students and educators need to develop to better understand and negotiate
the changing, digitally focused landscape of the hospitality and tourism industry (HTI).

Idea of Seventh Paper


In this paper, we discuss two such models: a conversational chatbot to help answer
some technical questions for our customers, and a text summarizer to condense the large
text in our support tickets and other articles.

Idea of Eight Paper


This thesis studies whether a chatbot can be used to elicit high-quality end-user
requirements. This thesis introduces ReqBot, a prototype chatbot elicitation assistant; we
investigate ReqBot’s impact on the quality of requirements and its usability. Quality is
represented by referential ambiguity and vagueness, a subset of ambiguity, which in turn is a
quality metric for requirements.

Idea of Ninth Paper


The main purpose of this paper is to examine the extend to which ethical
considerations associated with the use of cryptocurrencies affect the valuations attached to
such currencies.

Idea of Tenth Paper


This research study gives an overview of different applications that are developed by
Government Institutions. Private Firms, and individual Citizens across the world.

CHAPTER 2. LITERATURE SURVEY

5
Implementation of A Chatbot VPKBIET, Baramati

3 Software Requirement Specification

3.1 Scope of Project:


How does chatbot works.

Response generation format in QnA Maker & LUIS.

Algorithm.

Type of users such as students, parents.

3.2 Project Objective:


1. To design and develop a bot which will be able to answer questions related to
institute.

2. A bot which will help students to get their inquiries responded easily from the
institute website.

3.3 Project Constraints


Resources Dataset of student details, software resources, hardware resources.
Risk There is a probability that system will provide accurate result that affects the
organization.

6
4 Functional Requirement

4.1 Retrieving Input

Chatting

The system should allow users to chat.

The system shall inform the user if an answer is not available.

The system shall inform the user about spelling mistakes.

The system shall inform the user about validity of the sentence.

Searching

The system should inform the users to search for information about admissions, tution fees
and accommodation.

4.2 Output
User should be able to leave feedback, which is comprised of a text message and a
rating.

4.3 System Administrator


The administrator should be able to add, update and delete questions and answers.

The administrator should be able to view and delete feedbacks.

The administrator should be able to add, update and delete keywords.

4.4 User Requirement


User can ask query

QnA Maker will generate response for query or search response available in KB.
7
If response is not available in Kb then generate the response by using LUIS.

Send appropriate response to user.

Admin can update, add, delete information in KB.

4.5 Technical Requirement


User should ask valid information or valid query.

QnA Maker should provide appropriate response.

If QnA Maker fail to provide appropriate response then LUIS will generate appropriate
response for query.

System should provide accurate results.

Implementation of A Chatbot VPKBIET, Baramati

5 Non-Functional Requirement

5.1 User Interface:


They shall maintain an easy-to-use interface across all functionality and for all users.

The client user interface should be compatible with all commonly used browsers, such as
Internet explorer, Firefox, Google, Chrome and Safari.

5.2 Security:
The administrative system and database should be protected from unauthorized access.

All password should be stored as a secure hash of the administrator password.

Implementation of A Chatbot VPKBIET, Baramati


8
6 System Requirement

6.1 Hardware Requirement


Operating systems: Windows 8 and above

x86 64-bit CPU (i3 processor)

min.1GB RAM

min. 5GB free disk space

6.2 Software Requirement


Programming Language: Python

Front end Technologies: HTML, CSS, JavaScript

Specification

7.1 System Architecture

System design of College Enquiry Chatbot consists of integration of multiple technologies.


This system makes use of NodeJS for backend and ReactJS for frontend. Microsoft Azure
provides services like Cognitive Service, Bot Service [10], and Web Apps. Cognitive services
consist of Text Analytics, LUIS [11], and QnA Maker [12]. The bot service is used to create

9
the bot application on Azure. In addition, Web Apps are used to host the application on
Microsoft Azure. System uses Mongo DB to store the conversations history.

System Architecture: Implementation of a Chatbot Creation

Microsoft Azure

Microsoft Azure provides cloud services to build, manage, and deploy applications on a
cloud network which helps organization to meet their business needs using their favorite tools
and frameworks. College Enquiry Chatbot uses all the services shown in Figure which are
provided by Microsoft Azure.

Azure Bot Service

10
Azure bot service is a service provided by Microsoft Azure which builds and artificial
intelligence (AI) chatbot. It offers the ability to add intelligent agents that can do
conversations with users without having to commit the resources to develop one’s own AI.

Azure Web App

I have used Azure web app to host my bot application build by Azure bot service. Azure Web
App are the web applications which are hosted on Microsoft Azure cloud without any
programming language barrier. Since it is hosted on the cloud, infrastructure maintenance is
not needed to host the applications. It also provides various features like auto scaling,
automated deployment and also supports both Windows and Linux environments.

Azure Cognitive Services

Azure Cognitive services are used to add intelligence to the bots by adding features such as
sentiment analysis and language understanding which help in analyzing user's queries.
These services can be added to an existing bot by adding service calls to the 7 Microsoft's
SDK to get the desired results. College Enquiry Chatbot utilizes Text Analytics, LUIS, and
QnA Maker services which are part of cognitive services and use natural language processing
(NLP) for different purposes.

Text Analytics

Text Analytics is used to perform sentiment analysis on a user’s queries. As shown in Figure,
a text is sent to text analytics and it returns the sentiment of that text.

LUIS

“LUIS stands for Language Understanding Intelligent Services which aims at creating cloud-
based machine learning language understanding (LU) models specific to an application and
without machine learning expertise”.
To implement a College Enquiry Chatbot, I have first created all the possible intents and
entities using LUIS tool. Based on these intents and entities, LUIS have built and train a LU
deep learning model. Then, the created model needs to be pushed to the endpoint on the
cloud.
The queries from the user are passed to the endpoint to get the recognized intent and entities
in JSON format. Based on various flows, response will be sent back to the user. Active
learning is also implemented using LUIS as shown in Figure. LUIS detects the user's query
(utterances) in terms of intents and entities.
It sends back the response to the service code where those utterances are examined based on
the confidence score. Then, College Enquiry Chatbot labels these utterances, re-trains, and
publishes the LU model.
Another method of active learning is also implemented which involves using user’s response
to re-train the model. The endpoint provided by LUIS responds with intents, 8 entities, and a
corresponding confidence score.
A threshold is maintained based on the confidence score and correspondingly prompts are
provided to the user. When the users respond to it, the system keeps track of the responses
and uses it to re-train the model.

11
QnA Maker

For answering simpler queries, instead of detecting intents and entities, College Enquiry
Chatbot uses QnA Maker for structuring answers from a semi-structured document like
FAQs.
This web-based service is useful in incorporating multiple FAQs from an URL,
structured documents, product manuals, or editorial contents; and building the
LU model for natural language processing.

Cosmos DB (Mongo)

Cosmos DB is a database service provided by Microsoft Azure. College Enquiry Chatbot


uses this database service to store my conversational history.

12
CHAPTER 7. SPECIFICATION

7.2 Algorithm
1. Step 1: When user submits its question, we store that in a variable “query”.

2. Step 2: After that we bring all the main keywords from question table of the
database.

3. Step 3: Then check if “query” contains any of the main keywords in it.

4. Step 4: If NO then we say no answer found.

5. Step 5: If YES then we bring all sub-keyword with its answer of that matching main-
keyword.

6. Step 6: Then we pass “query” through 4 keyword check procedure **4 keyword
check is checking all the 4 sub-keywords are in “query”.

7. Step 7: If any of the entry matches the keyword then we take its answer and then
submit it to the user.

8. Step 8: If does not match then we pass “query” through 3-keyword match algo.

9. Step 9: If it and so on for 2 and 1 keyword match.

10. Step 10: And if we still don’t get the out-put we say No answer found.

7.3 Proposed System

Context Identification

Here pre-processing has been applied to the input text so as to standardize the input. This is
done keeping the system’s requirements in mind.
The recognition of the appropriate context is based on the keywords used in the text.

Personal Query Response System

When the bot receives queries regarding CGPA, attendance etc. the validity of the user is
checked by making them enter their e-mail and password. If found wrong, an appropriate
answer is sent.
If the user is valid, the input text is processed so that the keywords can be extracted. Based on
these keywords, the information is processed and provided to the user.

13
CHAPTER 7. SPECIFICATION

AIML Response System

Artificial Intelligence Markup Language is used to map the input to an appropriate pattern. If
the response is available inside the files, then it is sent to the user.
If something does not match the database, then a random response is sent saying” Invalid
Input”.

Query Analysis and Response System

This application provides information regarding the proceedings of the college. It is known
that the answer will be given to the user if the input matches a pattern in the AIML files. In a
case where the input does not match with the data in AIML files, keywords are fetched.
An algorithm to check the sentence similarity (NLP) is applied to the modified input so that its
similarity can be checked. If a sentence is retrieved with confidence>0.5, the query’s answer
is given. If no questions map to the input, that particular data is stored in the log file for
further improvement by the admin.
Later that query can be included into the various AIML files. The bot, in this case gives the
answer as “Answer not available”.

Context Reset

After the queries of the user are over and the he/she wants to exit the portal, then they have to
just enter “logout” or “bye” or simple exit the portal. When the user exits the application, all
the input parameters are reset.

7.4 Advantages
Reduce cost- As chatbot eliminate the requirement of any manpower during online
interaction.

24/7 availability- Unlike human chatbot once installed can attend queries at any time of day,
student does not have to wait for the college staff to help.

Multiple query handling- Human have the limit to the number of clients they can handle at
once, with the chatbot there is no such issue and they can handle as many queries as
required.
CHAPTER 7. SPECIFICATION

7.5 Disadvantages
Grammatical Errors: It does not recognize
grammatical errors.

Ambiguity: The context and meaning of the


sentences are unclear or not appropriate meaning with the word.

Language Structure: Each language has a different sentence making structure.

7.6 Limitations

Fixed Rule-based

Previous chatbots are built with a fixed set of rules, template-based matching and very simple
machine learning approach.

Grammatical Errors

It does not recognize grammatical errors.

Predefined or Closed-domain

Most of them are able to answer questions only on closed-domain or based on predefined in
the database.

Ambiguity

The context and meaning of the sentences are unclear or not appropriate meaning with the
word.

7.7 Application
It enables the students to be updated with college activities.

It saves time for the students as well as teaching and non-teaching staffs.

It is providing us a readily available information source without taking any physical efforts.

It is easily accessible and saving time and money also.

15
CHAPTER 7. SPECIFICATION

7.8 System at Glance


Expected Input: User should ask query/valid information

Process: Response generation –> QnA Maker if not –> LUIS –> accurate results.

Expected outcomes:
1.Appropriate feedback.
2.Rating of text message response.
8 System Design

8.1 Gantt Chart

Figure 8.1: Time Line chart for Project Plan

17
CHAPTER 8. SYSTEM DESIGN

8.2 Data Flow Level 0

Figure 8.2: Data Flow Diagram of Level 0


CHAPTER 8. SYSTEM DESIGN

8.3 Data Flow Level 1

Figure 8.3: Data Flow Diagram of Level 1

Implementation of A Chatbot 19 VPKBIET, Baramati


CHAPTER 8. SYSTEM DESIGN

8.4 Data Flow Level 2

Figure 8.4: Data Flow Diagram of Level 2


CHAPTER 8. SYSTEM DESIGN

8.5 Use Case Diagram

Figure 8.5: Use Case diagram

Implementation of A Chatbot 21 VPKBIET, Baramati


CHAPTER 8. SYSTEM DESIGN

8.6 Class Diagram

Figure 8.6: Class diagram


CHAPTER 8. SYSTEM DESIGN

8.7 Activity Diagram

Figure 8.7: Activity Diagram

Implementation of A Chatbot 23 VPKBIET, Baramati


CHAPTER 8. SYSTEM DESIGN

8.8 Sequence Diagram

Figure 8.8: Sequence Diagram


CHAPTER 8. SYSTEM DESIGN

8.9 Component Diagram

Figure 8.9: Component Diagram

Implementation of A Chatbot 25 VPKBIET, Baramati


CHAPTER 8. SYSTEM DESIGN

8.10 Deployment Diagram

Figure 8.10: Deployment Diagram


Conclusion

To conclude, College Enquiry Chatbot is helpful in guiding students with correct and most up
to date sources of information. It is advantageous for international applicants for queries
such as fee payment and academic matters. Students can get the information at their
fingertips rather than visiting college office. It improves efficiency by taking over tasks for
which humans are not essential.

27
A

B Glossary

Channel -

The medium for chatbot conversations.

Channels include your Website, Messenger, Slack, Skype, SMS, email and web chat
windows.

Chat logs –

Chat data of human bot conversations.

28
Bibliography
A. AM Rahman1, Abdullah Al Mamun1, Alma Islam2,” Programming challenges
of Chatbot: Current and Future Prospective”IEEE.

B. Anupana Mondal,Monalisa Dey,Dipankar Das,Sanchit Negpal,” Chatbot: An


automated conversation system for the educational domain”

C. A.S.Ainer et al,”Chatbot In The Fight Against Covid-19 Pandamic”

D. Mohmmand Nuruzzaman, Omar Khadeer Hussain”A Survey On Chatbot


Implementation In Customer Service Industry Through Deep Neural
Network”IEEE conference paper

29

You might also like