CHATBOTS
CHATBOTS
AI POWERED CHATBOTS
(Submitted in partial fulfillment of the requirement for the award of the degree of)
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted
By
ADNAN ALI
ROLL NO.21GE1A0501
Under the guidance
Of
Mrs. P MOUNIKA
H.O.D
1
BHASKAR ENGINEERING COLLEGE
Yenkapally, Moinabad(M), Himayathnagar (P.O),
R.R Dist, Hyderabad-500075.
DEPARTMENT OF
COMPUTER SCIENCE AND ENGINEERING
CERTIFICATE
This is to certify that the project Report entitled “AI POWERED CHATBOTS”
being submitted by ADNAN ALI , bearing ROLL No. 21GE1A0501, during 2021-2025 in
partial fulfillment of the requirements for the award of the degree of BACHELOR OF
TECHNOLOGY in COMPUTER SCIENCE AND ENGINEERING is a debonair work
carried out by him. Certified further, to the best of our knowledge, the work reported here is
not a part of any other project on the basis of which a degree or an award has been given on
an earlier occasion to any other candidate. The result has been verified and found to be
satisfactory.
2
ACKNOWLEDGEMENT
I take this opportunity to remember and acknowledge the cooperation, good will and
support both moral and technical extended by several individuals out of which my project has
evolved. I shall always cherish my association with them.
I thank Mrs. P MOUNIKA Assistant Professor and Head of Department of
Computer Science and Engineering whose suggestions and encouragement have immensely
helped me in the completion of the project.
I would be thankful to My Internal Guide Mrs. P MOUNIKA, for her
encouragement, suggestions and support in completing my project. With immense gratitude
and pleasure, I take this opportunity to thank My Parents and Friends who have been a
catalyst in the realization of my project .
ADNAN ALI
( 21GE1A0501 )
3
ABSTRACT
Context: Chat Bot can be described as software that can chat with people using
artificial intelligence. These software are used to perform tasks such as quickly
responding to users,
informing them, helping to purchase products and providing better service to
customers. In this paper, we present the general working principle and the basic
concepts of artificial intelligence
based chat bots and related concepts as well as their applications in various
sectors such as
telecommunication, banking, health, customer call centers and e-commerce.
Additionally, the
results of an example chat bot for donation service developed for
telecommunication service
provider are presented using the proposed architecture.
4
TABLE OF CONTENT
6-8
1. Introduction
8-9
1.1 Types of Chat bots
9-11
1.2 Applications of Chat bots
11-14
1.3 Architecture of Chat bot
2. Background Study
2.1 History 15
2.2 Technology Progress 16-17
3. Methodology
3.1 How do Chat bots work ? 18
3.2 Building Chat bots 19-24
3.3 What is NLU ? 24
3.4 What is NLP ? 25-27
3.5 How to make chat bots 28-29
29-31
4. Future Scope
32
Conclusion
33-34
References
5
1.
INTRODUCTION
The industrial revolution 4.0 had an impact on the urgency of the education
field to be able to keep up with these developments, which later brought the
term Education 4.0 . In embodying Education 4.0, one of the most required
abilities from educators and educational practitioners is to be able to
integrate modern technology in their teaching. The rapid development of
smartphone technology, social media, and artificial intelligence (AI), provide
challenges for educational practitioners to utilize these technologies in
developing advanced learning media. In recent decades, artificial
intelligence utilization to develop applications is massively conducted, and its
products used in almost every aspect of our life. This type of communication
which occurs through digital technology rather than in person is called
computer-mediated communication (CMC). CMC forms include instant
messaging, email, chat rooms, online forums, social networks, and chat bot or
chatter bot. Chat bot is a computer program or artificial intelligence which
carries out conversations through audio or text, and interacts with users in a
particular domain or topic by giving intelligent responses in natural language.
Chat bots for general purposes and for educational purposes have
been developed. However, despite chat bots’ unlimited possibility to enhance
language teaching and learning, the concept of chat bot including its advantages
as a language learning medium is not yet
widely known. Therefore, the purpose of this study is to analyze the types of
artificial intelligence in the form of chat bots and the possibility of their use as a
language learning medium. This study also aims to observe a chat bot
constructed as a Japanese language learning medium developed by
the author and team, and reports its’ results as an inquiry to find out further.
Chat bots are not a recent development. They are simulations that can
understand human language, process it, and interact back with humans while
performing specific tasks. For example, a chat bot
can be employed as a help-desk executive. Joseph Weizenbaum created the
first chat bot in 1966, named Eliza. It all started when Alan Turing published an
article named “Computer Machinery and Intelligence” and raised an intriguing
question, “Can machines think?” ever since, we have seen multiple chat bots
6
surpassing their predecessors to be more naturally conversant and
technologically advanced. These advancements have led us to an era where
conversations with chat bots
have become as normal and
natural as with another human.
Today, almost all companies
have chat bots to
engage their users and serve
customers by catering to their
queries.
We practically will have chat bots everywhere, but this doesn’t necessarily
mean that all will be well-functioning. The challenge here is not to develop a
chat bot but to develop a well-functioning one. Today, almost all
companies have chat bots to engage their users and serve customers by catering
to their queries. We practically will have chat bots everywhere, but this doesn’t
necessarily mean that all will be well functioning . The challenge here is not to
develop a chat bot but to develop a well-functioning one.
A chat bot is a program that communicates with you. It is a layer on top of, or a
gateway to, a service. Sometimes it is powered by machine learning (the chat
bot gets smarter the more you interact with it). Or, more commonly, it is driven
using intelligent rules (i.e. if the person says this, respond with that). The
services a chat bot can deliver are diverse. Important life-saving health
messages, to check the weather forecast or to purchase a new pair of shoes, and
anything else in between. The term chat bot is synonymous with text
7
conversation but is
growing quickly
through voice
communication. The
chat bot can talk to you
through different
channels; such as
Facebook Messenger,
Siri, WeChat, Telegram,
SMS, Slack, Skype and many others. Consumers spend lots of time using
messaging applications (more than they spend on social media). Therefore,
messaging applications are currently the most popular way companies deliver
chat bot experiences to consumers.
Chatbots are also known as chatter bots. A chat bot is developed with the help
of an (Artificial Intelligence) application. It gives permission to humans to
interact with digital devices as if they were communicating with a human being.
AI chat bots employ machine learning, an AI capability that allows bots to
become smarter over time as they are used. AI chat bots are a natural match for
customer service because of this. Chat bots use digital instant messenger to
communicate with people and can be integrated into a variety of applications
and websites.
There are many types of chat-bots available. A few of them can be majorly
classified as follows:
● Text-based chat bot: In a text-based chat bot, a bot answers the user’s
questions via a text interface.
8
● Voice-based chat bot: In a voice or speech-based chat bot, a bot answers the
user’s questions via a human voice interface.
There are mainly two approaches used to design the chat bots, described as
follows:
● In a Rule-based approach, a bot answers questions based on some rules on
which it is trained on.
The rules defined can be very simple to very complex. The bots can handle
simple queries but fail to manage complex ones.
● Self-learning bots are the ones that use some Machine Learning-based
approaches and are definitely more efficient than rule-based bots. These bots
can be further classified into two types : Retrieval Based or Generative.
There are many types of chat bots available, depending on the complexity. A
few of them can be:
● Traditional chat bots: They are driven by system and automation, mainly
through scripts with minimal functionality and the ability to maintain only
system context.
9
1. Virtual reception assistant - customers to the right department
automatically. It answers to the needs of the customer 24*7, without human
intervention. Using the virtual receptionist service, you’ll be also able to track &
monitor customer calls to provide a superior customer experience &
increase bran-virtual reception assistant - Virtual Receptionist is a smart IVR
system which helps connect d loyalty.
4. Virtual driving assistant - This tempts the driver to use their mobile
phones to check incoming messages and notifications or for communicating
with someone. Hence, providing a virtual in-vehicle assistant to drivers to
interact will give them the sense of companionship during their journey.
10
Microsoft Devices and Google Assistant on Android devices. There are also
devices dedicated to providing virtual assistance.
11
Typical chat bot architecture should consist of the following:
1. Environment
This is where the core Natural Learning Process (NLP) engine and context
interpretation happens.
NLP Engine- NLP Engine is the core component that interprets what users say
at any given time and converts the language to structured inputs that system
can further process. Since the chat bot is domain specific, it must support so
many features. NLP engine contains advanced machine learning algorithms to
identify the user’s intent and further matches them to the list of available
intents the
bot supports.
12
Intent Classifier: Intent classifier takes user’s input identifies its meaning
and relates back to one of the intents that the chat bot supports.
Entity Extractor: Entity extractor is what extracts key information from the
user’s query.
Agent for Dialogue Management- It manages the actual context of the dialogue.
For example, the user might say “He needs to order ice cream” and the bot
might take the order. Then the user might say “Change it to coffee”, here the
user refers to the order he has placed earlier, the bot must correctly interpret
this and make changes to the order he has placed earlier before confirming
with the user. Dialog management plugin enables us to do this.
Dialogue management further has following key plugins:
Feedback Mechanism: Here the agent takes the feedback from user time to
time to learn if the bot is doing fine with the conversation and the user is
satisfied with the bot’s response. This reinforces the bot to learn from mistakes
and corrects itself in future conversations.
13
3. Plugins/Components
Plugins offer chat bots solution API s and other intelligent automation
components for chat bots used for internal company use like HR management
and field-worker chat bots.
The server that handles the traffic requests from users and routes them to
appropriate components. The traffic server also routes the response from
internal components back to the front-end systems.
5. Front-End Systems
Front-end systems can be any client-facing platforms. They can be the actual
chat bot interfaces that reside in various platforms like:
Facebook
Slack
Google Hangouts
Skype for Business
14
2.
BACKGROUND STUDY
2.1 History
The first chat bot ever was developed by MIT professor Joseph Weizenbaum in
the 1960s. It was called ELIZA. You’ll read more about ELIZA and other
popular chat bots that were developed in the second half of the 20th century later
on.
In the year 2009, a company called WeChat in China created a more advanced
Chat bot. Since its launch, We Chat has conquered the hearts of many users who
demonstrate an unwavering loyalty to it. It is a highly thriving social media
platform.
Through its platform, it has made it easy to create very simple chat bots. It has
grown to be an example of the most favored ways for marketers and employers
to reduce the work they do as they interact with customers online.
Though it has implications and is less performative than today’s messaging apps
such as Facebook Messenger, Slack, and Telegram, it doesn’t mean that you
cannot construct a very smart bot on We Chat. ChumenWenwen Company,
founded in 2012 by a former Google employee, has built a very sophisticated
bot running on We Chat.
Early in 2016, we saw the intro of the first wave of artificial data technology in
the design of chat bots. Social media platforms like Facebook enabled
developers to build a chat bot for their trademark or service so that customers
could carry out some of their daily actions from inside their messaging platform.
The introduction of chat bots into a community has brought us to the time of the
conversational interface. It’s an interface that soon won’t demand a screen or a
mouse. The interface will be entirely conversational, and those communications
will be indistinguishable from the conversations that we have with our friends
and relatives.
15
To fully explain the massiveness of this soon-to-be reality, we’d have to go
back to the earliest days of the computer, when the desire for artificial
intelligence technology and a conversational interface first began.
In 2011, a chatbot called Watson (Watson Assistant |IBM Cloud, 2020) was
created by IBM. Watson could understand the natural human language well
enough to win two previous champions on the quiz competition “Jeopardy”, in
which participants received some information in the form of answers and should
guess the corresponding questions. Years later, Watson enabled businesses to
create better virtual assistants. Moreover, Watson Health was designed to help
doctors in healthcare diagnose diseases. However, a drawback of Watson is that
it supports only English.
16
The same year, Amazon (What exactly is Alexa? Where does she come from?
And how does she work?, 2019) introduced Alexa, which is built into devices
for home automation and entertainment and making in this way the Internet of
Things (IoT) more accessible to humans. An innovation is that developers can
use Alexa Skills Kit (ASK) to create and publish free or paid Alexa skills. As
we report in Section 7, Alexa introduces security issues.
Although personal voice assistants enable voice communication with their users,
misunderstandings
often occur, as they cannot understand the particular language people use in oral
speech or fail to
understand the whole context of the conversation
17
3.
METHODOLOGY
Bots are made for a specific reason. A store would most likely want chatbot
services that assists you in placing an order, while a telecom company will want
to create a bot that can address customer service questions.
There are two categories of chatbots: one that works by following a series of
rules, and another that uses artificial intelligence.
1. Rule-based chatbots
A rule-based bot can only comprehend a limited range of choices that it has
been programmed with. Predefined rules define the course of the bot’s
conversation. Rule-based chatbots are easier to build as they use a simple true-
false algorithm to understand user queries and provide relevant answers.
2. AI-based chatbots
This bot is equipped with an artificial brain, also known as artificial intelligence.
It is trained using machine-learning algorithms and can understand open-ended
queries. Not only does it comprehend orders, but it also understands the
language. As the bot learns from the interactions it has with users, it continues
to improve. The AI chatbot identifies the language, context, and intent, which
then reacts accordingly.
18
3.2 Building Chatbot
Chatbot architecture is the spine of the chatbot. The type of architecture for your
chatbot depends on various factors like use-case, domain, chatbot type, etc.
Feedback Mechanism: Here the agent takes the feedback from user time to time
to learn if the bot is doing fine with the conversation and the user is satisfied
with the bot’s response.
However, the basic conversation flow remains the same. Let us learn more
about the critical components of chatbot architecture:
19
1. Question and Answer System
As the name suggests, the Q&A system is responsible for answering customers’
frequently asked questions. The question is interpreted by the Q&A system,
which then replies with appropriateresponses from the knowledge base. It
consists of the following elements:
Manual Training: Manual training entails the domain specialist compiling a list
of commonly asked user questions and mapping out the answers. It enables the
chatbot to identify the most relevant questions’ answers rapidly.
Automated Training: Automated training entails sending business documents to
the chatbot, such as policy documents and other Q&A type documents, and
instructing it to train itself. From these documents, the engine generates a list of
questions and responses. The chatbot would then be able to respond with
confidence.
2. Environment
The environment is mainly responsible for contextualizing users’ messages
using natural language
processing (NLP).
The NLP Engine is the central component of the chatbot architecture. It
interprets what users are saying at any given time and turns it into organized
inputs that the system can process. The NLP engine uses advanced machine
learning algorithms to determine the user’s intent and then match it to the bot’s
supported intents list.
Intent Classifier: An intent classifier maps between what a user asks and the
type of action performed by the software.
20
Entity Extractor: The entity extractor is responsible for identifying keywords
from the user’s query that helps determine what the user is looking for.
An NLP engine can also be extended to include feedback mechanism and policy
learning for better overall learning of the NLP engine.
Feedback Mechanism: This includes the feedback for the chatbot provided by
the users. This part of learning can be incorporated into the chatbot itself. Here,
the user rates the interaction at the end of the conversation. It encourages the bot
to learn from its mistakes and improve in future interactions.
Policy Learning: Policy learning is a broad framework wherein the bot is trained
to create a network of happy paths in the conversation flow that increase overall
end-user satisfaction.
3. Front-End Systems
Front-end systems are the ones where users interact with the chatbot. These are
client-facing systems such as – Facebook Messenger, WhatsApp Business,
Slack, Google Hangouts, your website or mobile app, etc.
5. Custom Integrations
With custom integrations, your chatbot can be integrated with your existing
backend systems like CRM, database, payment apps, calendar, and many such
tools, to enhance the capabilities of your chatbot.
21
Fig 3.2 Classification Methods
Pattern Matchers
Bots use pattern matching to classify the text and produce a suitable response
for the customers. A standard structure of these patterns is “Artificial
Intelligence Markup Language” (AIML).
A simple pattern matching example:
22
The machine then gives and output:
Chatbot knows the answer only because his or her name is in the associated
pattern. Similarly, chatbots respond to anything relating it to the associated
patterns. But it cannot go beyond the related pattern. Algorithms can help for an
advanced level of working.
Neural Networks are a way of calculating the output from the input using
weighted connections, which are computed from repeated iterations while
training the data. Each step through the training data amends the weights
resulting in the output with accuracy.
23
As discussed earlier here, each sentence is broken down into individual words,
and each word is then used as input for the neural networks. The weighted
connections are then calculated by different iterations through the training data
thousands of times, each time improving the weights to
make it accurate.
The trained data of a neural network is a comparable algorithm with more and
less code. When there is a comparably small sample, where the training
sentences have 200 different words and 20 classes, that would be a matrix of
200×20. But this matrix size increases by n times more gradually
and can cause a massive number of errors. In this kind of scenario, processing
speed should be considerably high.
NLU helps the chatbot understand the query by breaking it down. It has three
specific concepts:
b) Intents: It helps identify the action the chatbot needs to perform on the user’s
input. For instance,
24
the intent of “I want to order a t-shirt” and “Do you have a t-shirt? I want to
order one” and “Show me some t-shirts” is the same. All of these user’s texts
trigger a single command giving users options for t-shirts.
c) Context: It isn’t easy to gauge the context of the dialogue for an NLU
algorithm because it does not have the user conversation history. It means that it
will not remember the question if it receives the answer to a question it has just
asked. For differentiating the phases during the chat conversation, its state
should be stored. It can either flag phrases like “Ordering Pizza” or parameters
like “Restaurant: ‘Dominos'”. With context, you can easily relate intents without
any need to know what was the previous question .
25
Fig 3.4 NLP Steps
Sentiment Analysis: With this, the algorithm tries to interpret the sentiment
of the user’s query by reading into the entities, themes, and topics.
Named Entity Recognition: The chatbot program model looks for categories
of words, like the name of the product, the user’s name or address,
whichever data is required.
26
Dependency Parsing: The chatbot looks for the objects and subjects- verbs,
nouns and common phrases in the user’s text to find dependent and related
terms that users might be trying to convey.
Like most applications, the chatbot is also connected to the database. The
knowledge base or the database of information is used to feed the chatbot with
the information required to give a suitable response to the user.
The information about whether or not your chatbot could match the users’
questions is captured in the data store. NLP helps translate human language into
a combination of patterns and text that can be mapped in real-time to find
appropriate responses.
It’s impossible to build a chatbot from scratch without knowing their main types
and how they differ. This section of the article explains what AI chatbot
development is and how it can benefit your business.
RULE-BASED CHATBOTS
Rule-based chatbots are the most basic solutions used for answering simple
questions. Users interact with such bots by clicking on predefined questions that
lead to the desired answer. The chatbot provides answers from the decision tree.
While such chatbots are comparatively easy to build, they are prone to
providing wrong answers
and are quite limited in functionality. In some cases, they can frustrate
customers by providing
wrong answers.
27
AI-BASED CHATBOTS
After a user types in a question, the bot identifies the user’s intent, asks
additional questions if needed, and provides answers using the dialogue tree to
specify what problems a user has and how they can be addressed.
1. Do it all by yourself
Today, you can create a chatbot free of charge if you do all the work yourself.
This approach is suitable if you have the needed technical knowledge and
require the simplest solution.
There are numerous chatbot development platforms that require a different level
of technical expertise. Some are easier to use while others are more complicate
although they provide a wider range of features.
28
If you want to know how to build a chatbot from scratch, you will need to look
for a professional company specialized in chatbot architecture design and
development. When working with a professional company, you get a number of
benefits:
You will work with a company that knows how to make an AI chatbot .
You don’t need to have deep technical knowledge.
You can create a chatbot designed for your specific business needs.
You are not limited by the limitations of chatbot development platforms.
4.
FUTURE SCOPE
1. Conversational AI
29
development in conversational AI, expanding its capabilities even further with
deep learning and improved NLP.
Innovation will likely make conversational AI more accessible and affordable,
allowing wider adoption. Additionally, training will become easier as usage and
adoption grow. One of the main issues with today’s AI chatbots is that they
remain expensive to train. Refined processes will help make sophisticated
conversational versions more affordable.
2. New Applications
AI chatbots are most well-known for their use in customer service. Innovations
and better technology will open up many more applications over the next
decade. Businesses, in particular, will benefit from these advancements. For
example, new AI chatbots with advanced translation capabilities could help
companies expand globally and improve international customer service.
Advanced translation AI has already been in development for years, so this
specific innovation could go mainstream shortly.
Social media may not be the first thing that comes to mind when discussing AI
chatbots. However, it plays an important role in increasing consumer awareness
of these bots. In fact, Facebook’s Messenger app featured 100,000 active bots in
2017. That number has undoubtedly grown since
then.
Some AI chatbots focus on customer service, but others are simply free-to-use
varieties that people talk to for fun. They may not be pushing the limits of AI
technology, but they are crucial to shifting consumer perceptions of this
30
technology. For example, more sophisticated chatbots could be launched on
social media for therapy or educational applications.
4. Better Security
5. Greater Transparency
AI has gained a poor reputation with consumers over recent years due to the
issue of data bias. For example, Amazon made headlines when it shut down its
hiring AI after discovering the model was biased against female candidates.
This is the result of AI training gone wrong and leading to discrimination. Even
worse, these biases are difficult to detect in conventional AI models until
they’ve already been in use for a while.
Consumers need to know that they can trust AI for these chatbots to be effective.
Some may fear substandard service based on certain personal characteristics.
Others may worry that it may endanger their personal information. Luckily, new
advancements in AI development are resolving the issue of transparency
31
CONCLUSION
Chatbots potentially represent a new paradigm in how people will interact with
data and services in the future. Currently, there is a lack of empirical
investigations into why people use chatbots. This study provides needed
insightinto the motivational factors related to use of conversational interfaces.
Its results can guide future research on this topic, which may provide new
insights and guide future design and development of chatbots.
Having a chatbot friend allows one to communicate with friends anytime and
anywhere. Communication with chatbots tends to be more free and open
because chatbots are considered to have empathetic and non-judgmental
abilities. Besides being able to overcome loneliness, chatbots can also indirectly
improve human social skills in communicating with other people. The
limitations of chatbots include the potential for misunderstanding the user's
intentions and the low ability to distinguish between good and bad. It can be
concluded that making friends with chatbots brings not only benefits but also
risks, just like making friends with humans. Chatbots can be an option to make
friends, especially when there are no other friends to communicate with.
32
REFERENCES
1. Ahmed, A., Ali, N., Aziz, S., Abd-alrazaq, A. A., Hassan, A.,
Khalifa, M., Elhusein, B., Ahmed, M., Ahmed, M. A. S., & Househ,
M. (2021). A review of mobile chatbot apps for anxiety and
depression and their selfcare features. Computer Methods and
Programs in Biomedicine Update, 1, 100012.
https://doi.org/10.1016/j.cmpbup.2021.10001
33
social support in chatbots. CHI Conference on Human Factors in
Computing Systems, 1–13. https://doi.org/10.1145/3411764.3445318
34