Natnael Mekuanent 2021
Natnael Mekuanent 2021
Natnael Mekuanent 2021
Chatbot based customer service model using Deep Learning: the case
of Ethiopian Airlines
July 2021
Addis Ababa University
College of Natural Sciences
This is to certify that the thesis project prepared by Natnael, titled: “Chatbot
based customer service model using Deep Learning: the case of Ethiopian
Airlines.” and submitted in partial fulfillment of the requirements for the Degree
of Master of Science in Computer Science complies with the regulations of the
University and meets the accepted standards with respect to originality and
quality.
I would like to express my gratitude to my advisor Dr. Ayalew Belay for his support, valuable
advice, constructive guidance, follow ups and encouragement all the way through this study.
I am grateful to Mrs. Simret Abule for giving her time in helping and making me motive to
proceed till the completion of the work, and I want to acknowledge you with best of wish to
have success in your life.
Finally, I express my very deep gratitude to my parents for providing me with unfailing
support and continuous encouragement throughout my years of study and through the process
of researching and writing this thesis. My heartfelt thanks also goes to my beloved wife “ሂዊ”
who bears with me while I was staying away from home at the busy time of this research
work. I am so grateful for her unconditional love, and for encouraging me to strive to fulfill
all my hopes and dreams.
Table of Contents
List of Tables ...................................................................................................................................... iv
List of Figures ...................................................................................................................................... v
List of Algorithms .............................................................................................................................. vi
Acronyms and Abbreviations........................................................................................................... vii
CHAPTER ONE ................................................................................................................................... 1
1.INTRODUCTION.............................................................................................................................. 1
1.2 Motivation ................................................................................................................................... 2
1.3 Statement of the Problem ............................................................................................................ 3
1.4 Objectives.................................................................................................................................... 4
1.5 Methods ....................................................................................................................................... 4
1.6 Scope and Limitation .................................................................................................................. 5
1.7 Application of Result .................................................................................................................. 5
1.8 Organization of the Thesis .......................................................................................................... 6
CHAPTER TWO .................................................................................................................................. 7
LITERATURE REVIEW...................................................................................................................... 7
2.1 Introduction ................................................................................................................................. 7
2.1.1 Definition of a chatbot.......................................................................................................... 7
2.1.2 Classification of Chatbot ...................................................................................................... 7
2.1.3 Evolution of the Chatbots................................................................................................... 10
2.2. Techniques applied in chatbots ................................................................................................ 13
2.2.1 Word Embedding ............................................................................................................... 13
2.2.2 Recurrent neural network (RNN): ...................................................................................... 16
2.2.3 Convolutional Neural Network (CNN): ............................................................................. 20
2.3 Neural Network Based Models for Chatbots ............................................................................ 21
2.3.1 Retrieval based Neural Network ........................................................................................ 21
2.3.2 Generation based Neural Network ..................................................................................... 21
2.4 Chatbots evaluation metrics ...................................................................................................... 22
2.5 Summary ................................................................................................................................... 22
CHAPTER THREE............................................................................................................................. 24
RELATED WORK ............................................................................................................................. 24
3.1 Summary ................................................................................................................................... 30
i
CHAPTER FOUR ............................................................................................................................... 31
Design of Chatbot Based Customer Services system.......................................................................... 31
4.1 Introduction ............................................................................................................................... 31
4.2 Architecture of the Chatbot System .......................................................................................... 31
4.3 Data Sets ................................................................................................................................... 33
4.4 Data Preprocessing .................................................................................................................... 33
4.4.1 Tokenization....................................................................................................................... 34
4.4.2 Normalization..................................................................................................................... 34
4.4.3 Removal of stop words....................................................................................................... 35
4.4.4 Stemming of words ............................................................................................................ 36
4.4.5 Vocabulary building ........................................................................................................... 36
4.5 Feature Extraction ..................................................................................................................... 36
4.5.1 Bag of words ...................................................................................................................... 37
4.5.2 Word2vec ........................................................................................................................... 37
4.6 Create Training and Testing Data ............................................................................................. 37
4.7 Model Building ......................................................................................................................... 38
4.8 Evaluation Metrics .................................................................................................................... 38
CHAPTER FIVE................................................................................................................................. 39
Implementation of Chatbot based customer service system ............................................................... 39
5.1 Introduction ............................................................................................................................... 39
5.2 Data Set collection .................................................................................................................... 39
5.3 Intents Management .................................................................................................................. 40
5.4 Implementation ......................................................................................................................... 40
5.4.1 Preparing data..................................................................................................................... 40
5.4.2 Cleaning the corpus collected – remove stop words .......................................................... 41
5.4.3 Creating training and testing data....................................................................................... 42
5.4.4 Develop the model ............................................................................................................. 42
5.4.5 Prototype of the System ..................................................................................................... 43
5.5 Evaluation of the model ............................................................................................................ 45
5.5.1 Long Short-Term Memory ................................................................................................. 45
5.5.2 Convolutional Neural Network .......................................................................................... 46
5.6 Discussion ................................................................................................................................. 49
ii
CHAPTER SIX ................................................................................................................................... 50
Conclusion and Recommendation....................................................................................................... 50
6.1 Conclusion ................................................................................................................................ 50
6.2 Contribution of the work ........................................................................................................... 50
6.3 Recommendation....................................................................................................................... 51
References .......................................................................................................................................... 52
Annexes .............................................................................................................................................. 57
iii
List of Tables
Table 3.1 Summary of Related work................................................................................................... 27
Table 5.2 LSTM architecture parameter configuration ..................................................................... 46
Table 5.3 LSTM performance evaluation of overall dataset .............................................................. 46
Table 5.4 CNN architecture parameter configuration ....................................................................... 47
Table 5.5 CNN performance evaluation of overall dataset ................................................................ 47
iv
List of Figures
Figure 2.1 Taxonomy of Chatbot Application [05] .............................................................................. 8
Figure 2.2 Classification of Generated-based Models [05] .................................................................. 9
Figure 2.3 Screenshot of a conversation with ELIZA [15] ................................................................ 10
Figure 2.4 A neural language model, which embed the input to the output [29] ............................... 14
Figure 2.5 Skip and CBOW Word2Vecmethod [30]. ........................................................................ 16
Figure 2.6 Structure of RNN [32]. ..................................................................................................... 17
Figure 2.7 RNN input and output Architecture [32]. ......................................................................... 17
Figure 2.8 Recurrent neural network.................................................................................................. 18
Figure 2.9 An LSTM cell. The figure shows forget gate (f), input gate (i), output gate (o). [26] ...... 19
Figure 2.10 Sequence to sequence model architecture [39] ............................................................... 20
Figure 2.11 Convolutional Neural Network architecture [40]. .......................................................... 21
Figure 4.1 Architecture of Chatbot based Ethiopian airlines customer service system ..................... 32
Figure 4.2 Model building flow diagram ........................................................................................... 38
Figure 5.1 Snapshot of corpus for building Word2Ve (JSON file) .................................................... 41
Figure 5.2 Snapshot code for cleaning the corpus and removing stop words .................................... 41
Figure 5.3 Snapshot of code for creating training and testing data .................................................... 42
Figure 5.4 Snapshot of code for developing the model ...................................................................... 43
Figure 5.5 Snapshot of Ethiopian airlines chatbot based customer service system Conversation
Interface .............................................................................................................................................. 44
Figure 5.6 Snapshots of Libraries for neural network ........................................................................ 45
Figure 5.7 Accuracy value diagram of CNN ...................................................................................... 48
Figure 5.8 Loss value diagram of CNN ............................................................................................. 48
v
List of Algorithms
vi
Acronyms and Abbreviations
AI Artificial Intelligence
AIML Artificial Intelligence Markup Language
ALICE Artificial Linguistic Internet Computer Entity
ANN Artificial Neural Networks
BOW Bag-of-Words
CBOW Continuous Bag-of-Words
F1 F1-score
BLEU Bilingual Evaluation Understudy
CNN Convolutional Neural Network
ELIZA Elisabeth
FAQ Frequently Asked Questions
GUI Graphical User Interface
LSTM Long short-term memory
NLTK Natural Language Toolkit
RNN Recurrent Neural Network
Word2Vec Word to vector
NLP Natural Language Processing
TF-IDF Term Frequency-Inverse Document Frequency
XML eXtensible Markup Language
vii
CHAPTER ONE
1.INTRODUCTION
Nowadays, the way we communicate with digital devices is mostly constrained, based on what
features and accessibility each device offers [1]. However simple it may be, there is a learning
curve associated with different new device we communicate with. Currently, Chatbots are the
simplest method we have for software to be native to humans because they offer an experience
of talking to another person. Since chatbots imitate a real person, Artificial Intelligence (AI)
techniques are applied to build them [2].
Tasks previously performed by secretaries are now getting digitized by virtual assistants. To
increase and improve the ease of user interaction with any system, human and artifact
collaboration is essential. The assistants also called as chatbots can interact with humans
through text, voice, or images [3]. A chatbot is a program designed to simulate an intelligent
conversation with a human partner. Virtual assistants can quickly change into capable,
responsible, and valuable assets to the public. A deep learning software is a set of algorithms
which typically uses artificial neural networks to learn in multiple levels corresponding to
different level of abstraction data such as images, sound, text. This type of software is Present
in some of these devices to deliver high-end speech recognition and clarity [4].
Conversational agent or Chatbot is a program that produces response based on given input to
imitate human conversations in text or voice mode. These applications are created to imitate
human-human interactions. Chatbots are mainly used in business and corporate organizations
including government, non-profit and private ones. Chatbot operations can range from
customer service, product suggestion, product inquiry to personal assistant [5]. Lots of these
chat agents are developed using rule-based techniques, retrieval techniques or simple machine
learning algorithms. Rule-based chatbots are also described to as decision-tree bots. As the
name indicates, they apply a series of defined rules. These rules are the foundation for the
types of challenges the chatbot is familiar with and can deliver solutions for. As a
flowchart, rule-based chatbots map out the conversations. In retrieval-based techniques, chat
agents search for keywords within the input phrase and retrieves relevant answers according
to the query string. They depend on keyword similarity and retrieve text is pulled from internal
or external data sources including world wide web or organizational database [6]. Some other
1
advanced chatbots are designed with natural language processing (NLP) techniques and
machine learning algorithms. Also, there are several commercial chat engines available, which
help build chatbots as per the client data input.
Recently, there have been major increase of need in use and deployment of dialogue
generation systems. A chatbot can be taken as a question-answer system where professionals
offer knowledge for act of asking of the user. These chatbots are mostly supported by Artificial
Intelligence. Several main technology enterprises are utilizing virtual aid or chat agent to fill
the demands of customers. Some commonly available chatbots are Amazon Alexa, Apple Siri,
Google Assistant, Microsoft Cortana, and many more [7]. Although they are primarily
question answering systems, their implementation by major corporations has picked interest
in clients and appears encouraging for more improved conversational agent system for
research and development. The dialogue between users and customer service agents on
different applications platform can be taken as representing one sequence of words as a query
and the next sequence of words an answer [8].
1.2 Motivation
Various organizations are looking to integrate automated AI-based solutions such as chatbots
into their customer service to offer quicker and low-cost assistance to their customers who are
becoming increasingly comfortable with technology. Chatbots can effectively operate a
dialogue, usually replacing additional communication tools such as email, telephone, or SMS.
Numerous studies have been conducted studying user preferences concerning customer
service [9]. The first motivation of the work is chatbot systems are very helpful as they permit
users to submit a question based on some truths or stories and the system attempts to use the
context in the assisting truths and stories to answer the questions successfully. The Second
motivational work seen as customers experience problems with traditional online
communication channels: websites are hard to navigate; Users cannot get answers to simple
questions through the communication vectors. The customers’ needs, and expectations are not
being fulfilled by traditional channels such as communicating with customers thru phone call,
email, company websites or customer going on person to company offices. This serves as
motivation to analyze chatbot services and resolve those problems to develop a system that be
able to mainly use to solve most of traditional channel problems. The other motivational work
is customers get potential benefits in chatbot services: Such as 24-hour service; instant replies,
2
answers to simple questions. Generally, the motivation of this research project is, achieving
customer satisfaction by providing chatbot service to the customer through identifying the
customer needs and based on the customer queries.
Ethiopian Airlines communicate with customers via phone call, email, company websites or
customer going in person to company offices. Passenger or User may ask customer service
support staff by phone call or going in person but imagine user chats with smart bots to get
information about airline services information like, booking, check-in, on board services,
depart or arrival time and any other services based on user preferences. Customer may require
additional information how to manage a booking, update cabin and it will handle multiple
customers at a time. Therefore, the aim of this research is to design chatbot based customer
service model using deep learning for Ethiopian Airlines. The system can answer customer
question regarding Ethiopian airline services, analyze user queries, frequently asked questions
and provide guidance for users about airline specific queries and to show the capability of
deep learning to implement and enhance chatbots.
3
Research Question
How to design and develop deep learning model for supporting Customer service by
using Natural language understanding?
Which deep learning algorithms are better for developing chatbot based customer
service model using deep learning approach?
1.4 Objectives
General objective
The general objective of this research is to model a chatbot based customer service using deep
learning for enhancing customer services of Ethiopian airlines.
Specific objective
1.5 Methods
The methods that are going to be undertaken to achieve the objectives of this work are
described as follows.
Literature review – Literature review is conducted to study and analyze the chatbot
technology, explore the current development chatbot requirements, and related work
assessment will be done focusing on related developed chatbot systems.
Data Collection – All the data that are related to chatbot will be identified and analyzed from
different perspective of relevance to the airline customer service. These data sources will be
4
collected, managed, processed, and used to enhance the customer experience. Analyzing the
existing data can be a data source to understand the customers` needs based on internal and
external factors.
Development Tools – the chatbot customer service model for Ethiopian airlines will be
design, implement, and evaluate using python which have many scientific libraries by
different datasets. We use deep learning algorithm to analyze natural language understanding
processes.
Evaluations – the final stage of the research is evaluating the model to get convinced and
ensuring the applicability of the research. Accordingly, the evaluation is done using the
metrics such as accuracy, precision, Recall and F-measure to evaluate the model.
Additionally, to test objectively, how the chatbot system offer a service in quality manner with
respect to the customer need, an evaluation test will be conducted by gathering data using
questionnaire from the customers.
The limitation of this work is that the system will not support speech conversation. The users
interact with system using written query in English language.
5
major benefits chatbots offer when it comes to dealing with customers is that chatbots are all
the time there and always running, 24 hours a day, seven days a week, 365 days a year. This
is an enormous operational benefit, specifically for call centers [13]. Chatbots can
significantly alleviate the burden and query number for call centers by managing fundamental
questions and issues on their own or seamlessly forwarding clients to active agents who can
address the more important, complicated customer service issues that still need a human
intervention. This, in turn, can significantly minimize call wait times and enhance the
efficiency and quality of these activities [14].
6
CHAPTER TWO
LITERATURE REVIEW
2.1 Introduction
In this chapter the different types of the chatbots and evolution of the chatbots with their
approaches of implementation has discussed. The chatbot status through considering the
problems they suffer, and challenges are also observed. The state of the art in chatbot systems
is explained, similarly neural network based chatbot models and techniques also discussed.
Finally, the chatbots evaluation metrics has stated.
2.1.1 Definition of a chatbot
A chatbot is a conversational software system that is developed to imitate communication
experiences of a human being that communicates automatically with a user. It signifies a new,
modern form of customer assistance operated by artificial intelligence through a chat
interface. Chatbots are based on AI techniques that recognize natural language, detect
meaning, feeling, and design for expressive responses. For example, it creates simple for
customers to acquire responses to their queries in a convenient way without spending their
time waiting in phone queues or send repetitive emails. Chatbots can decrease the number of
customer calls, average handling time and budget of customer care. However, it is not easy to
attain these functionalities as it needs various complex interactions between systems [14].
2.1.2 Classification of Chatbot
The current need in chatbots can be provided to two key developments. Firstly, messaging
service development has blowout quickly over the past few years. It includes features such as
payments, ordering and booking, which would necessitate a separate application or website.
So rather than downloading a sequence of individual applications, users can achieve tasks
such as buy goods, book restaurant, and request questions all through their favorite messaging
apps. Example of some of the famous applications are Facebook Messenger, WhatsApp,
WeChat, and Line. Secondly, advanced AI techniques in connection with machine learning
and deep learning techniques have prepared understandable progress to improve the quality
of understanding and decision making on low-cost processing power. It can process the huge
amount of data and process it to acquire results that surpass human capability [15].
Chatbot applications can be classified into four different groups, namely service, commercial,
entertainment and advisory chatbot [16]. Service chatbots are developed to deliver facilities
7
to customers. For example, logistics firm to reply to questions about deliveries and provide
copies of communication documents through prompt messaging channel rather than emails or
phone calls. Commercial chatbots are implemented to streamline purchases for customers. For
example, a pizza company can facilitate delivery orders or inform promotions via messaging
interface. Entertainment chatbots are intended to keep customers involved with sports,
favorite band, movies, or other events. It gives the option of placing bets, detail on upcoming
events and ticket deals. Advisory chatbots are aimed to provide suggestions, provide
recommendations on service, offer maintenance or overhaul goods. This kind of chatbot be
able to contact people, provide support and advice tips when it is required.
According to [17], chatbot application can be categorized into two groups such as task-
oriented and non-task-oriented. Task-oriented chatbots objective is to help the customers to
accomplish certain tasks and have short conversations. For example, Siri, Google Now, Alexa
dialogue agents can give travel directions, discover restaurants, and assist to make phone calls
or texts. On the other hand, non-task-oriented chatbots emphasis on speaking with customers
to answer questions and entertainment.
According to the literature [18], they categorized chatbot applications into four groups such
as goal-based, knowledge-based, service-based and response generated-based as shown in
Figure.1.
8
2.1.2.2 Knowledge-based Chatbot
Knowledge-based chatbots are categorized according to the knowledge they retrieve from the
underlying data sources or the volume of data they are trained on. The two key data sources
are open-domain and closed-domain. Open-domain data sources response depends on general
topics and respond applicably. For example, open domain are Allen AI Science and Quiz
Bowl. Closed-domain data sources emphasis on a specific knowledge domain. All information
needed for answering the question is provided in the dataset itself.
2.1.2.3 Service-based Chatbot
Service-based chatbots are categorized according to facilities delivers to the customer. It
might be personal or commercial purpose. For example, logistics company could deliver
copies of message documents through chatbot rather than phone calls or customer can make
a meal order from MacDonald.
2.1.2.4 Response Generated-based Chatbot.
Response Generated-based chatbots are categorized based on what tasks they accomplish in
response generation. The answer models take input and output in natural language text. The
dialogue manager is responsible for joining response models together. To produce a response,
dialogue manager follows three steps. First, it practices all response models to generate a set
of responses. Second, get back a response based on priority. Third, if no priority response, the
response is chosen by the model selection policy. The emphasis of the literature is on response
generated-based chatbot. In this category, there are numerous response models that are based
on four groups as shown in Figure 2.
9
2.1.3 Evolution of the Chatbots
In this section, we see different types of chatbots developed for different purposes based on
the research done by [18] as discussed below.
2.1.3.1 Elizabot
Elizabot is one of the earliest popular chatbots in its long history. It was created at MIT Lab
in 1966 [16] and was planned to exhibit natural language conversation between humans and
machines to offer responses for the patients. Elizabot answers are personal questions that are
meant to involve the patient to carry on the conversation. It applies rule-based techniques and
a script to respond to patient’s questions with keyword matching from a set of templates and
context identification. The model notices the appropriate template and choose the equivalent
answers. If there are multiple templates, a template is chosen arbitrarily. which the model runs
it through a set of reflections to better format the string for a response. ELIZA uses keyword
matching, which means that after a certain input, the program will look for similar keywords.
If similar keywords are found, the system will construct an answer according to the rules noted
for this specific keyword, and if not, a linked remark is recalled. Therefore, ELIZA does not
essentially understand the problems of the users, she only matches the users’ answers with her
standard responses. In order not to abruptly end the conversation and to stay as human-like as
possible, ELIZA tries to keep the chat going by using certain phrases when no keyword match
can be found, such as “Very interesting. Please go on.”, or “Can you elaborate on that?” and
others.
10
Figure 1 well describes the function of ELIZA. As described above, in this conversation,
ELIZA uses the input, re-phrases it and simply exchanges the personal pronouns for matching
ones. The shortcoming of Elizabot is to hold onto a conversation going. Moreover, Eliza is
incapable of learning new patterns of speech or words, find out context through interaction
and logical reasoning abilities [23].
2.1.3.2 Alicebot
The Artificial Linguistic Internet Computer Entity (ALICE) was designed and first applied by
Richard Wallace in 1995. Alicebot is based on the modernized version of Eliza’s architecture.
Nevertheless, Alicebot is still only based on pattern matching and depth-first search method
to user’s entry. It is a type of XML phrase that encodes rules for questions and answers. It
performs a set of artificial intelligence markup language (AIML) templates to produce
answers given to the dialogue history and user utterance [21]. At first, AIML accepts the user
sentence as input and stored in known as a category. Each category consists of a reply template
and set of conditions that provide connotation to the template know as context. Then the model
prepossesses it and matched against nodes of the decision tree. When user input is matched,
the chatbot will answer or execute an action. The AIML templates replicate the user’s input
utterance using recursive techniques and it is not always meaningful answers. Therefore,
string-based rules are required to decide if the response creates an accurate or meaningful.
Different to the simple keyword matching ELIZA uses, ALICE stores its knowledge about
English conversation patterns in AIML files, Artificial Intelligence Mark-up Language [19].
These AIML files are contained of data objects called AIML objects, which again, consist of
units called topics and categories. The topics have a name attribute and a set of categories
related to this specific topic, while categories refer to the basic unit of knowledge in AIML.
Each single category serves as a rule for aligning the user’s input to the desired output, while
also consisting of a pattern and a template. The shortcoming of Alicebot is modelling of
personality to define the chatbot behavior such as traits, attitudes, mood, emotions, and
physical states [23]. The botmaster must be included personality elements within the AIML.
However, this is not a simple task. Alicebot is also unable of generating appropriate answers,
no reasoning capabilities and unable to generate human-like responses (Turing test). It
requires several categories to create a robust bot and may lead to unfeasible, difficult to
maintain or time-consuming application. Alicebot does not have intelligence features like
11
NLU, sentiment analysis and grammatical analysis to structure a sentence. In addition, if the
same input repeats during the conversation, Alicebot provides similar answers based on the
user questions based on predefined patterns.
2.1.3.3 Mitsuku
Mitsuku is a most broadly used standalone human-like chatbot created by [24] using AIML.
It was developed for general typed conversation based on rules written in AIML [25] and a
combination in a bot network such as twitter, telegram, and firebase to serve as a personality
layer. Mitsuku bot applies NLP using heuristic patterns and hosted at Pandorabot. Bot
modules abstract a lot of the work that goes into creating a robust chatbot system. To integrate
its module, need to include some AIML categories to direct inputs from users. Whenever bot
fails to find a better match for an input, it will automatically redirect to the default category.
Mitsuku can grasp a long conversation, learns from the conversation, remembers personal
details about the user (age, location, gender, etc.). Its feature includes the capability to reason
with specific objects. Mitsuku is a multi-lingual bot and uses directed machine learning. As it
learns something different, the data is sent to the human manager for verification. Mitsuku is
not operational without a large amount of training data, fail to provide dialogue management
components.
2.1.3.4 IBM Watson
Watson is rule-based AI chatbot implemented by IBM's DeepQA project [26]. It is aimed for
information retrieval and question-answering system that includes natural language
processing and hierarchical machine-learning method. Watson uses a wide range of
mechanisms to recognize and assign feature values such as names, dates, geographic
locations, or other entities to generated response. The machine learning system then learns
how to associate the values of these features into a final score for each response. Based on
that score, it scores all possible answers and chooses one as its top response. Watson has a
shortcoming such as it does not process structure data directly, no relational databases, higher
maintenance cost, targeting towards bigger organizations and yield longer time and effort to
teach Watson to use its full potential.
2.1.3.5 Google Dialogflow
Dialogflow known as Api.ai and it was developed by Google [27] and part of Google Cloud
Platform. It gives app programmers provide their users to communicate with interfaces via
voice and text exchanges powered by machine learning and natural language processing
12
technologies. This lets them focus on other integral parts of app creation rather than on
defining in-depth grammar rules. Dialogflow recognizes the intent and context of what user
says. Then match user input to specific intents and uses entities to extract relevant data from
them. And finally, permit the conversational interface to provide responses. The shortcoming
of Dialogflow is no handheld device version, not interactive user interface and poor
documentation.
2.1.3.6 Amazon Lex
Amazon Lex is an AWS service for producing conversational interfaces into applications
using voice and text. It was implemented by Amazon [28]. It offers deep learning functionality
and flexibility of natural language understanding (NLU) and automatic speech recognition
(ASR) to form highly engaging user experiences with lifelike, conversational interactions.
Amazon Lex integrates with AWS Lambda that user can easily start functions for execution
of back-end business logic for data retrieval and updates. The shortcoming of Amazon Lex is
not supporting many languages, currently, it supports only English. Unlike Watson, Lex has
a serious process to follow for web integration. In addition to that, preparation of dataset is
complex; the utterances and entities mapping are somewhat critical.
Word2vec is one of the words embedding feature extraction technique. Word2vec is a technique
that was presented by Mikolov [30], it uses a shallow neural network to train word embedding. It
13
is broadly applied in training word embedding from raw text. The concept of word2vec (word
embedding) implemented from the concept of distributed representation of words, it uses a
shallow neural network to train word embedding and predicts between every word and its context
words to words occurring in similar contexts are related.
Word vector is a process of changing the words into vectors or some sort of real numbers
which can be preprocessed by the natural language modeling [31]. After all the last output is
word embedding. Word embedding (output of vectorized word) can be able to store the
meaning of the word using low-dimensional vector (representation of words that incorporates
context.), and it can be used in multi aspect of NLP research. The word embedding approach
is holding word co-occurrence statistical information with certain sequence to determine
phrases, words, or paraphrases. Naturally, every feed-forward neural network that takes words
from a dictionary or word gallery as input and embeds them as vectors into a lower
dimensional space, after that made adjustment via back-propagation, certainly produces word
embedding, which is usually referred to as Embedding Layer [32].
Figure 2.4 A neural language model, which embed the input to the output [29]
The basic difference between a neural language model network and Word2Vec is, its
computational complexity that embedding becoming popular in the NLP space. The recent
and rapid expansion and affordability in computational power has certainly aided its
emergence [32].
The training goals in GloVe and Word2Vec are the other comparison for selecting successful
word embedding, with both equipment towards producing word embeddings that encode
general semantic relationships and can provide advantage in many deep learning tasks.
14
Common neural networks, in comparison, mostly creates task-oriented embedding with
constraint in connection to their usage all over the place.
Bengio et al. [29] firstly introduce word embedding with a real-valued word feature vector in
R. Foundation of their model still be applied in many neural language and word embedding
models. The author formally set three major layers of their network.
1. Embedding Layer: the function of this layer is generating word embedding by reproducing
an index vector with a word embedding matrix.
2. Intermediate Layer(s): this layer is based on one or more layers that creates an intermediate
representation of the input, for example a fully connected layer that implements a non-linearity
to the jointing of word embedding of n previous words.
3. Softmax Layer: this layer implements a probability distribution in vector space V.
In general, word embedding is basically the act of mapping words into vectors. This vector
representation can then be directly getting into a machine learning algorithm as features. There
are different methods of implementing this operation, which broads from a simple count
vector to deep learning approaches such as word to vector [30] and GloVe [31]. According to
this there is specific focus for this research as they evident to work effectively about chatbots.
Specially, the skip-gram model is showed broadly since it is the approach used in the python
library, Keras for embedding layers.
Word2Vec is not deep learning neural network, but it runs with deep neural network
approaches to create an embedding layer. It can be produced by using the two methods (both
using Neural Networks as their training approaches): skip gram and CBOW [30].
a) Skip Gram: This method requires the context of each word as the input and try to forecast
the word equivalent to the context. It is applicable for small volume of data and is established
to represent infrequent words well.
b) Common Bag of Words (CBOW): This looks like several context CBOW model just got
reversed to some extent. It has improved representations for more repeated words and fast.
15
Figure 2.5 Skip and CBOW Word2Vecmethod [30].
TF-IDF feature extraction uses to get the word frequency in the dataset by applying the TF and
the importance of the word in the dataset represented by measuring IDF of the word in the dataset.
TF: Term Frequency counts the number of times a particular word. Frequency increases when the
term has occurred multiple times.TF is calculated by taking the ratio of the frequency to several
terms in that particular document.
IDF: TF counts only the frequency of the word. Some words like stop words may found repeatedly
but may not be useful. Hence Inverse Document Frequency (IDF) is used to measure term’s
importance.
16
Figure 2.6 Structure of RNN [32].
The recurrent neural network works, let as assume a deeper network comprises of one input
layer, three hidden layers, and one output layer. Each hidden layer will have its specific set of
weights and their biases. The importance for hidden level is 1; then the weights and biases are
w1 and b1, w2 and b2 for second hidden level, and w3 and b3 for third hidden level. This
means that each of these layers is self-determining of each other, i.e., they do not memorize
any other previous outputs [35].
RNN is intended for sequence of data and the current input is decided by the past learnt from
previous hidden state [36]. RNNs can obtain one or more input vectors and yield one or more
output vectors and the output(s) are specific by the “hidden” state vector on behalf of the
context based on previous input(s)/output(s). So, the similar input could produce a different
output depending on previous inputs in the series.
RNN is a neural network implemented for assessing streams of data by means of hidden units.
Since RNNs deal with sequential data, they are well appropriate for the health informatics
17
domain where huge amounts of sequential data are available to process [37]. Figure 7.4 shows
a model of RNN.
In general, RNN have a major representation for keeping the information about the past time
steps. They have built with the input models which contain more mutuality. RNNs have two
kinds of present one and the past recent one input to prepare the output for the new data.
18
let it impact the output at the current time step (output gate). Below is an illustration of a
LSTM with its three gates:
Figure 2.9 An LSTM cell. The figure demonstrates forget gate (f), input gate (i), output gate (o). [26]
The gates in an LSTM are analog in the form of sigmoid, that means they range from zero to
one and analog enables them to do backpropagation. The issues of vanishing gradients are
resolved via LSTM because it retains the gradients vertical enough, which keeps the training
relatively short and the accuracy high [39]. LSTM is one of the categorization techniques of
artificial recurrent neural network (RNN) architecture widely used in deep learning. A
Recurrent Neural Network is one of artificial neural network in which the output of a unique
layer is preserved and fed back to the input that used to forecast the result of the layer. The
first layer made in the same way as it is in the feedforward network. This can be done in the
way that the product of the sum of the weights and features. However, in later layers, the
recurrent neural network process starts [40].
Each node will remember some information from each time-step to the next node that it had
in the previous time-step. In other expression, each node acts as a memory cell while
computing and performing the operations. The front propagation of the neural network
remembers the information it may need to use in the future. The system self-learns and works
towards making the right prediction, even if the prediction is wrong during the
backpropagation. This kind of neural network is very effective in text-to-speech conversion
technology. [40]
2.2.2.2 Sequence to Sequence modeling:
Sequence to sequence models is based on RNN architecture and contains of two RNNs: an
encoder and a decoder. The encoder’s function is to process the input, and the decoder to
19
process the output. Sequence to sequence models can be taken as one decoder node producing
output corresponding to one encoder node. This model has easy application in machine
translation as a corresponding word for the output language can be generated by decoder easily
by considering only at one word of input language at a time [41]. Figure 2.10 shows a simple
sequence to sequence model.
20
Figure 2.11 Convolutional Neural Network architecture [43].
21
2.4 Chatbots evaluation metrics
Currently, there are various performance metrics to evaluate chatbot performance usually
being used in different phases. Certain measurement standards are followed across industry
for Chatbot [47].
Loss is used to improve a machine learning algorithm and it is calculated on training and
validation and its analysis is based on how fine the model is performing in these two sets. It
is the addition of mistakes made for each example in training or validation sets. Loss value
indicates how poorly or well a model behaves after each iteration of optimization. It is
commonly applied in the training process to obtain the "best" parameter values for model [48].
Accuracy is a system measurement that commonly describes how the model performs
throughout all classes. It is helpful when all classes are of equal significance and computed as
the ratio between the number of correct predictions to the whole number of predictions. we
use this system of measurement to assess how accurate our model's prediction is compared to
the true data [49].
Precision answers how many are essentially correct from which are categorized as important.
It expresses how many times the model predicts are true [50].
Recall shows the number of proportions that are truly relevant [47]. It measures the
completeness of the model.
F-1 score calculated as the weighted average of Precision and Recall. Hence, this score
requires both false positives and false negatives into consideration. But F1 is usually more
suitable than accuracy, especially if we have an unbalanced class distribution. F-1 score
evaluation metrics used as evaluating intents in classification problems [51].
2.5 Summary
According to the literature, to make chatbot the various technology has been used and it is
stated that how the numerous chatbot differs from each other’s. A chatbot can be considered
as a question-answer system where professionals provide knowledge for demand of users. A
chatbot is a software devised to imitate a conversation with human partner. They are a program
that communicates with humans using natural language. Chatbots are utilized in many
organizational domains where it can reinstate humans. However, the broadest application of
chatbots is in the field of e-commerce for automating customer service. Chatbots assist to
improve customer relations as well as drastically minimize human efforts.
22
This literature presented an overview of an existing approaches of implementing a chatbot
system and review on some of the existing state-of-the-art models. We start from the
taxonomy of the chat bots. Then the existing chatbots that compares various chatbot from the
first chatbot ELIZA to one of the latest chatbot like ALEXA, IBM Watson, Siri, etc. Then this
section discussed how those different chatbots have been implemented and how they actually
work. Then we looked at Techniques applied in chatbots, Neural network-based models for
Chatbots and finally the metrics that uses to evaluate chatbots.
23
CHAPTER THREE
RELATED WORK
There are many researchers conducted their research regarding chatbots in various parts of the
world for the different cases. Therefore, in this chapter some of the researchers work along
with the tools and methodologies used with their respective finding is the target of the review.
Peters, Florian [52] designed and implemented a chatbot in the context of customer support.
The author defined the chatbot’s goals, a set of user problems and constraints. Then a scalable
software solution was designed and developed for training and deploying chatbots. The author
extracted ticket data dynamically from an existing Zendesk environment and label them using
tags attached to the tickets. The research described the chatbot concept was decomposed into
several modules which solve a particular design problem. Among the modules, some of them
make use of neural network models. These models’ structure and property were analyzed. A
way for the chatbot to allow users to clarify themselves was also devised, derived from Bayes’
rule. Finally, the results from the chatbot were shown. as stated by the author adequate
performance metrics were measured for each neural network generated beforehand and a
manual way of testing the chatbot was presented. The research described the developed
system, can be ported on virtually any system provided of a Python environment.
Yashvardhan & Sahil [53] presented deep learning approaches for question answering
systems. The authors used a generalized dataset called babI, generated by AI of Facebook.
The work concentrated on examining, executing, and enhancing the different popular
approaches. Basic NLP and Deep learning algorithms-based approach has been conducted.
The research described that the assessment of the proposed models was done on twenty
activities of babI dataset of Facebook. The author described assessment of all the main deep
learning algorithms for question answering has been conducted. In this research, neural
network based framework for general question answering tasks have been proposed that are
trained using raw input question answer triplets. The frameworks on the research can resolve
sequence tagging tasks, classification problems, sequence-to-sequence tasks and question
answering tasks that require sequential reasoning.
24
Vyas [54] Deep Learning for chatbots explored the challenges and techniques used to build
chatbots and where enhancements can be made. The author analyzed various architectures to
develop chatbots and propose a hybrid model, partly retrieval-based and partly generation-
based which gives the best outcomes. The chatbot has learned on the fixed data. Hence, the
data does not obtain the latest information available, like current events.
Anjana [55] Intelligent Chatbot using Deep Learning have developed intelligent
conversational agent using state of the art techniques proposed in recently published researchs.
The author described for developing an intelligent chatbot, they have used Google’s Neural
Machine Translation (NMT) Model which is based on Sequence to Sequence (Seq2Seq)
modeling with encoder-decoder architecture. This encoder-decoder is applying Recurrent
Neural Network with bi-directional LSTM (Long-Short-Term-Memory) cells. They utilized
Neural Attention Mechanism and Beam Search during training for performance optimization.
They have used Python with PyQT as a front end and Python as back end.
Raja et al. [57] A Banking Chat Bot Conversational Bot for Customer Care using Deep Neural
Networks presented a conversational bot that answers to user queries on the norms and
procedures of a bank using Deep Neural Networks, to achieve higher accuracy in the response.
In addition, Natural Language Processing is used to preprocess the text, so that the data fed
into the neural network is of appropriate type. User gets the correct answer usually when a
higher accuracy rate is attained. Instead of going to the bank or contacting a customer care
executive, user can get the information at their location without spending time. The author
25
used Flask Web Framework to deploy the conversational bot in real time. Python needs its
own web framework like Django or Flask to link to a website/Frontend/User Interface. As
described on this research the Design of User Interface has been developed using HTML-5,
CSS-3, and Java Script. The author described the developed project can be hosted and made
available for public usage.
Yash [58] developed chatbot based question answering system using deep learning models to
build a chatbot for flight booking. The author described the flight booking system has been
integrated with One Task, a task manager for intra-project collaborations. The chatbot server
has built using Python Flask. The author stated that the training is done on the SQuAD dataset
which is a popular machine understanding dataset consisting of 100,000+ questions created
by crowd workers on 536 Wikipedia articles. The author presented the multi-attention model
for machine comprehension. The model computes the context-to-query attention and query-
to-context attention, with respect to the context as well as the query. This helps them to solve
complex query sentences up to some extent.
Vinothini [59] AIRA Chatbot for Travel: Case Study of AirAsia is proposed a verbot (Verbal-
Robot) to improve the performance, quality, and credibility of customer service for AirAsia
(Malaysia) Berhad called AIRA. Author described AIRA is developed as a stand-alone
application, with possible extended features provided by web connectivity. AIRA is
implemented using C# in Verbot 5.0 and plays an important role as an information gatherer,
gathers all the latest and correct information to provide the best service to customers. As stated
on the research, the main objective of AIRA is two-fold. The first objective is to reduce
customers' waiting time at the airport, from check-in to boarding. With the ability to perform
basic services to customer, AIRA able to solve the lack of human resources problem within
AirAsia. With consideration to the fact that boarding or waiting time can be unpleasant for
most travelers, AIRA is able to recommend good places based on the leisure category that the
user prefers within the vicinity of the airport itself. The author described the system works by
prompting a website displaying information and floor plans for further exploration by the
users. The second objective is to recommend the customers with places, hotels and foods
26
based on customer preferences and requirements. The proposed system will bring the user to
a webpage whereby the user can book their respective flights immediately.
Anbang et al. [60] A New Chatbot for Customer Service on social media created a new
conversational system to automatically generate responses for user requests on social media.
As stated on the research the system is integrated with state-of-the-art deep learning
techniques and is trained by nearly one million Twitter conversations between users and
agents. The author described the evaluation reveals many of the requests were emotional, and
the system shows empathy to help users cope with emotional situations like human beings.
The experimental result on the research shows the system outperforms information retrieval
system based on both human judgments and an automatic evaluation metric.
Susmit [61] developed Chatbots with Personality Using Deep Learning the chatbots.
unidirectional LSTM units are using to create the chatbots, which mean they maintain
information of the past since the only inputs it has seen are from the past. The author used the
data in an utterance-response pair form for training a chatbot. The dialogue should have a
flow, context and should not be arbitrary expressions. The data source they used are from
Twitter Chat Log, Cornell Movie-Dialogs Corpus, publicly available Reddit comments. The
model has developed using Python tools including TensorFlow, Pandas, NumPy and Jupyter
Notebook. The author stated the chatbot model has examined by BLEU metrics including
computer calculated scores and assessments by people.
27
Yashvardhan Sharmaa , Deep Learning Deep Learning - Limited to small
Sahil Guptaa Approaches for approaches question answer, and
Question Answering Unable to work well on
System large information-based
questions, answering
which contain
reasoning
- The babI dataset was
used to evaluate all the
models. The babI
dataset is an artificially
produced dataset by
Facebook which is very
general in nature.
- The architectures may
give some unusual
outcome on the usage
of natural dataset
Vyas Ajay Bhagwat Deep Learning for -Deep Learning - This chatbot is learned
chatbots approaches on constant data (i.e.,
-a hybrid model, from January 2015)
partially retrieval-based - Therefore, the data
and partially generation does not obtain the
based which gives the latest information
best results available, such as
-Sequence to sequence current events.
Models -The training time of
-LSTM (Long Short- the model is high.
Term Memory)
Anjana Tiha Intelligent Chatbot -Google’s Neural -Unable to imitate real
using Deep Learning Machine Translation human conversation
28
(NMT) Model which is and not have flexibility
based on Sequence to in functioning since
Sequence (Seq2Seq) they are using easy
modeling with encoder- rule-based techniques
decoder architecture.
Antons Mislevics, Janis A Systematic Approach -Neural network -
Grundspenkis and Raita to Implementing -Knowledge base of
Rollande Chatbots in questions and answers
Organizations – RTU
Leo Showcase
Raja Rathina.G, Syed A Banking Chat Bot - -Used Deep Neural -The approach
Shenaz.S, Vani.R, Conversational Bot for Networks experimented on
Dr.V.Gowri Customer Care using limited set of data
Deep Neural Networks -The dataset not
extracted from real time
conversations
Chatbot Based Question -Deep learning basics -Not efficient capturing
Yash Sinha Answering System which included CNN, of the semantics
RNN, Word passages and questions.
Embeddings, Attention
Mechanism, Pointer
Networks, Memory
Networks, and
Reinforcement
Learning
Vinothini Kasinathan AIRA Chatbot for -Knowledge -Consider only the root
Travel: Case Study of Representation of the words that may
AirAsia be results to the same
score for different
words
29
Anbang Xu, Zhe Liu, A New Chatbot for -Qualitative analysis -The average response
Yufan Guo, Vibha Customer Service on -LSTM networks consuming time is high
Sinha, Rama Akkiraju social media
Dinesh Kalla , Vatsalya Chatbot for Medical -NLTK (Natural -The chance of giving
Samiuddin Treatment using NLTK Language toolkit) unrelated answers is
Lib -thematic analysis on high
the qualitative data
Susmit Gaikwad Chatbots with -Deep Learning -Limited output
Personality Using Deep approaches sequences to smaller
Learning lengths to be efficient
3.1 Summary
In this chapter, several selected researches that have focused specifically on chatbot models
and design techniques have described in detail. Selected studies that affect Chatbot design has
been presented, and the contribution of each study has been identified. In addition, it discusses
about the similarity and differences in the Chatbot design techniques that are used in the
selected studies. Their design and methods have been discussed with the limitations of their
study.
30
CHAPTER FOUR
Design of Chatbot Based Customer Services system
4.1 Introduction
This chapter describe the proposed architectural design and components with the tools and
techniques used to keep through the research objectives proposed. The first part discusses how
the data is acquired and provided to be used by various deep learning models. The second part
is dedicated on the actual procedure used in developing and training models, including data
preprocessing, feature extraction methods, and model architectures. In the last part, the model
evaluation method used in the research is explained.
In the first part of this work, the question-and-answer pair conversations dataset is collected
and create the different intents file. The dataset is preprocessed to make fit for further
processing. The preprocessing tasks involves tokenization, stop word removal, normalization.
After that, the text is converted to vectors using word2vec. The next phase of this work is
training the model, performed to extract data from the text corpus. The text corpus is a
collection of customized airline customer conversations. Then the trained model is performed
for handling the user requests. When the user provides the query, the system will retrieve
matched information comparing patterns from intents data.
31
Data Sets (Ethiopian airlines websites, Customized Data
from Kaggle (ATIS & Air India))
Preprocessing
Tokenization
Normalization
Stemming
Feature Extraction
Testing Train
Model Output
Figure 4.1 Architecture of Chatbot based Ethiopian airlines customer service system
32
4.3 Data Sets
In any task involving Machine Learning, the first step is to prepare data so that it can be
correctly interpreted by the machine. In the case of designing a chatbot, the task consists of
inputting thousands of existing interactions between customers and customer service
representatives to instruct the machine [63].
The data used in this thesis is Ethiopian Airlines FAQ that are available and collected from the
web (such as from https://www.ethiopianairlines.com/et/services/help-and-contact/frequently-
asked-questions) and from Kaggle (https://www.kaggle.com/datasets). The collected
documents pass through data preparation.
For this study, 30,000 question and answer pair statements has been collected from Ethiopian
Airlines FAQ and from Kaggle websites. The collected documents have been passed through
the appropriate data preparation. The dataset has split into 80% for training and 20% for
testing sets.
We just used all information and tagging them appropriately with JavaScript Object notation
(JSON) format. The data is structured into tags, patterns, responses, and context in an intents file
and train a chatbot to suit to our chatbot based customer service for Ethiopian airlines.
Patterns: The methods in which users frequently ask questions relating to a specific tag.
Responses: Predefined responses for every tag in the dataset from which the model can select
to respond to a specific question.
Context: Contextual words linking to a tag for simple and improved classification of what the
user aims with their questions.
33
attributes that are used to train the model. To do so different duplications and unnecessary
tokens such as special characters, prefix, suffix, numbers and symbols should be eliminated.
Preprocessing consists of tokenizing, stemming, and lemmatizing the chats and this makes the
chats readable for the deep learning chatbot. The training data for a chatbot necessitates it to
get a conversational flow. It requires to have a sentence or a question and an answer.
4.4.1 Tokenization
Tokenization is the method of splitting the statements into a separate part of words or tokens
by using space between words, tokens, or punctuation mark. In the feature extraction process,
tokenization is important because the meaning of a statement can depend on the relationship
between word arrangements, this helps to get meaningful data. Tokenization methods help to
grasp appropriate feature from the provided dataset. In the tokenization process, input texts
are tokenized into a sequence of tokens by detecting word boundaries from the written texts.
White space and punctuation marks are used as boundary markers that the punctuation marks
are used to demarcate or separate words, sentences, etc. into a stream of characters.
Punctuation marks such as period (.), comma (,), and semicolon (;) are also included to
demarcate words. For example: - when the sentence “Welcome to Ethiopian Airlines chatbot
system” tokenized, the result will be:
4.4.2 Normalization
Normalization is very important task for the languages that use Latin characters. The process
of converting case of the characters in the text data might be UPPER CASE, or lower case or
Mixed Cases). Hence, it is better to transform all text data into similar case. It is best to convert
into lowercase since the users usually use lower case without dealing with the capitalization.
This is a process to take place after the tokenization tasks. The dataset gathered have a special
character, symbols, numbers, and punctuation. This task removes all inappropriate character as
well as special character that the text contains.
34
Algorithm 4.1 Normalization
35
4.4.4 Stemming of words
Stemming is a process of finding the root of the word. It means to remove all the punctuations,
plural forms, tenses, and other such elements of a word. The resulting word is the root of that
word. For example, the word "that’s" stem might be "that" and the word "happening" would
have the stem of "happen" [64]. Process of stemming words is used to reduce the vocabulary
of our model and attempt to find general meaning or context of the sentences. The stemmed
words are stored as a unique list to use in the next step of our data preprocessing.
36
4.5.1 Bag of words
Bag of word is the technique that uses the word’s frequency in each text data set that only
recognize the frequency of the words in a given data. Neural network algorithms require numerical
input whereas, a chatbot essentially takes text or string type input. Therefore, to represent the
sentences or string type input as numerical data, we apply the concept of bag of words. We will
represent each sentence with a list, the length of the number of words in our model’s vocabulary.
Each position of the list will represent a word from our vocabulary. If the position in the list is a
1 then that will mean that the word occurs in our sentence, if it is a 0 then the word is not appear.
This is called a bag of words since the order in which the words appear is not considered. Rather,
only the existence or absence of a word is only concluded.
4.5.2 Word2vec
Word2vec feature extraction is one of the words embedding techniques which is a two-layer
neural network that processes text by vectorising words. Its input is text corpus, and its output
is a set of vectors: feature vectors that represent words in the corpus. These models are shallow
two-layer neural networks having one input layer, one hidden layer and one output layer.
In this study bag of words and word2vec feature extraction techniques are used. The User
question and answer of the model should be converted into numeric vectors to be able to apply
machine learning on the data. The words will be represented as a vector by using bag of word
and the extracted feature can be used to train the model to compare the patterns.
37
4.7 Model Building
After the training data ready, the proposed deep learning model aims to work with Neural
Network Model technique of CNN. This technique applied after feature extraction has been
done by bag of words and word2vec and the feature vector known. The process of modeling
is to determine patterns in the training set of the dataset that represents the collected data with
their features. The model developed to chat with the users by using deep neural network that
has three layers. To do this, we used the Keras sequential API.
Convolutional Neural network CNN has a convolutional layer to extract information by a larger
piece of text from feature extracted vector. In this model a text as a sequence is passed to the
model of CNN. We design a simple convolutional neural network model and evaluate it with the
metrics provided for this study.
38
CHAPTER FIVE
Implementation of Chatbot based customer service system
5.1 Introduction
This chapter deals with the implementation of the Chatbot based customer service system. Based
on the design of the Chatbot based customer service system explained in chapter 4, the
implementation of the Chatbot based customer service system is presented in detail in this chapter.
In this chapter, section 5.2 describes about the dataset that used for the implementation and section
5.3 discusses about the intents management of the system. In section 5.4, we discussed the
implementation of Chatbot based customer service system. In 5.5 we discussed the performance
evaluation of the system. Section 5.6 explained user acceptance testing. Finally, in section 5.6, we
summarize about the implementation of this work.
The data used in this thesis is Ethiopian Airlines FAQ that are available and collected from the
web (such as from https://www.ethiopianairlines.com/et/services/help-and-contact/frequently-
asked-questions) and from Kaggle (https://www.kaggle.com/datasets). The collected documents
pass through data preparation. The data is extracted first in Question (Q) and answer (A) pairs to
feed the data to the model then via this, the model learns what to be remember and how to extract
information. The utterances given to the model is not the only one, those may be varying depend
on different user, and the given question or intent is representative to announce the model to
remember the fact. The flexible behavior of the question is finally tracked by the sequence-to-
sequence modeling techniques by considering the input structure.
The Ethiopian airlines FAQ available on the web and sentences are the main data source for the
model of data, and we just used all information and tagging them appropriately with JavaScript
Object notation (JSON) format. Each information tag has its own intent with unique ID. Again,
each intent finally retrieved to the user utterance. Here, this organization of data creates the basic
data core of the designed system. The tagging is done manually which is handcrafted.
39
5.3 Intents Management
Textual data cannot be fed directly to the neural network due to their design. They require to be
transformed into sequences of integers of the same length. The preprocessing steps are listed
below in terms of order they are performed:
Turn all characters to lower case.
Filter unimportant punctuation characters (e.g., "!?, ...)
Tokenize the words by using words as tokens. A word in this context is defined as a
continuous sequence of characters surrounded by whitespace.
Building the dictionary of the model via computing the texts’ vocabulary (i.e., the set of
tokens used).
Exchanging or swapping each token in the sequences by their corresponding index in the
vocabulary.
Based on the above steps we get the final sequences, which are suitable for training the intended
neural networks.
5.4 Implementation
We used different tools and developing environment to implement the algorithms and to do
necessary experiment on the system. Python was used as the major language to develop the models
along with the general deep learning libraries namely Keras and Tensorflow. The aim of the
prototype of the system is to demonstrate and test the developed system.
40
Figure 5.1 Snapshot of corpus for building Word2Ve (JSON file)
Figure 5.1 Snapshot code for cleaning the corpus and removing stop words
41
5.4.3 Creating training and testing data
After the appropriate preprocessing have completed, we created the training data in which we
provided the input and the output. Our input is the set of the patterns, and the output is the
class of our input pattern associated which are the responses. Since the computer does not
recognize text, we converted text into numerical forms.
Figure 5.3 Snapshot of code for creating training and testing data
42
Figure 5.4 Snapshot of code for developing the model
43
7 Matplotlib It is a plotting library for the python programming language and
provides object-oriented API for embedding plots into
applications using general-purpose GUI toolkits.
8 Tensorflow It is a symbolic math library based on dataflow and
differentiable programming. We used it for CNN and LSTM
neural Networking.
9 Keras is one of python libraries which high-level neural network that
runs on top of TensorFlow.
10 Microsoft Excel Used for data preparation tasks in cleaning filtering and sorting
the gathered data.
Figure 5.5 Snapshot of Ethiopian airlines chatbot based customer service system Conversation
Interface
44
5.5 Evaluation of the model
We applied the 80/20 train-test splitting ratio, which means, 80% of the dataset used for
training the model and the remaining 20% of the dataset used for testing the model. According
to the literature, it is more appropriate for most research works especially for deep learning
algorithms that require more training data and it is better to improve the model performance
[64].
LSTM and CNN techniques have applied on this model, Keras and Sklearn python module
used for neural network implementations. To implement we used the following libraries.
5.5.1 Long Short-Term Memory: LSTM is one of the model techniques we used in this
research work. It is one of the classification techniques of artificial recurrent neural network
(RNN) architecture broadly applied in deep learning. A Recurrent Neural Network is one of
artificial neural network in which the output of a distinctive layer is preserved and fed back to
the input. This helps to forecast the effect of the layer. The first layer prepared in the same
way as it is in the feedforward network. In LSTM strategies a memory cell which preserves
its state for a long period of time and non-linear providing components adaptable information
flow into and out of the cell. By using this memory cell, LSTM has the capacity to catch
45
competently long-distance dependencies of sequential data without disappearing gradient
challenges of recurrent neural network.
Table 5.2 LSTM architecture parameter configuration
LSTM model accomplished the accuracy of 83.25% according to the architecture configuration
depicted on the table 5.2 and the loss value of this model is 0.41. Table 5.3 describes the accuracy
and loss of both train and test value of LSTM model. The evaluation metrics applied for
performance evaluation of this models are as follows:
Table 5.3 LSTM performance evaluation of overall dataset
Evaluation Metrics Percentage (%)
Precision 83.31
Recall 83.43
F-score 83.36
Accuracy 83.25
5.5.2 Convolutional Neural Network: The other neural network techniques we applied for
this study is CNN. CNN classification technique is one of the artificial neural networks, which
has strong adaptability and good at mining data local features. Convolutional neural networks are
qualified to feed-forward neural systems. Where the neurons are accomplished of learning
enhanced point (weights) and tendencies. In CNN, the statement model of each word in the input
data is connected to a vector representation, which comprises in a dimensional vector. The means
of its distribution network structure make it more alike to the biological neural networks, decrease
the complication of the network model, a decrease in the number of weights, makes the CNN be
useful in various fields of pattern recognition, and accomplished very good results.
46
Table 5.4 CNN architecture parameter configuration
Trained parameters name Parameter’s size
Dropout 0.5
Epoch 20
Activation Relu, Softmax
Batch-size 64
Embedding dimension 100
Optimizer SGD, Adam
Learning rate 0.01
CNN model accomplished the accuracy of 85.20% according to the architecture configuration
presented on table 5.4. Table 5.5 describes precision, recall, F-score and accuracy of both train
and test value of CNN model. The accuracy value of this model is 0.852 and the loss model is
0.41 as shown on Fig. 2 and Fig. 3 respectively.
47
Figure 5.7 Accuracy value diagram of CNN
48
5.6 Discussion
To come across the objective for this thesis work, we have done several tasks. First, we gather
data from Ethiopian airlines FAQ page and airline question and answer pairs from Kaggle.
Then the extracted data has further processed which includes normalization and data preparation
to make the data suitable for the next process. The next step is preprocessing the data to filter
out less useful data and to come up with quality data. During preprocessing, we applied several
tasks like removing stop words such as prepositions, conjunctions, articles. Stop words, are
the high frequency words in a language, which do not contribute much to the topic of the
sentence. After preprocessing of data, we applied several feature extraction techniques to
vectorising our datasets. For feature extraction, we used techniques word embedding of
word2vec. After our dataset vectorized we applied several algorithms. We used CNN and
LSTM neural network technique. To evaluate the performance of the model, we used different
performance evaluation metrics such as Accuracy, F-score, recall and Precession. Therefore, the
neural network technique, LSTM achieved accuracy of 83.25 and CNN achieved accuracy of
85.20 % by using word2vec feature extraction techniques.
49
CHAPTER SIX
Conclusion and Recommendation
The last chapter of this thesis report summarizes the work of the thesis and recommendations
are discussed to show further research that can be incorporated in our system and enhance the
quality of the chatbot system by further analyzing the demands of the users.
6.1 Conclusion
In this work, we proposed to develop chatbot based customer service for Ethiopian airlines
using deep learning approaches. To achieve the successful execution of the research it was
first necessary to understand about chatbot. In this research we collected data from Ethiopian
airlines FAQ page and airline question and answer pairs from Kaggle. Then vital pre-
processing steps were performed based on the requirement of the language to get cleaned
corpus. The dataset has a format of patterns and responses. In this thesis, we have used our
trained Word2vec word embedding model to generate word vectors that able to capture
syntactic and semantic relations of words. We experimented using state of the art deep
learning algorithms such as CNN and LSTM, Word2Vec embedding, neural word embedding
and bag of words. CNN achieved better performance with an accuracy of 85.20% and an f1-
score of 85.25%. Finally, this study showed promising results, however, more comprehensive
future works make this finding more improved.
The study has Propose, design, develop, implement model of chatbot based customer service
system for Ethiopian airlines and based on that prototype has developed with deep learning
approaches.
Design and split train and test set to train and test the model simultaneously.
Identify the main components for developing chatbot related Airline customer services.
Identify different feature extraction techniques which is related with the chatbots
developments.
50
6.3 Recommendation
Additional research is needed as a future works based on limitations of the current study. The
researcher would like to recommend this research work can further be enhanced by adding the
following functionalities.
Using big dataset to implement the system. To conduct the experiment, we have used a
small amount of corpus for word embedding and to train the models. By increasing the
dataset quality and quantity improve the performance of the model.
The deep neural network we used can be further tested by changing the architecture and
by integrating different deep learning algorithms to get a better result.
51
References
[1]. Emanuela Haller and Traian Rebedea, “Designing a Chat-bot that Simulates an Historical
Figure”, IEEE Conference Publications, July 2013.
[2]. Elleni adamopoulou,Lefteris moussiades “Machine learning with applications ,19 October
2020.
[3]. M. J. Pereira, L. Coheur, P. Fialho and R. Ribeiro, "Chatbots' Greetings to Human-Computer
Communication," 2016.
[4]. P. Goyal, S. Pandey and K. Jain, “Developing a Chatbot,” Deep Learning for Natural
Language Processing, Apress, Berkeley, CA, 2018. pp 169-229.
[5]. Anusha S, N Vignesh Karthik, Sampada K S Comparative Study on Voice Based Chat Bots,
Vol.-6, Issue-12, Dec 2018
[6].Prashanth S, Rakshith Gowda N, Sourabh Kakade, Gouramma, Vivek Sharma , Review of AI
chatbot Volume: 07 Issue: 05 May 2020
[7]. Kucherbaev P, Bozzon A, Houben G-J. Human-aided bots. IEEE Internet Comput.2018;
22:36–43.
[8]. Ilya Sutskever, Oriol Vinyals, and Quoc V Le.Sequence to Sequence Learning with Neural
Networks.In Proc. of NIPS, 2014, 3104-3112.
[9]. Kelly Blum "How to Manage Customer Service Technology Innovation". retrieved from
www.gartner.com. Last accessed on Dec 19, 2020.
[10]. E. Haller and T. Rebedea, "Designing a Chat-bot that Simulates an Historical Figure," 2013
19th International Conference on Control Systems and Computer Science, Bucharest, 2013
[11]. Raymond, J. (2001). No more shoppus interruptus. American Demographics, 23(5), 39–40.
[12]. “How Chatbots Are Solving Today’s Customer Service Problems.” retrieved from
http://www.smartcustomerservice.com/Columns/Vendor-Views/How-Chatbots-Are-Solving-
Todays-Customer-Service-Problems-126098.aspx. , Last accessed on December 23, 2020.
[13]. J. Quintero, and R. Asprilla, “Towards an Efficient Voice-Based Chat-Bot”, IEEE Thirty
Fifth Central American and Panama Convention, Nov. 2015.
[14]. Mohammad Nuruzzaman , Omar Khadeer Hussain “A Survey on Chatbot Implementation
in Customer Service Industry through Deep Neural Networks” ,2018
[15]. Accenture, Accenture Interactive: Chatbots in Customers Service 2017
[16]. Barker, S., How chatbots help. MHD Supply Chain Solutions, 2017.47(3): p. 30.
52
[17]. Chen, H., et al., A Survey on Dialogue Systems: Recent Advances and New Frontiers.
ACM SIGKDD Explorations Newsletter, 2017.19(2): p. 25-35.
[18]. Mohammad Nuruzzaman and Omar Khadeer Hussain “A Survey on Chatbot
Implementation in Customer Service Industry through Deep Neural Networks”,2018
[19]. Weizenbaum, J., ELIZA: a computer program for the study of natural language
communication between man and machine. Commun ACM, 1966. 9(1): p. 36-45.
[20]. Epstein, J. and W.D. Klinkenberg, From Eliza to Internet: a brief history of computerized
assessment. Computers in Human Behavior, 2001. 17(3): p. 295-314.
[21]. Jurafsky, D. and J.H. Martin, Speech and Language Processing (2nd Edition). 2017:
Prentice-Hall, Inc. Ch. 28, pp. 418-440.
[22]. Wallace, R.S., The Anatomy of A.L.I.C.E, in Parsing the Turing Test:Philosophical and
Methodological Issues in the Quest for the Thinking Computer, R. Epstein, G. Roberts, and G.
Beber, Editors. 2009, Springer Netherlands: Dordrecht. p. 181-210.
[23]. Lemaitre, C., C. A. Reyes, and J. Gonzalez. Advances in Artificial Intelligence -
IBERAMIA 2004. in 9th Ibero-American Conference on AI, Puebla, November 22-26. 2004.
México.
[24]. Shawar, B. and E. Atwell, A comparison between Alice and Elizabeth chatbot systems.
2002.
[25]. Worswick, S. Mitsuku Chatbot: Mitsuku now available to talk on Kik messenger. 2010
Retrieval on 04/05/2018]; Available from: https://www.pandorabots.com/mitsuku/.
[26]. Nay, C., Knowing what it knows: selected nuances of Watson’s strategy, in IBM Research
News 2011, IBM.
[27]. Google. Dialogflow 2010 23/04/2018]; Available from: https://dialogflow.com/.
[28]. Amazon Web Services, I. Amazon Lex – Build Conversation Bots.17 23/04/2018];
Available from: https://docs.aws.amazon.com/lex/latest/dg/what-is.html.
[29]. Karani, D. (2019, 4 21). Introduction to Word Embedding. retrieved from towards data
science: https://towardsdatascience.com/introduction-to-word-embedding-and-word2vec-
52d0c2060fa, Last accessed on January 12, 2021.
[30]. Mikolov, T., Corrado, G., Chen, K., & Dean, J. (2013). Efficient Estimation of Word
Representations in Vector Space. Proceedings of the International Conference on Learning
Representations (ICLR 2013), 1–12.
53
[31]. Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013). Distributed Representations of
Words and Phrases and their Compositionality. NIPS, 1–9.
[32]. Bengio, Y., Ducharme, R., Vincent, P., & Janvin, C. (2003). A Neural Probabilistic
Language Model. The Journal of Machine Learning Research, 3, 1137–1155.
http://doi.org/10.1162/153244303322533223
[33]. Popov, A. (2018). Modeling for Word sense disambiguations: an overview. Cybernetics and
information technologies, 139-151.
[34]. Pennington, J., Socher, R., & Manning, C. D. (2014). Glove: Global Vectors for Word
Representation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language
Processing, 1532–1543. http://doi.org/10.3115/v1/D14-1162
[35]. S. Shajun Nisha, M. Nagoor Meeral, in Handbook of Deep Learning in Biomedical
Engineering, 2021
[36]. Poornachandran, P., Kp, S., & R, V. (2017). Evaluation of Recurrent Neural Network and
its Variants for Intrusion Detection System (IDS). International Journal of Information System
Modeling and Design, 43-63.
[37]. T.M. Navamani ME, PhD, in Deep Learning and Parallel Computing Environment for
Bioengineering Systems, 2019
[38]. Niklas Donges, “A guide to RNN: Understanding Recurrent Neural Networks and LSTM”
retrieved from https://builtin.com/data-science/recurrent-neural-networks-and-lstm, Last accessed
on March 14, 2021.
[39]. Retrieved from https://ytd2525.wordpress.com/2016/08/03/understanding-deriving-
andextending-the-lstm/., Last accessed on March 18, 2021.
[40]. A. Mehta, “A Complete Guide to Types of Neural Networks,” retrieved from
https://www.digitalvidya.com/blog/types-of-neural-networks/.)., Last accessed on April 09, 2021.
[41]. I. Sutskever, O. Vinyals and Q. V. Le, Sequence to Sequence Learning with Neural
Networks.
[42]. M. Ma, "A more detailed explaination about "the tensorflow chatbot"," 12 Oct 2016.
retrieved from https://github.com/Marsan-
Ma/tf_chatbot_seq2seq_antilm/blob/master/README2.md. , Last accessed on January 28, 2021.
[43]. B. Jan et al., Deep learning in big data Analytics: A comparative study, Computers and
Electrical Engineering (2017), https://doi.org/10.1016/j.compeleceng.2017.12.009
54
[44] retrieved from https://blog.cloudboost.io/generative-vs-retrieval-based-chatbots-a-quick-
guide-8d19edb1d645, Last accessed on February 22, 2021.
[45]. D. Britz, "Deep Learning for Chatbots, Part 1 – Introduction," April 2016. retrieved from
http://www.wildml.com/2016/04/deep-learning-for-chatbots-part-1-introduction/., Last accessed on
March 27, 2021.
[46]. T. Young, D. Hazarika, S. Poria and E. Cambria, "Recent Trends in Deep Learning Based
Natural Language Processing".
[47]. Przegalinska, Aleksandra, Leon Ciechanowski, Anna Stroz, Peter Gloor, and
GrzegorzMazurek. In bot we trust: A new methodology of Chatbot performance measures.
Business Horizons 62, no. 6 (2019): 785-797.
[48]. Retrieved from https://intellipaat.com/community/368/how-to-interpret-loss-and-accuracy-
for-a-machine-learning-model, Last accessed on 20 April 2021
[49]. Ahmed Fawzy Gad, “Evaluating Deep Learning Models: The Confusion Matrix, Accuracy,
Precision, and Recall” retrieved from https://blog.paperspace.com/deep-learning-metrics-precision-
recall-accuracy/, Last accessed on May 11, 2021.
[50]. A. Zheng, Evaluating Machine Learning Algorithms. 2015.
[51]. How to evaluate the performance of a model in Azure ML and understanding “Confusion
Metrics” retrieved from https://blog.exsilio.com/all/accuracy-precision-recall-f1-score-
interpretation-of-performance-measures/, Last accessed on May 22, 2021.
[52]. Peters Florian “Design and implementation of a chatbot in the context of. Liege
University”, 2018.
[53]. Yashvardhan Sharma & Sahil Gupta “Deep Learning Approaches for Question Answering
System”, 2018.
[54]. Bhagwat, Vyas Ajay, "Deep Learning for Chatbots” Master’s Projects. 630., 2018.
[55]. Anjana Tiha “Intelligent Chatbot using Deep Learning”, 2018.
[56]. Antons Mislevics, Janis Grundspenkis and Raita Rollande “A Systematic Approach to
Implementing Chatbots in Organizations – RTU Leo Showcase”, 2018.
[57]. Raja Rathina.G, Syed Shenaz.S, Vani.R, Dr.V.Gowri “A Banking Chat Bot -
Conversational Bot for Customer Care using Deep Neural Networks” , 2020.
[58]. Yash Sinha “Chatbot Based Question Answering System”, 2018.
55
[59]. Vinothini Kasinathan, Mohd Helmy Abd Wahab, Syed Zulkarnain Syed Idrus, Aida
Mustapha, Kho Zhi Yuen “AIRA Chatbot for Travel: Case Study of AirAsia” J. Phys.: Conf. Ser.
1529 022101, 2020.
[60]. Anbang Xu “A New Chatbot for Customer Service on Social Media”, 2017.
[61]. Gaikwad, Susmit, "Chatbots with Personality Using Deep Learning" (2019). Master's
Projects. 678., June 2019
[62]. Building a Conversational Chatbot with NLTK and TensorFlow retrieved from
https://heartbeat.fritz.ai/building-a-conversational-chatbot-with-nltk-and-tensorflow-part-1-
f452ce1756e5 Last accessed on April 27, 2021.
[63]. Steven bird, Ewan klein and Edward loper "Natural language processing with python"
retrieved
fromhttp://www.datascienceassn.org/sites/default/files/Natural%20Language%20Processing%20wi
th%20Python.pdf Last accessed on May 11, 2021.
[64] “Pros and Cons of Keyword Driven Testing. retrieved from”
Http://blog.bughuntress.com/automated-Testing/the-Pros-and-Cons-of-KeywordDriven-Testing,
Last accessed on May 13, 2021
56
Annexes
Annex A: Sample Patterns
"Patterns": ["How can you help me?", "What you can do?", "What help you provide?", "How you can be
helpful?", "What support is offered"],
"Patterns": ["How can I book a seat for my infant?", “Show a seat for infant", "Find a seat for infant"],
"Patterns": ["Can I reserve a seat and pay later?", "reserve a seat", "Looking up seat and pay details”],
"Patterns": ["My ticket was purchased from a travel agent Can I change my itinerary on Ethiopian
airlines.com?”],
"Patterns": ["Do I receive a ticket when I book a seat on an Ethiopian airlines flight?"],
"Patterns": ["What will I do if I have to fly Ethiopian airlines within the next 24 hours?"],
57
"Patterns": ["How can I cancel my ticket and get a refund if there is a sudden change in travel plan?"],
"Patterns": ["Can I get a refund for a seat that has not been used"],
"Patterns": ["Is an Ethiopian airlines booking valid for travel on other airlines?"],
"Patterns": ["Does a return Ticket mandatory for travel to the UAE on a tourist Visa?"],
"Patterns": ["How much hand luggage can I carry onboard Ethiopian airlines flights?"],
"Patterns": ["What should I do if I lost my baggage when I travelled with Ethiopian airlines? Am I entitled to
compensation?"],
"Patterns": ["In the event that I miss my onward flight as a result of my first flight being delayed will Ethiopian
airlines put me on the next available flight or refund my ticket?"],
"Patterns": ["How does Ethiopian airlines classify an infant a child and an adult?"],
58
"Patterns": ["What should I do if I need special assistance?"],
"Patterns": ["What is the procedure for Children below 12 years traveling international without their parent?"],
"Patterns": ["What is the procedure for children and minors 18 years or below travelling to UAE without their
parent?"],
"Patterns": ["What are the regulations for expectant mothers travelling on Ethiopian airlines?"],
"Patterns": ["I want to fly from Addis Ababa at 838 am and arrive in Lalibela at 1110 in the morning"],
"Patterns": ["what flights are available from Addis Ababa to Bahirdar on Thursday morning”, “what flights
are available from Addis Ababa"],
"Patterns": ["what is the arrival time in Addis Ababa for the 755 AM flight leaving Gondar”, “what is the
arrival time in Addis Ababa"],
"Patterns": ["cheapest airfare from Addis Ababa to Bahirdar","cheapest airfare from Addis Ababa"],
"Patterns": ["round trip fares from Addis Ababa to Lalibela under 5000ETB","round trip fares from Addis
Ababa"],
"Patterns": ["I need a flight tomorrow from Addis Ababa to Mekele","I need a flight tomorrow from Addis
Ababa”, “I need a flight tomorrow"],
"Patterns": ["what kind of aircraft is used on a flight from Addis Ababa to Dubai”, “what kind of aircraft is
used on a flight from Addis Ababa”, “What kind of aircraft is used on a flight"],
"Patterns": ["show me the flights from Addis Ababa to Bahirdar on Thursday”, “show me the flights from
Addis Ababa"],
59
"Patterns": ["all flights from Addis Ababa to Bahirdar","all flights from Addis Ababa"],
"Patterns": ["what kind of ground transportation is available in Addis Ababa”, “what kind of ground
transportation"],
"Patterns": ["show me the flights from Addis Ababa to Paris”, “show me the flights from Addis Ababa”,
“show me the flights"],
"Patterns": ["show me the flights from Addis Ababa to Toronto by way of Dublin”, “show me the flights
from Addis Ababa"],
"Patterns": ["what is the cheapest flight from Addis Ababa to Dubai”, “what is the cheap flight from Addis"],
"Patterns": ["show me the first class fares from Boston to Denver”, “show me the first class fares"],
"Patterns": ["show me the ground transportation in Denver”, “show me the ground transportation"],
"Patterns": ["all flights from Addis Ababa to Beijing leaving after 6 pm and before 7 PM", "All flights from
Addis Ababa to Beijing"],
"Patterns": ["I need information on flights for Tuesday leaving Addis Ababa for Toronto to Dublin and Dublin
to Toronto”, “I need information on flights for Tuesday"],
"Patterns": ["please give me the flights from Addis Ababa to Frankfurt on Thursday of next week”, “please
give me the flights from Addis Ababa"],
"Patterns": ["I would like to fly from Addis Ababa to Nairobi on Ethiopian airlines”, “I would like to fly from
Addis Ababa"],
"Patterns": ["show me the flights from Dubai to Addis Ababa”, “show me the flights from Dubai"],
"Patterns": ["please list all flights on Ethiopian from Dubai to Addis Ababa”, “please list all flights on
Ethiopian"],
"Patterns": ["what kinds of planes are used by American airlines”, “what kinds of planes are used"],
"Patterns": ["I would like to book a flight from Dubai to Addis Ababa”, “I would like to book a flight"],
"Patterns": ["show me all flights from Addis Ababa to Dubai on Wednesday of next week which leave Addis
Ababa after 2 o'clock PM", "show me all flights from Addis Ababa to Dubai"],
60
"Patterns": ["please find a flight on Ethiopian from Addis Ababa to Lagos and give me the flight numbers"
"Patterns": ["what are the flights from Lalibela to Addis Ababa on Sunday "],
"Patterns": ["show flights from Addis Ababa to Awassa between 6 pm and 8 pm on Friday"],
"Patterns": ["I would like a list of round trip flights between Rome and Frankfurt for the twenty seventh and
the twenty eighth of December"],
"Patterns": ["show me all flights from Addis Ababa to Dallas both direct and connecting that arrive before
noon"],
"Patterns": ["I need a flight from Lalibela to Gondar leaving today morning"],
"Patterns": ["what are the times that you have planes leaving from Los Angeles going to Moscow on July
seventh"],
"Patterns": ["what flights go from Addis Ababa to Dubai after 6 o'clock next Tuesday"],
"Patterns": ["Does Ethiopian airlines have any flights out of Washington DC to Addis Ababa"],
"Patterns": ["I'd like to know the shortest trip between Istanbul and Addis Ababa"],
"Patterns": ["I would like to see information for flights from Addis Ababa leaving after 12 pm to Bangkok on
Monday"],
"Patterns": ["what is the least cost flight from Addis Ababa to Mumbai"],
"Patterns": ["I need to know information for flights leaving Addis Ababa on Tuesday evening and returning
to Paris"],
"Patterns": ["what flight goes from Dubai to Addis Ababa business class on Ethiopian airlines arriving on may
seventh"],
"Patterns": ["what flights do you have from Washington to Addis Ababa on Tuesday"],
"Patterns": ["what is the ground transportation from Addis Ababa airport to the city "],
61
"Patterns": ["which airlines have first class flights today"],
"Patterns": ["find the latest flight from Addis Ababa to Atlanta that serves a meal"],
"Patterns": ["I would like to make a reservation for a flight to Atlanta from Addis Ababa on this coming
Sunday"],
"Patterns": ["Please give me the flights from Addis Ababa to Washington DC"],
"Patterns": ["what is the earliest flight from Washington DC to Addis Ababa that serves a snack"],
"Patterns": ["what is the cost of a round trip flight from Addis Ababa to Paris beginning on April twenty fifth
and returning on may sixth"],
"Patterns": ["give me the flights leaving Denver august ninth coming back to Addis Ababa"],
"Patterns": ["what flights fly from Rome to Addis Ababa on Monday, Wednesday, Thursday and Friday"],
"Patterns": ["I want to find the first flight from Addis Ababa to Lusaka that serves a meal"],
"Patterns": ["Display all flights from Addis Ababa to Lusaka on July twenty ninth"],
"Patterns": ["I want to travel from Atlanta to Addis Ababa early in the morning first flight"],
"Patterns": ["what are the flights available after 6 pm between Addis Ababa to Mombasa"],
"Patterns": ["what flights depart Addis Ababa on Friday and arrive in Addis Ababa by 8 pm"],
"Patterns": ["what nonstop flights between Addis Ababa and Washington arrive after 4 o'clock pm"],
"Patterns": ["please tell me how many nonstop flights there are from Addis Ababa to Atlanta"],
62
"Patterns": ["where does Ethiopian airlines international fly"],
"Patterns": ["what flights from Denver to Dubai arrive before 8 in the morning"],
"Patterns": ["list nonstop flights from Addis Ababa to Dallas which arrive before midnight"],
"Patterns": ["show me the flights from Addis Ababa to Lusaka that stop in Atlanta"],
"Patterns": ["On the earliest flight from Addis Ababa to Atlanta on Ethiopia is a meal being served"],
63
Annex B: Sample Responses
"Responses": ["Hello, thanks for asking", "Good to see you again", "Hi there, how can I help?"],
"Responses": ["I have had fun chatting with you! Until next time! See you"],
"Responses": ["Sorry, I am not sure what you are saying. To help me to understand you better, you may
want to rephrase your question by asking one question at a time.”, “Sorry, can't understand you", "Please
give me more info", "Not sure I understand"],
"Responses": ["Hello, my name is ET Chatbot. We can chat about flight bookings, check-in, and baggage.
Please ask me one question at a time."],
"Responses": ["I am still learning so I may not be able to answer all your questions just yet -- But i am
getting there. For now, we can chat about community asked preflight questions and you can ask me about
Flight booking, Online check in, Flight Status"],
"Responses": ["You can make a new booking by any of the following methods Buy a seat Online at
www.ethiopianairlines.com.Walk into any of Ethiopian airlines ticket offices or city offices or airports to
purchase over the counter. Visit one of our approved Travel Agents. You can also book through our 24x7
Call Centre at 0115176665 or 6879"],
"Responses": ["You can book up to nine passengers in a single booking including adults and children. For
group bookings please contact us, as the specific terms vary from time to time."],
"Responses": ["Booking an infant seat can be done through our contact Centre”, “Ethiopian airlines
overseas offices by requesting to make the booking under child category."],
"Responses": ["You can check the status of Ethiopian airlines operated flights by flight number or by route.
Here is a tip: For multi sector flight, my recommendation is to check your flight status by the flight
number."],
"Responses": ["Please enter your flight reservation code PNR, it contains 6 English alphabets or eTicket
number which contains 13 Arabic numbers only"],
64
"Responses": ["You can use a credit card, debit card or Net Banking. Once the payment is done
successfully, you will receive the itinerary receipt by mail with the details of payment made."],
"Responses": ["If you are making an online booking with your credit card, but you are not travelling. The
passenger for whom you booked the ticket must carry A photocopy of both sides of the card. Please strike
out the CVV numbers on the copy of the card. The photocopy should contain the name of the passenger, the
date of journey, and the sector on which the journey is made. The aforesaid document should be produced at
the time of check-in. If a passenger fails to comply with this condition, we reserve the right to deny boarding
and cancel his/her tickets"],
"Responses": ["There are four ways to pay for your Ethiopian airlines booking.1/Online booking we accept
Credit or Debit cards.2/Net Banking Booking at Ethiopian Airlines City or Airport offices we accept.3/Cash
or Credit or Debit cards. Booking through our 24x7 Contact center.4/we accept. Credit or Debit cards.
Payzapp Booking with Ethiopian airlines approved travel agents. Kindly refer to the individual agent for
details"],
"Responses": ["Please provide booking type for example Economy or Business, one way or Round trip","
you can Book Now & Pay Later for travelling from any origin destination"],
"Responses": ["I can search for available flights operated by Ethiopian airlines and our codeshare partners.
May I have your departure date? For example, 25 AUG"],
"Responses": ["Yes, you can modify your booking under Manage my Booking section on our website
www.ethiopianairlines.com."],
"Responses": ["Ethiopian airlines issues Itinerary Receipts (ITRs) with payment details instead of
conventional tickets. The itinerary receipt is available online for web-based bookings. Customers can get
their ITRs mailed to their registered e-mail id."],
"Responses": ["Should you need to travel within the next 24 hours then - Bookings can be made up to 3
hours prior to flight departure through Travel Agent. Contact Centre or website www.ethiopianairlines.com
It may be noted that Check-in counters close 60 minutes prior to flight departure."],
"Responses": ["If your payment was successful you would have received a copy of the Itinerary receipt
with the payment details based on the mode of booking done. If you have not received the itinerary receipt,
65
it is recommended that you access your booking record using the confirmation number displayed in the
confirmation page through Manage my Booking on www.ethiopianairlines.com."],
"Responses": ["For bookings made on our website, you should have received a copy of the receipt with the
payment details at the email address you entered during booking."],
"Responses": ["Yes, reservations can be changed or modified through Manage my Booking option on our
website."],
"Responses": ["Cancellation and refund is permissible. It will be based on the cancellation and refund
policy."],
"Responses": ["Seat selection is offered on most flights. You can select a seat of your choice while making
your booking or purchase it later from call centers."],
"Responses": ["All seat charges are nonrefundable on cancellations and nontransferable on modifications.
Please refer to Ethiopian airlines cancellation and refund policy for more details."],
"Responses": ["No, all the bookings are solely for travel on Ethiopian airlines. The ITR is non-endorsable
to any other Airline."],
"Responses": ["Passenger should be holding a RETURN TICKET on any carrier, valid for travel within the
window of VISA validity."],
"Responses": ["From time to time Ethiopian airlines may have promotional fares with different conditions
for cancellations/ Re-booking/ refunds etc.",
"Responses": ["Each passenger, including infants can carry free baggage depending on the destination
subject to Airline regulations. From time to time, Ethiopian airlines may offer tiered fares with 20 or 30 or
40 Kgs free baggage allowance on selected destinations based on seasonal trends"],
"Responses": ["Effective, 1st April, 2018, a fee of 45 AED will be charged at the Addis Ababa Airport for
all Out of Gauge (OOG) baggage."],
"Responses": ["Based on the payload available, excess baggage may be accepted at the time of check in."],
"Responses": ["Only 1 cabin baggage of maximum 7 Kgs including duty free shopping bags with overall
dimensions not exceeding 115 cms (L+W+H) is allowed to be carried onboard per passenger, free of cost
66
"Responses": ["Contours are available at all airports to check the dimensions of your carry-on baggage."
"Responses": ["No. As Ethiopian airlines is a point to point carrier, baggage is booked only for IX sector
and not beyond."],
"Responses": ["For safety and security reasons, you are prohibited from carrying the following items in
your cabin baggage: Dry cell batteries Knives Scissors Sharp instruments Tools Compressed gases: deeply
refrigerated, flammable, non-flammable and poisonous such as butane oxygen, liquid nitrogen, aqualung
cylinders and compressed gas cylinders Corrosives such as acids, alkalis, mercury and wet cell batteries and
apparatus containing mercury Explosives, munitions, fireworks and flares, ammunition including blank
cartridges handguns, fireworks, pistol caps, and their toy replicates Flammable liquids and solids such as
lighter refills, lighter fuel, matches, paints, thinners, fire-lighters, lighters that need inverting before ignition,
radioactive material, briefcases and attach case with installed alarm devices. Oxidizing materials such as
bleaching powder and peroxides. "],
"Responses": ["In the event of loss or damage to baggage, the Airline's liability is limited to SDR 17 (or
equivalent local currency) per kilo of checked-in baggage, provided, loss of baggage has been reported to
the Airline, prior to leaving the customs enclosure and if not traced after 21 days. Delays and Cancellation
of Flights"],
"Responses": ["In the event of a delayed flight, every effort is made to contact passengers in advance to
inform them of the rescheduled departure. "],
"Responses": ["Ethiopian airlines has 2 options available to passengers in the event that a flight is
cancelled."],
"Responses": ["No, Ethiopian airlines operates on a point-to-point basis and will not be held responsible for
the miss-connection of the onward journey."],
"Responses": ["An infant is one who is below 2 years of age on the day of departure, a passenger is
classified as child if she/he is between 2 and 12 years of age on the day of departure and an adult is anyone
over the age of 12 years."],
"Responses": ["The same procedure has to be applied as is applicable for booking an adult. Infant must be
booked with the accompanying adult. The date of birth has to be filled in while making the booking."],
67
"Responses": ["Should you require any special services while you travel with Ethiopian airlines, please call
our reservation offices or contact Centre and inform our staff of your requirements. They will guide you on
the procedure."],
"Responses": ["Ethiopian airlines will accept unaccompanied minor between 5 years and 16 years of age.
Kindly contact the nearest Ethiopian Airlines City/ Airport Office to make a reservation for an
unaccompanied Minor as there are certain formalities to be completed."],
"Responses": ["Children below age of 12 years traveling with anyone other than their parents will have to
submit an Ethiopian Embassy (Destination Point) attested letter stating so. This is a requirement of the
Ethiopian Emigration authorities when travelling international from Ethiopia."],
"Responses": ["without their parent(s). All minors (18 years and below) would need to have an
authorization form filled from their parents with relevant details of their address abroad and in the UAE and
information about who would be receiving them in the UAE (in case they are not travelling with a parent."],
"Responses": ["Passengers who are completely immobile and unable to sit may request for an onboard
stretcher"],
"Responses": ["Ethiopian airlines offers pre-set meals varying from hot meals to wholesome snacks to fresh
cut fruits (in addition to soft beverages/ tea/ coffee) which can be purchased in advance. We also provide
free complimentary snack box with tea/ coffee"],
"Responses": ["You can pre-book your on-board meal 24 hours prior to the departure of your flight."
,"Ethiopian airlines operates B737-800 new generation aircrafts in an all economy version"],
"Responses": ["Ethiopian passport holders holding passport with ECR status and is travelling on Tourist
Visa/ paper visas must get OK to Board message updated in their PNRs."],
"Responses": ["Travel, Track and Go30 minutes before the pick-up, Passengers receive an SMS with a GPS
Tracking link. In case of a flight delay, we update the driver. After you book, we take care of everything."],
68
"Responses": ["ET 704 Airbus A350 Changes on check-in time for flight ET705.Due to CDG airport
congestion and actions taken by airport authorities, Ethiopian Airlines check-in time for ET705 will start at
5:15 p.m. and the check-in counter will be closed at 7:45 p.m. Passengers arriving late after 7:45 p.m. will
not be accepted and date / flight penalties will apply."],
"Responses": ["Economy class starting from 17,768ETB Dear Esteemed customer, due to the COVID-19
pandemic and social distancing requirement, at Dubai Airport, security limits the number of passengers that
can enter into the Terminal at a time. In order to be on time for your flight, we strongly recommend you to
show up at the airport at least 3 hours before your departure time. Thank you."],
"Responses": ["here is the flights ET 602 08:40 PM, ET606 10:40 PM, ET608 ,11:20 PM. I can search for
available flights operated by Ethiopian airlines and our codeshare partners. May I have your departure date?
For example, 25 AUG"],
"Responses": ["Here is the flight number ET 600 /Saturday, Dear Esteemed customer, due to the COVID-19
pandemic and social distancing requirement, at Dubai Airport, security limits the number of passengers that
can enter into the Terminal at a time. In order to be on time for your flight, we strongly recommend you to
show up at the airport at least 3 hours before your departure time. Thank you."],
"Responses": ["Travel, Track and Go minutes before the pick-up, Passengers receive an SMS with a GPS
Tracking link. In case of a flight delay, we update the driver. After you book, we take care of everything."],
"Responses": ["Here is the flight number ET 600 /Saturday. Dear Esteemed customer, due to the COVID-19
pandemic and social distancing requirement, at Dubai Airport, security limits the number of passengers that
can enter into the Terminal at a time. In order to be on time for your flight, we strongly recommend you to
show up at the airport at least 3 hours before your departure time. Thank you."],
"Responses": ["I can search for available flights operated by Ethiopian airlines and our codeshare
"Responses": ["Convenient train travel to the airport Enjoy a carefree start to your journey with Lufthansa
Express Rail. Train and plane are optimally synchronized. However, if there are any delays, we will
automatically rebook you onto the next train or flight – at no charge to you, naturally. One ticket for the
train and the plane Guaranteed connection and optimal coordination of train and flight Advance seat
reservation included"],
"Responses": ["Services to :Africa Abidjan, Abuja, Addis Ababa, Accra, Antananarivo, Asmara, Bahir Dar,
Bamako, Beira, Blantyre, Bosaso, Brazzaville, Bujumbura, Cairo, Cape Town, Comoros Moroni, Conakry,
69
Cotonou, Dakar, Dar-es-Salaam, Dire Dawa, Djibouti, Douala, Durban, Entebbe, Enugu, Gaborone,
Garowe, Goma, Harare, Hargeisa , Johannesburg, Juba, Kaduna, Kano, Khartoum, Kigali, Kilimanjaro,
Kinshasa, Kisangani, Lagos, Libreville, Lilongwe, Lomé, Luanda, Lubumbashi, Lusaka, Malabo, Maputo,
Mbuji-Mayi, Mombasa, Moroni, Nairobi, Ndola, Niamey, Nosy Be, N'djamena, Ouagadougou, Pointe
Noire, Seychelles, Victoria Falls, Windhoek, Yaoundé, Zanzibar Ethiopia & Canada Buenos Aires,
Chicago, Addis Ababa, Newark, Sao-Paulo, Toronto, Washington DC Europe Athens, Brussels, Frankfurt,
Geneva, Istanbul, Liege, London, Manchester, Marseille, Milan, Moscow, Oslo, Paris, Rome, Stockholm,
Vienna, Zaragoza Asia Ahmedabad, Bangkok, Bangalore, Beijing, Delhi, Chennai /Madras, Chengdu,
Guangzhou, Hanoi, Hong Kong, Jakarta, Kuala Lumpur, Manila, Mumbai, Narita- Tokyo, Seoul, Shanghai,
Singapore Middle East Bahrain , Beirut, Dammam, Dubai, Dubai Al-Maktoum, Doha, Jeddah, Kuwait,
Madinah, Muscat, Riyadh, Sharjah, Tel Aviv Freighter Destinations Accra, Ahmedabad, Bamako,
Bangalore, Beirut, Brazzaville, Brussels Bujumbura, Chennai, Dakar, Duala, Dubai, Entebbe, Enugu,
Guangzhou, Harare, Hong Kong, Istanbul Jeddah, Johannesburg, Juba, Kano, Khartoum, Kigali, Kinshasa,
Lagos, Liege , Lomé, Lusaka, Milan, Mumbai, Nairobi, N'Djamena, New Delhi, Ouagadougou, Riyadh,
Shanghai, Sharjah, Zaragoza."],
"Responses": ["Convenient train travel to the airport Enjoy a carefree start to your journey with Lufthansa
Express Rail. Train and plane are optimally synchronized. However, if there are any delays, we will
automatically rebook you onto the next train or flight – at no charge to you, naturally. One ticket for the
train and the plane Guaranteed connection and optimal coordination of train and flight Advance seat
reservation included"],
"Responses”: ["Overbooked Flight means a flight where the number of passengers holding confirmed
reservation and presented themselves for check-in within the required time limit exceeds the number of
available seats on that flight/compartment."],
"Responses”: ["Denied Boarding means refusal to accommodate passengers on a flight although they have
valid ticket, a confirmed reservation on that flight and presented themselves for check-in within the required
time limit due to an overbooking."],
"Responses”: ["Yes, you can hold your reservation and pay later with credit card at our call center or at any
local Ethiopian ticket office."],
"Responses”: ["Before finalizing the booking or making payment, you can modify your cities, travel dates
& times along with your connection preference."],
70
"Responses”: ["You can book one-way, return trips or multiple cities in Economy and Business class.
Bookings can be made only for adults, children and infants."],
"Responses”: ["To obtain only our flight schedules, select Flight Schedules at the home page, insert the
sector and date of travel and click on the \"Find Schedule\" Button."],
"Responses”: ["To enter the airport and for check-in, you must present the itinerary receipt along with valid
photo identification: Passport (for international passengers)."],
"Responses”: ["E-tickets will be issued for all bookings made online at www.ethiopianairlines.com On a
successful purchase the system will generate an Electronic Ticket and a printable itinerary receipt will be
displayed. The itinerary receipt is your confirmation of travel. You will also receive an email with the status
of your booking. You can print the confirmation shown on your screen or print the email. Then all you have
to do is walk in to the airport and check-in with valid photo identification and printed itinerary receipt. Your
boarding pass will be issued against the itinerary receipt."],
"Responses”: ["Ethiopian airlines is committed to the safety and security of the online transactions.
Customer’s credit card is as safe as possible when booked on www.ethiopianairlines.com Information
exchanged with us online is treated securely and protected by using the internationally accepted and industry
standard powerful encryption technology (secure socket layer, SSL). This software encrypts customer's
personal data as it is sent between the browser and our systems. The web booking engine is directly
connected to Sabre Reservation System & payment gateway(s) for credit card processing."],
"Responses”: ["Debit card is also accepted if it is branded with Master, visa and American Express Note:
Local debit cards are acceptable from few African countries"],
"Responses”: ["Payment for online booking can be made through credit card/debit card, mobile or in cash at
Ethiopian airlines offices. Ethiopian accepts VISA, MASTER, AMERICAN EXPRESS, DINERS CLUB,
union pay & UATP cards and PayPal. Please note: The credit card used to pay for tickets is required at
check-in or during refund processing for verification."],
"Responses”: ["Once you have confirmed your booking online, we will immediately debit your credit. This
applies even if you decide to change your travel plans right after. Please contact the nearest Ethiopian office
should you like to rearrange your travel plans or would like to seek a refund. Please note that refund and/or
cancellation charges may apply according to applicable fare conditions."],
71
"Responses”: ["All revenue tickets booked online will earn miles. Please ensure that the frequent flier
number is provided in the form while booking."],
"Responses”: ["Yes, you will see a confirmation page after making a successful booking. If you do not see
one, please contact us at [email protected]."],
"Responses”: ["Currently, we can only handle new bookings made directly online. If you already have a
ticket, please contact your travel agent or Ethiopian airlines ticket/reservations office to confirm your travel
dates."],
"Responses”: ["You can book a maximum of 9 seats at a time (adults and children included)."],
"Responses”: ["The facility to waitlist bookings is not currently available while booking online on
www.ethiopianairlines.com.However, you can contact our reservations office, and we will be glad to help
you."],
"Responses”: ["If you meet the date, time and eligibility criteria, you can book the advance purchase fares
online."],
"Responses”: ["You can make booking for up to three infants (ages 0-23 months) without seat. However,
each infant must be accompanied by an adult passenger."],
"Responses”: ["Currently, online booking service is available for all Ethiopian destinations. Please contact
[email protected] for your travel plan on destinations which are not available online."],
"Responses”: ["Although you do not receive a conventional paper ticket, you will receive an
itinerary/receipt confirming your booking on your screen. This itinerary/receipt will also be sent to you by
email either of which can be printer and used to enter the airport and also for check-in."],
"Responses”: ["E-Ticket is a convenient, fast and safe option to the regular physical paper ticket. Now no
more worries about losing or having the ticket stolen. You can book a confirmed ticket on
www.ethiopianairlines.com up to 48 hours prior to departure. It’s convenient: you can buy and print your
Electronic Ticket online in your home / office. It’s safe: The Electronic Ticket cannot be lost or stolen. It’s
72
fast: you no longer have to collect the ticket from our office or rush to the airport to meet ticketing
deadlines."],
"Responses”: ["Electronic Ticket is ticket less travel service. It is a way of issuing air tickets electronically
which eliminates traditional paper tickets and creates an electronically held record (ticket) of the transaction.
This electronic image of the ticket is stored in the Ethiopian Airlines reservation system."],
"Responses”: ["Ethiopian airlines web sales engine allows booking one way and return in 5 simple steps
with features such as interactive calendar, low fare option, flexible schedule options etc. The reservation has
to be made online at www.ethiopainairlines.com at least 48 hours before departure. You will need to pay
online through your credit card or can pay in cash at Ethiopian ticket offices. non purchase, the system will
generate your itinerary receipt which is confirmation for your confirmed reservation and e-ticket issuance
and display the same on the screen. On it, you will find the key information about your reservation and
flights. You will need to print the page and produce it along with valid photo identification in order to enter
the airport and for check-in. Also, an email will be sent to the passenger’s email address which can also be
printed and used to enter the airport and for check-in. Go directly to the check-in counter. Your boarding
pass will be issued against this itinerary receipt and the valid identification"],
73
Declaration
I, the undersigned, declare that this thesis is my original work and has not been presented for
a degree in any other university, and that all source of materials used for the thesis have been
duly acknowledged.
Declared by:
Name: ___Natnael Mekuanent___
Signature: ____________________
Date: _July 19, 2021
Confirmed by advisor:
Name: ____Ayalew Belay (PhD)____
Signature: ______________________
Date: July 19, 2021