Design and Implementation of A Web-Based Chatbot System
Design and Implementation of A Web-Based Chatbot System
TITLE PAGE
CERTIFICATION
DEDICATION
ACKNOWLEDGEMENTS
ABSTRACT
TABLE OF CONTENTS
LIST OF FIGURESix
LIST OF TABLES
2.1 Chatbots 7
2.4.1Rule-Based System 12
2.5.2Machine Learning 15
ii
2.5.3Natural Language Processing (NLP) 16
2.5.4Cognitive Computing 16
2.5.5Firebase Database 16
2.5.6Google Dialogflow 17
3.1 Overview 37
4.1 Implementation 41
4.7 Results 63
5.1 Discussions 70
5.2 Recommendations 71
5.3 Conclusion 71
REFERENCES 73
LIST OF FIGURES
Figures Pages
iv
4.13: Landing page of the chat module
LIST OF TABLES
Tables Pages
CHAPTERONE
INTRODUCTION
In this technology-driven world, access to information has been made easier than ever. Continuous
modifications in the interactions among individuals daily, prompted by technological progress, have
interaction, solely because it bridges the gap of communication. It can occur in human-human interaction
A chatbot is a tool that can simulate this kind of interaction byunderstanding the context and deliveranceof
an appropriate response.It is a program that simulates a conversation between a human and a computer.
Chatbots are used a lot in customer interactions, marketing on social network sites, and instant messaging
the client. Integrating chatbots into websites can be very profitable for business owners who are trying to
Entrepreneurs have realized that without a fast, multilingual customer-service team that offers 24/7 support
to the customers, it will be difficult to succeed in any industry. With the integration of a chatbot intoa
website, this service is provided at the customer’s beck and call. While chatbots cannot hold a truly natural
conversation, they perform well at being consistent as they will only do what they are programmed to do.
Strutynskyi(2020) stated that chatbots cannot replace humans in sales completely, but they can take over
answering repetitive questions and taking simple orders. For cases when advanced support is needed, a “Call
a human agent” button is often present. With this short overview done, it is safe to say that since their first
appearance, chatbots have been bringing revolutionary changes to the business world and will keep doing
so.
v
Huang (2021) stated that artificial Intelligent machines can operate tasks of varying complexity, from
general work to sophisticated operations such as object detection using computer vision. Prominent trends in
this field are human brain simulation, natural-language processing and neural networking to name the least.
computer program that mimics human conversation in its natural form using interactive textual or speech
skills.
Since the introduction of the first of its kind, ELIZA, in 1966, chatbots have evolved with the progressive
increase in computational capabilities and advances in Natural Language Processing tools and techniques.
ELIZA was a landmark system that inspired further research in the field. The application of chatbots has
expanded with the emergence of Deep Learning algorithms. One of the new, and the most interesting
application, is the development of smart personal assistants (such as Amazon’s Alexa, Apple’s Siri, Google’s
Google Assistant (Google Developers, 2023), Microsoft’s Cortana, and IBM’s Watson).
Voice assistants such as Apple SIRI, Microsoft Cortana, Amazon Alexa, and Google Assistant are widely
spread in today’s world. These systems are continually developing thanks to breakthroughs in speech
recognition and text-to-speech technologies. A major role in this development plays new research in the area
of deep learning, gains in computing power of GPUs and releases of ever more powerful mobile devices.
A chatbot can process user input and produce an output. Usually, chatbots take natural language text as
input, and the output should be the most relevant response to the user input sentence.Chatbots can directly
converse with users using artificial intelligence and Machine Learning concepts. It can also be defined as an
“online human-computer dialogue system(s) with natural language”. Chatbots constitute therefore an
automated dialogue system, that can attend to thousands of potential users at once.Usually, a chatbot
program understands one or more human languages although a general understanding of naturally-spoken
language across multiple dialogue steps, even in single task-oriented situations still cannot be achieved.
Hence, the system interprets human language input using information fed to it from the model or the
database. Creating a chatbot system for websites enables quick question response and problem-solving. This
vi
1.2 Statement of Problem
Website owners face a lot of issues ranging from providing customer support to engaging and interacting
with users at various points in time. Hence, businesses waste a lot of capital and time, thereby, reducing their
efficiency in the business sector. There is so much a human can do when providing help. This is where a
The chatbot system aims to replace the human personnel that should be doing this job. The system will
constitute a chat CUI (Conversational User Interface) that will cater for different and varying needs per user.
The system consists of a chat module that interacts with the user’s input. The chatbot system can help
customers find the right services and products as well as answer their questions.
Thisaim of this research is to design and implement a web-based chatbot system using Python and NLTK
(ii) to design and implement a web-based chatbot system to interact with website users and auto-
The use of web-based chatbots comes in handy in this generation due to easy access to mobile devices and
the internet. It is a technological revolution that is impacting the user experience of many websites as it
helps with easy communication. The use of AI and chatbots improve the quality of day-to-day
operations.Chatbots are developed and become so popular due to the increased use of smart devices and IoT
technology. MacDonald (2019) There have been several attempts at solving the problem of expanding
datasets. Some authors suggest using a NLP library with a programming language like Python, some also
suggest using data pre-sets to determine what response the chatbot system gives. In this work,a combination
vii
of datasets with NLP librariesis used to implement a chatbot system. Some research has been done in this
area to define and prove the effectiveness of this concept and the exploration of this concept is currently
ongoing. Strutynskyi (2020) Despite the amount of existing work in the area of machine learning, this
concept has not yet been investigated concerning chatbots, which is the topic of this work.
A more detailed literature overview is presented in the Literature review section of this thesis.
(deBayser, 2017) This work is focused majorly on helping out people who are trying to integrate a round-
the-clock chatbot system in their websites, but are struggling to do so. It might also be interesting for
researchers working in the area of Machine Learning, companies looking for a suitable chatbot for business
Accuracy: The degree to which the result of a measurement, calculation and specification conforms to the
Artificial Intelligence (AI): The simulation of human intelligence processes by machines, especially
computer systems. Specific applications of AI include expert systems, natural language processing, speech
Conversational User Interface (CUI): A user interface for computers that emulates a conversation with a
real human.
Data: Information in its raw form must be processed before it can become meaningful information.
Dataset: A collection of related data or information composed of separate elements which can be
Graphical User Interface (GUI): a form of user interface that allows users to interact with electronic
devices through graphical icons and audio indicators such as primary notation, instead of text-based UIs,
Machine Learning (ML): An AI technique that teaches computers to learn from experience.
viii
Natural Language Processing (NLP): The application of computational techniques to analyse and
Natural Language Toolkit (NLTK): A suite of libraries and programs for symbolic and statistical natural
Chapter One: presents the background to the study, statement of the problem, aim and objectives of the
Chapter Two: contains the overview of existing work in the area of building chatbots, training them using a
Chapter Three:discusses the severaltechniques employed in achieving the different objectives of the study.
ix