0% found this document useful (0 votes)
4 views39 pages

Chatbot in Python

This document is a project report on developing a ChatBot Assistant System using Python, submitted for a Bachelor of Technology degree. It covers the introduction to chatbots, their applications, and the underlying artificial intelligence technologies, including the ChatterBot library. The report also discusses the advantages and disadvantages of chatbots and outlines the requirements for creating one.

Uploaded by

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

Chatbot in Python

This document is a project report on developing a ChatBot Assistant System using Python, submitted for a Bachelor of Technology degree. It covers the introduction to chatbots, their applications, and the underlying artificial intelligence technologies, including the ChatterBot library. The report also discusses the advantages and disadvantages of chatbots and outlines the requirements for creating one.

Uploaded by

stakesoni1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

lOMoARcPSD|55154509

Chatbot IN Python

Bachelors of Computer Application (BCA) (Rajasthan Technical University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by sangu ghar (sangu675@[Link])
lOMoARcPSD|55154509

An
Skill Development Project Report
on
“ChatBot Assistant System using Python”
Submitted in partial fulfilment for the award of degree of
Bachelor of Technology
in
Department of Electronics & Communication Engineering

Submitted to: Submitted by:

Rajini Idiwal Aditya Garg


Associate 19ESKEC005
Professor Sem : VIII
Department of
ECE-A
ECE SKIT M&
G, Jaipur

i|Page

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

ii

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

iii

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

ACKNOWLEDGEMENT

There are always some key personalities whose roles are vital for the successful
completion of any work. However, it would not have been possible to complete
this work without the kind support and help of many individuals and organization.
I would like to extend my sincere thanks to all of them.

I am highly indebted to my mentors Ms. Rajini Idiwal, Associate Professor for


their guidance and constant supervision as well as for providing necessary
information regarding the skill development seminar & also for their support in
completing the Skill Development.

I would like to thank Prof. (Dr.) Mukesh Arora, Professor & Head, Department of
Electronics and communication, SKIT M & G, Jaipur for providing me the
opportunity to do training in consistent direction and the adequate means and
support to pursue this training.

Finally, earnest and sincere thanks to all the Faculty members of Electronics and
Communication Department, SKIT M & G, Jaipur for their direct and indirect
support in the completion of this industrial training.

Last but not least, I sincerely express my deepest gratitude to my families for their
wholehearted support and encouragement to take up this course. In addition, a very
special thanks to friends for their support.

Aditya Garg
19ESKEC005

iv

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

LIST OF FIGURES

Figure No. Caption Page No.

Figure 2.1 Regression and Classification 8

Figure5.1 Aiml Script 11

Figure 5.2 Loading AIML 12

Figure 5.3 Creating Interface 13

Figure 5.4 Speeding Up brain 14

Figure 5.5 Loading Brain 15

Figure6.1 Execution of Final 16

Figure 6.2 Continue Execution 17

Figure 6.3 Final Screenshot 18

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

vi

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CONTENTS

Page No.

Acknowledgement ii
List of Figures iii
List of Tables iv
List of Abbreviations v

CHAPTER 1: INTRODUCTION
1.1 Abstract 1
1.2 Chatbot in Python 2
1.3 Artificial Intelligence 3-5
1.4 AI application 5-6

CHAPTER 2: CHATTERBOT
2.1 Understanding the ChatterBot Library 7
2.2 Understanding the working of ChatterBot Library
2.3 Creating a ChatBot using Python 8

CHAPTER 3: PROBLEM IDENTIFICATION 9

CHAPTER 4: REQUIREMENT AND SPECIFICATION


4.1 Hardware Requirement 10
4.2 Software Rquirement 10

CHAPTER 5: ADVANTAGES AND DISADVANGES


5.1 Advantages 10
5.2 Disadvantages 11

vii

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 6: CONCLUSIONS AND SCOPE FOR FUTURE RESEARCH

6.1 Conclusions 12
6.2 Scope for Future Research 13

REFERENCES

viii

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 1
INTRODUCTION

1.1 ABSTRACT

A chatbot is a computer program that can converse with humans using artificial
intelligence in messaging platforms. The goal of the project is to add a chatbot feature
and API for Yioop. discussion groups, blogs, wikis etc. Yioop provides all the basic
features of web search portal. It has its own account management system with the ability
to set up groups that have discussions boards. Groups are collections of users that have
access to a group feed. The user who creates a group is set as the initial group owner.
Posts are grouped by thread in a group containing the most recent activity at the top. The
chatbot API for Yioop will allow developers to create new chatbots, powered by rules or
artificial intelligence, that can interact like a human with users in a groups feed page.
Example chatbots that can be developed with this API is weather chatbots or book flight
chatbots. Over past few years, messaging applications have become more popular than
Social networking sites. People are using messaging applications these days such as
Facebook Messenger, Skype, Viber, Telegram, Slack etc. This is making other
businesses available on messaging platforms leads to proactive interaction with users
about their products. To interact on such messaging platforms with many users, the
businesses can write a computer program that can converse like a human which is called
a chatbot.

Chatbots come in two kinds:


• Limited set of rules
• Machine learning
Chatbot that uses limited set of rules
This kind of bots are very limited to set of texts or commands. They have ability to respond
only to those texts or commands. If user asks something different or other than the set of
texts or commands which are defined to the bot, it would not respond as desired since it
does not understand or it has not trained what user asked. These bots are not very
1|Pa ge Downloaded by sangu ghar (sangu675@[Link])
lOMoARcPSD|55154509

1.2 Chatbot in Python

A Chatbot is an Artificial Intelligence-based software developed to interact with humans in


their natural languages. These chatbots are generally converse through auditory or textual
methods, and they can effortlessly mimic human languages to communicate with human
beings in a human-like way. A chatbot is considered one of the best applications of natural
languages processing.

We can categorize the Chatbots into two primary variants: Rule-Based Chatbots and Self-
Learning Chatbots.

1. Rule-based Chatbots: The Rule-based approach trains a chatbot to answer questions based
on a list of pre-determined rules on which it was primarily trained. These set rules can either
be pretty simple or quite complex, and we can use these rule-based chatbots to handle
simple queries but not process more complicated requests or queries.
2. Self-learning Chatbots: Self-learning chatbots are chatbots that can learn on their own.
These leverage advanced technologies such as Artificial Intelligence (AI) and Machine
Learning (ML) to train themselves from behaviours and instances. Generally, these chatbots
are quite smarter than rule-based bots. We can classify the Self-learning chatbots furtherly
into two categories - Retrieval-based Chatbots and Generative Chatbots.
1. Retrieval-based Chatbots: A retrieval-based chatbot works on pre-defined input
patterns and sets responses. Once the question or pattern is inserted, the chatbot
utilizes a heuristic approach to deliver the relevant response. The model based on
retrieval is extensively utilized to design and develop goal-oriented chatbots using
customized features such as the flow and tone of the bot in order to enhance the
experience of the customer.
2. Generative Chatbots: Unlike retrieval-based chatbots, generative chatbots are not
based on pre-defined responses - they leverage seq2seq neural networks. This is
constructed on the concept of machine translation, where the source code is
converted from one language to another language. In the seq2seq approach, the
input is changed into an output.

The first chatbot named ELIZA was designed and developed by Joseph Weizenbaum in 1966 that
could imitate the language of a psychotherapist in only 200 lines of code. But as the technology gets
more advance, we have come a long way from scripted chatbots to chatbots in Python today.

2|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

1.3 Artificial Intelligence

AI was coined by John McCarthy, an American computer scientist, in 1956 at The Dartmouth
Conference where the discipline was born. Today, it is an umbrella term that encompasses
everything from robotic process automation to actual robotics. It has gained prominence recently
due, in part, to big data, or the increase in speed, size and variety of data businesses are now
collecting. AI can perform tasks such as identifying patterns in the data more efficiently than
humans, enabling businesses to gain more insight out of their data.

Types of artificial intelligence

AI can be categorized in any number of ways, but here are two examples.
The first classifies AI systems as either weak AI or strong AI. Weak AI, also known as narrow AI,
is an AI system that is designed and trained for a particular task. Virtual personal assistants, such
as Apple's Siri, are a form of weak AI.
Strong AI, also known as artificial general intelligence, is an AI system with generalized human
cognitive abilities so that when presented with an unfamiliar task, it has enough intelligence to
find a solution. The Turing Test, developed by mathematician Alan Turing in 1950, is a method
used to determine if a computer can actually think like a human, although the method is
controversial.
The second example is from Arend Hintze, an assistant professor of integrative biology and
computer science and engineering at Michigan State University. He categorizes AI into four types,
from the kind of AI systems that exist today to sentient systems, which do not yet exist. His
categories are as follows:

3|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

Type 1: Reactive machines.


An example is Deep Blue, the IBM chess program that beat Garry Kasparov in the 1990s. Deep
Blue can identify pieces on the chess board and make predictions, but it has no memory and cannot
use past experiences to inform future ones. It analyzes possible moves -- its own and its opponent
-- and chooses the most strategic move. Deep Blue and Google's AlphaGO were designed for
narrow purposes and cannot easily be applied to another situation.

Type 2: Limited memory.


These AI systems can use past experiences to inform future decisions. Some of the decision-
making functions in autonomous vehicles have been designed this way. Observations used to
inform actions happening in the not-so-distant future, such as a car that has changed lanes. These
observations are not stored permanently.

Type 3: Theory of mind.


This is a psychology term. It refers to the understanding that others have their own beliefs, desires
and intentions that impact the decisions they make. This kind of AI does not yet exist.

Type 4: Self-awareness. In this category,


AI systems have a sense of self, have consciousness. Machines with self-awareness understand
their current state and can use the information to infer what others are feeling. This type of AI does
not yet exist.

Examples of AI technology
Automation is the process of making a system or process function automatically. Robotic process
automation, for example, can be programmed to perform high-volume, repeatable tasks normally
performed by humans. RPA is different from IT automation in that it can adapt to changing
circumstances.
Machine learning is the science of getting a computer to act without programming. Deep learning
is a subset of machine learning that, in very simple terms, can be thought of as the automation of
predictive analytics. There are three types of machine learning algorithms: supervised learning, in
which data sets are labeled so that patterns can be detected and used to label new data sets;
unsupervised learning, in which data sets aren't labeled and are sorted

4|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

according to similarities or differences; and reinforcement learning, in which data sets aren't
labeled but, after performing an action or several actions, the AI system is given feedback.
Machine vision is the science of making computers see. Machine vision captures and analyzes
visual information using a camera, analog-to-digital conversion and digital signal processing. It
is often compared to human eyesight, but machine vision isn't bound by biology and can be
programmed to see through walls, for example. It is used in a range of applications from signature
identification to medical image analysis. Computer vision, which is focused on machine-based
image processing, is often conflated with machine vision.
Natural language processing (NLP) is the processing of human -- and not computer -- language by
a computer program. One of the older and best known examples of NLP is spam detection, which
looks at the subject line and the text of an email and decides if it's junk. Current approaches to NLP
are based on machine learning. NLP tasks include text translation, sentiment analysis and speech
recognition.
Pattern recognition is a branch of machine learning that focuses on identifying patterns in data.
The term, today, is dated.
Robotics is a field of engineering focused on the design and manufacturing of robots. Robots are
often used to perform tasks that are difficult for humans to perform or perform consistently. They
are used in assembly lines for car production or by NASA to move large objects in space. More
recently, researchers are using machine learning to build robots that can interact in socialsettings.

1.4 AI applications
AI in healthcare. The biggest bets are on improving patient outcomes and reducing costs.
Companies are applying machine learning to make better and faster diagnoses than humans. One
of the best known healthcare technologies is IBM Watson. It understands natural language and is
capable of responding to questions asked of it. The system mines patient data and other available
data sources to form a hypothesis, which it then presents with a confidence scoring schema. Other
AI applications include chatbots, a computer program used online to answer questions and assist
customers, to help schedule follow-up appointments or aiding patients through the billing process,
and virtual health assistants that provide basic medical feedback.
AI in business. Robotic process automation is being applied to highly repetitive tasks normally
performed by humans. Machine learning algorithms are being integrated into analytics and CRM
platforms to uncover information on how to better serve customers. Chatbots have been

5|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

incorporated into websites to provide immediate service to customers. Automation of job positions
has also become a talking point among academics and IT consultancies such as Gartner and
Forrester.
AI in education. AI can automate grading, giving educators more time. AI can assess students
and adapt to their needs, helping them work at their own pace. AI tutors can provide additional
support to students, ensuring they stay on track. AI could change where and how students learn,
perhaps even replacing some teachers.
AI in finance. AI applied to personal finance applications, such as Mint or Turbo Tax, is upending
financial institutions. Applications such as these could collect personal data and provide financial
advice. Other programs, IBM Watson being one, have been applied to the process of buying a
home. Today, software performs much of the trading on Wall Street.
AI in law. The discovery process, sifting through of documents, in law is often overwhelming for
humans. Automating this process is a better use of time and a more efficient process. Startups are
also building question-and-answer computer assistants that can sift programmed-to-answer
questions by examining the taxonomy and ontology associated with a database.
AI in manufacturing. This is an area that has been at the forefront of incorporating robots into the
workflow. Industrial robots used to perform single tasks and were separated from human workers,
but as the technology advanced that changed.

6|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 2

2.1 Understanding the ChatterBot Library

ChatterBot is a Python library that is developed to provide automated responses to user


inputs. It makes utilization of a combination of Machine Learning algorithms in order to
generate multiple types of responses. This feature enables developers to construct chatbots
using Python that can communicate with humans and provide relevant and appropriate
responses. Moreover, the ML algorithms support the bot to improve its performance with
experience.

Another amazing feature of the ChatterBot library is its language independence. The library
is developed in such a manner that makes it possible to train the bot in more than one
programming language.

2.2 Understanding the working of ChatterBot Library

When a user inserts a particular input in the chatbot (designed on ChatterBot), the bot saves
the input and the response for any future usage. This information (of gathered experiences)
allows the chatbot to generate automated responses every time a new input is fed into it.

The program picks the most appropriate response from the nearest statement that matches
the input and then delivers a response from the already known choice of statements and
responses. Over time, as the chatbot indulges in more communications, the precision of
reply progresses.

2.3 Creating a ChatBot using Python

We will follow a step-by-step approach and break down the procedure of creating a Python
chat.

We will begin building a Python chatbot by importing all the required packages and modules
necessary for the project. We will also initialize different variables that we want to use in it.
Moreover, we will also be dealing with text data, so we have to perform data preprocessing
on the dataset before designing an ML model.

7|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

This is where tokenizing supports text data - it converts the large text dataset into smaller,
readable chunks (such as words). Once this process is complete, we can go for lemmatization
to transform a word into its lemma form. Then it generates a pickle file in order to store the
objects of Python that are utilized to predict the responses of the bot.

Another major section of the chatbot development procedure is developing the training and
testing datasets.

8|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 3

PROBLEM IDENTIFICATION

3.1 Problem Identification-.


Changing of requirements As an industrial project to build a product, we must follow the
requirement from the user. However, because the project’s goal is to be used by the business
team, but it is responsible by the technical team, the requirement changed a lot in the middle after
a meeting with the business team. The business team want a simple bot that can give
recommendation immediately. We had to archive what we had done before and build a new one.

• Lacking of training data. The quantity and quality of training data is critical to the
performance to a machine learning model. However, because some
confidential and privacy reasons, the business team cannot provide enough data for us, and
we had to make up data by our own. For the machine learning model, we generate some
fake data based on our daily life experience, which is really biased, although with a good
accuracy on the fake dat.

• Unstable API version. Because API service we are using are still under
development, and we cannot fix to a version for the API, the API may changes
overtime. Moreover, there are inconsistencies between the APIs and their
documents or sample codes.

• Not familiar with the PHP language and .NET framework. None of the three of us
has previous knowledge with PHP language. Programming in a new language in such
a huge framework is quite challenging for us at the beginning of the project. However,
when we comes to the later phases, we are more used to that.

9|Pa ge Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 4

REQUIREMENTS AND SPECIFICATION

3.1 Hardware Requirements:

Processor : Pentium IV(minimum)

Hard Disk : 40GB


RAM : 256MB (minimum)

3.2 Software Requirements:

Operating System : Windows or Linux


Technology : PYTHON, AIML

10 | P a g e Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 5

PROPOSED SOLUTION

5.1 Creating and Training the Chatbot

The next step is to create a chatbot using an instance of the class "ChatBot" and train the bot
in order to improve its performance. Training the bot ensures that it has enough knowledge, to
begin with, particular replies to particular input statements.

Let us consider the following snippet of code for the same.

File: my_chatbot.py

# creating a chatbot
myBot = ChatBot(
name = 'Sakura',
read_only = True,
logic_adapters = [
'[Link]',
'[Link]'
]
)

Explanation:

In the above snippet of code, we have defined a variable that is an instance of the class
"ChatBot". We have included various parameters within the class. The first parameter, 'name',
represents the name of the Python chatbot. Another parameter called 'read_only' accepts a
Boolean value that disables (TRUE) or enables (FALSE) the ability of the bot to learn after the
training. We have also included another parameter named 'logic_adapters' that specifies the
adapters utilized to train the chatbot.

While the '[Link]' helps the chatbot solve mathematics


problems, the ` helps it select the perfect match from the list of responses already provided.

Since we have to provide a list of responses, we can perform it by specifying the lists of strings
that we can use to train the Python chatbot and find the perfect match for a certain query. Let
us consider the following example of responses we can train the chatbot using Python to learn.

File: my_chatbot.py
11 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

# training the chatbot


small_convo = [
'Hi there!',
'Hi',
'How do you do?',
'How are you?',
'I\'m cool.',
'Always cool.',
'I\'m Okay',
'Glad to hear that.',
'I\'m fine',
'I feel awesome',
'Excellent, glad to hear that.',
'Not so good',
'Sorry to hear that.',
'What\'s your name?',
' I\'m Sakura. Ask me a math question, please.'
]

math_convo_1 = [
'Pythagorean theorem',
'a squared plus b squared equals c squared.'
]

math_convo_2 = [
'Law of Cosines',
'c**2 = a**2 + b**2 - 2*a*b*cos(gamma)'
]

Explanation:

In the above snippet of code, we have defined some list of responses in order to train the
chatbot. We can also create and train the chatbot by simple typing an instance of "ListTrainer"
and providing it with a list of strings as shown below:

File: my_chatbot.py

# using the ListTrainer class


list_trainee = ListTrainer(myBot)
for i in (small_convo, math_convo_1, math_convo_2):
12 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

list_trainee.train(i)

Explanation:

In the above snippet of code, we have created an instance of the ListTrainer class and used
the for-loop to iterate through each item present in the lists of responses.

Now, the Python chatbot is ready to communicate.

5.2 Communicating with the Python chatbot

We can use the get_response() function in order to interact with the Python chatbot. Let us
consider the following execution of the program to understand it.

Output:

# starting a conversation
>>> print(myBot.get_response("Hi, there!"))
Hi
>>> print(myBot.get_response("What's your name?"))
I'm Sakura. Ask me a math question, please.
>>> print(myBot.get_response("Do you know Pythagorean theorem"))
a squared plus b squared equals c squared.
>>> print(myBot.get_response("Tell me the formula of law of cosines"))
c**2 = a**2 + b**2 - 2*a*b*cos(gamma)

Explanation:

The above execution of the program tells us that we have successfully created a chatbot in
Python using the chatterbot library. However, it is also necessary to understand that the
chatbot using Python might not know how to answer all the queries. Since its knowledge and
training are still very limited, we have to provide it time and give more training data to train it
further.

5.3 Training the Python Chatbot using a Corpus of Data

As we move to the final step of creating a chatbot in Python, we can utilize a present corpus of
data to train the Python chatbot even further.

Let us consider the following example of training the Python chatbot with a corpus of data given
by the bot itself.

File: my_chatbot.py
13 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

from [Link] import ChatterBotCorpusTrainer


corpus_trainee = ChatterBotCorpusTrainer(myBot)
corpus_trainee.train('[Link]')

Explanation:

In the above snippet of code, we have imported the ChatterBotCorpusTrainer class from
the [Link] module. We created an instance of the class for the chatbot and set
the training language to English.

Moreover, from the last statement, we can observe that the ChatterBot library provides
this functionality in multiple languages. Thus, we can also specify a subset of a corpus
in a language we would prefer. Hence, our chatbot in Python has been created.

14 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

5.4 Complete Project Code


File: my_chatbot.py

# importing the required modules


from chatterbot import ChatBot
from [Link] import ListTrainer
from [Link] import ChatterBotCorpusTrainer

# creating a chatbot
myBot = ChatBot(
name = 'Sakura',
read_only = True,
logic_adapters = [
'[Link]',
'[Link]'
]
)

# training the chatbot


small_convo = [
'Hi there!',
'Hi',
'How do you do?',
'How are you?',
'I\'m cool.',
'Always cool.',
'I\'m Okay',
'Glad to hear that.',
'I\'m fine',
'I feel awesome',
'Excellent, glad to hear that.',
'Not so good',
'Sorry to hear that.',
'What\'s your name?',
' I\'m Sakura. Ask me a math question, please.'
]

math_convo_1 = [
15 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

'Pythagorean theorem',
'a squared plus b squared equals c squared.'
]

math_convo_2 = [
'Law of Cosines',
'c**2 = a**2 + b**2 - 2*a*b*cos(gamma)'
]

# using the ListTrainer class


list_trainee = ListTrainer(myBot)
for i in (small_convo, math_convo_1, math_convo_2):
list_trainee.train(i)

# using the ChatterBotCorpusTrainer class


corpus_trainee = ChatterBotCorpusTrainer(myBot)
corpus_trainee.train('[Link]')

16 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

17 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 6
IMPLEMENTATION

Implementation
This section covers the design and implementation of different module of the bot, which
contains the design of the PYTHON module, the Translator API and the AIML module..

Fig 6.1 Execution of main file

18 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

Fig 6.2 Continue

19 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

Chatbot Interface

Fig 6.3 Chatbot Interface

20 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

Fig 6.4 Chatbot Conversation

21 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 7
ADVANTEGES & DISADVANTEGES

7.1 Advantages

1. Accessible anytime:

I’m sure most of you are always kept on hold while operators connect you to a customer
care executive. On an average people spend around 7 minutes until they are assigned to
a person. Gone are the frustrating days of waiting in a queue for the next available
operative. They are replacing live chat and other forms of slower contact methods such
as emails and phone calls. Since chatbots are basically virtual robots they never get tired
and continue to obey your command. They will continue to operate every day
throughout the year without requiring to take a break. This improves your customer UX
and helps you rank highly in your sector. Another advantage of this instant response is
that you can also skillfully craft your chatbot to maintain your image and brand.

2. Handling Capacity:

Unlike humans who can only communicate with one human at a time, chat bots can
simultaneously have conversations with thousands of people. No matter what time of
the day it is or how many people are contacting you, every single one of them will be
answered immediately.
Imagine you own a restaurant, and you have a good reputation for your food of which
most of your revenues come from delivery. As the demand keeps rising, you will have
more customers to take orders from but very few staff to attend them all. Having a
chatbot would eliminate such problem and cater to each and every person and ensure
that no order is missed. Companies like Taco Bell and Dominos are already using
chatbots to arrange delivery of parcels.

3. Flexible attribute:
22 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

Chatbots have the benefit that it can quite easily be used in any industry. Unlike other
products where you have to do a lot of development and testing to change platforms,
chatbots are relatively easy to switch. One has to just train the bot by giving the right
conversation structure and flow to switch its current field or industry.

Or if there is a lot of back and forth between two sections of the industry say
customer support and sales, then you could have custom built presets which would
already have the conversation flow and structure to carry out the interactions with the
user.

23 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

4. Customer Satisfaction:

Humans are bound to change of emotions. Chatbots, on the other hand, are bound by
some rules and obey them as long as they’re programmed to. They will always treat a
customer in the perfect way no matter how rough the person is or how foul language the
person uses.
Not everyone orders the same food everyday, people’s choices may change everyday.
In this case, it can use your order history to make suggestions for the next order, learn
your address details and much more. Customers love this smooth interaction and want
all their transactions to be as simple as possible.

5. Cost Effective:

Hiring a human for a job is never a cheap affair, and it will be expensive if your revenue
are not high or sales targets are not met and would create havoc in the business. Due to
the boundaries of human beings, a single human can only handle one or two people at
the same time. More than that would be extremely tough for the employee.
Chatbots could help solve this age-old problem. As one chatbot is equal to loads of
employees, it can easily communicate with thousands of customers at the same time.
We would only need a handful of people to jump into conversations sometimes when
necessary. Hence, it would drastically bring down the expenses and bring about a steep
rise in revenue and customer satisfaction.

6. Faster Onboarding:

Before you want to accomplish a task, you first must learn how to work on the task and
complete it. Only then will they be considered fit for the job. There is a continuous
teaching involved in every level of hierarchy the employee will go through. Also, there
will be a lot of change in the employees, some stay, some get fired, some more join in
etc.
What we want to say is, employees will change; it’s a fact. And this would require you
to allot a lot time of your employees into grooming the new joinees. Chatbots could
24 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

eliminate that time to almost zero, but provide a very clean and easy to understand
conversation flow and structure that needs to be maintained by the chatbot. No doubt
there will be changes in
this too, but it will rather take a fraction of your time to resolve as compared to human
employees.

25 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

7.2 Disadvantages-

1. Too many functions

Most of developers strive to create a universal chatbot that will become a fully-fledged
assistant to user. But in practice functional bots turn out not to cope with the majority
of queries. They often do not understand the user, forget what they were told 5 minutes
earlier, and have many other disadvantages. And that is no wonder, as the development
of a universal bot, which would understand natural language and could evaluate context,
takes years of hard work for a team of experienced programmers. And even in this
case, such programs should be constantly improved while in service.
However, modern technologies allow building rather useful bots to perform specific
actions such as booking train tickets or providing support to bank customers.

2. Primitive algorithms

There are two types of bots:


based on artificial intelligence, being able to learn in the process of
communication; programmed for specific behavior scenarios.
Artificial intelligence chatbots are considered to be better, as they can respond
depending on the situation and context. But the development of complex algorithms is
required for this purpose. Meanwhile, only IT giants and few developers possess such
powerful technological base.
Therefore, it would be better for ordinary companies to focus on the second variant of
bots, as they are more reliable and simpler. Namely for the reason they do not possess
intelligence, they will not be able to adopt rude communication patterns and get beyond
the control of creators.

3. Complex interface

Talking to a bot implies talking in a chat, meaning that a user will have to write a lot. And in
case a bot cannot understand the user’s request, he will have to write even more. It takes time
26 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

to find out which commands a bot can respond to correctly, and which questions are
better avoid. Thus, talking to a chatbot does not save time in the majority of cases.
Perhaps the efficiency of virtual assistants will increase due to the implementation of
voice recognition function in the future. But for the time being their functional
capabilities are very restricte, and they can be truly useful only in a few business

27 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

28 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

CHAPTER 9
CONCLUSION AND FUTURE SCOPE

9.1 Conclusions

Chatbots are the new Apps! As we have discussed in the above deliverables, this project brings
the power of chatbots to Yioop and enriches its usability. Chatbots in Yioop can give a human
like touch to some aspects and make it an enjoying conversation. And they are focused entirely
on providing information and completing tasks for the humans they interact with. The above
mentioned functionality in all the deliverables is implemented and pushed in to Yioop code.
By implementing the above mentioned deliverables I was able to add a basic chatbot
functionality in to the Yioop. I.e., configuring and creating accounts for bot users with bot
settings which is mentioned in deliverable 2, activating a bot whenever a user asks for it via
post in a thread which is discussed in deliverable 3 and as I discussed in deliverable 4, I have
implemented a simple weather chatbot that gives weather information whenever a user ask and
Fig. 3 tells that I was also able to converse with the bot in Yioop. I intend to enhance the system
developed so far in CS298. Next step towards building chatbots involve helping people to
facilitate their work and interact with computers using natural language or using set of rules.
Future Yioop chatbots, backed by machine-learning technology, will be able to remember past
conversations and learn from them to answer new ones. The challenge would be conversing
with multiple bot users and multiple user

9.2 Future Scope

There are limitations to what has been currently achieved with chatbots. The limitations of data
processing and retrieval are hindering chatbots to reach their full potential. It is not that we lack
the computational processing power to do so. However, there is a limitation on “How” we do
it. One of the biggest examples is the retail customer market. Retail customers are primarily
interested in interacting with humans because of nature of their needs. They don’t want bots to
process their needs and respond accor

29 | P a g e

Downloaded by sangu ghar (sangu675@[Link])


lOMoARcPSD|55154509

References

1. Bayan Abu Shawar and Eric Atwell, 2007 “Chatbots: Are they Really Useful?”
2. LDV Forum - GLDV Journal for Computational Linguistics and Language
Technology.
3. [Link]
4. Bringing chatbots into education: Towards natural language negotiation of openlearner
models. Know.-Based Syst. 20, 2 (Mar. 2007), 177-185.
5. Intelligent Tutoring Systems: Prospects for Guided Practice and Efficient Learning.
Whitepaper for the Army's Science of Learning Workshop, Hampton, VA. Aug 1-
3, 2006.
6. [Link]
7. ALICE. 2002. A.L.I.C.E AI Foundation, [Link]

30 | P a g e

Downloaded by sangu ghar (sangu675@[Link])

You might also like