Professional Documents
Culture Documents
net/publication/331746678
CITATIONS READS
39 11,197
3 authors, including:
Some of the authors of this publication are also working on these related projects:
IOEMLA- 2018- 1st International Workshop on Internet of Everything and Machine Learning Applications View project
All content following this page was uploaded by Nedal Ababneh on 03 October 2019.
1 Introduction
The interaction between humans and computer systems is shifting towards natural
language-based interfaces. Natural language has recently been viewed as a compelling
enabling technology for personalization, which allows each user to interact with the
system in his or her own words, rather than using one of a small number of preset ways
to interact [1]. A text based, or a voice-based conversation is usually initiated by the
user who asks a question using natural language and the chatbot answers the question
using natural language [2]. Chatbots are primarily designed to conduct a conversation
with humans using natural language dialogues via auditory or textual methods, in such
a way that humans can easily communicate with the chatbots.
Chatbots have already come a long way from their roots in systems that were more
about simple chat or fun and entertainment [2]. Although modern chatbots use the
power of artificial intelligence to answer users’ complex questions but current state-of-
the art systems are still a long way from being able to have coherent, contextual and
natural conversations with humans [3].
Chatbot technology is not new; it was started in 1960’s when Joseph Weizen-
baum’s program ELIZA, published in 1966, which seemed to be able to fool users into
believing that they were conversing with a real human [4]. Early chatbots like ELIZA
used keyword matching and minimal context identification and lacked the ability to
keep a conversation going. ELIZA program inspects the user input for keywords and
once a keyword is found, it transformed the sentence according to the rules associated
with that keyword in a script. Response is generated by assembly/reassembly rules
associated with selected decomposition rules. Keywords and their associated trans-
formation rules constitute the SCRIPT (it is data and not a part of the program itself) for
a particular class of conversation [5]. A.L.I.C.E. (Artificial Linguistic Internet Com-
puter Entity) is another natural language processing chatbot and is one of the strongest
programs of its type. It has won the Loebner Prize, awarded to accomplished huma-
noid, talking robots, three times (in 2000, 2001 and 2004) [6]. A.L.I.C.E. is built using
Artificial Intelligence Mark-up Language (AIML), based on eXtensible Markup Lan-
guage (XML), developed over the past 10 years [7]. AIML supports most of the
modern chatbot platforms in use today. AIML based chatbot are the most popular
because they are lightweight and easy to configure. Predefined responses for a given set
of questions also induces constraint on the conversational agent, in the sense that
appropriate context also needs to be considered while generating these responses.
Developers and researchers continue to add new components with improved func-
tionalities to the existing methodologies and in some cases, have even proposed a new
design architecture. Most of these improvements were largely based on utilization of
ontologies and recollecting details from the current and previous conversation [8].
Chatbots are generally designed either to serve some specific task, also called task-
oriented chatbots or to a simple chit-chat, also called non-task oriented chatbots, for fun
and entertainment. In this paper, the broad and main classification of chatbots is pre-
sented first which is followed by the exploration of popular chatbot design approaches
used in the categories mentioned above in this paper.
2 Classification of Chatbots
Over the last few years, the chatbot field has become so dynamic with the arrival of new
technologies that a precise classification of chatbots has become subjective to the scope
of their use. Chatbots could be classified into various categories based on several criteria,
e.g. mode of interaction, knowledge domain, their usage and the design techniques
(response generation method) that are typically employed in building these chatbots.
These criteria may include the core design philosophy of the chatbots or the extent to
which context needs to be stored and considered in understanding the conversation or the
type and purpose of the conversation for which the chatbot needs to be designed [8]. The
broad classification can be done based on the following criteria (Fig. 1);
1. Interaction Mode (Text based, or voice/speech based)
2. Chatbot Application (Task-Oriented or Non-Task-Oriented)
3. Rule-based or AI (Machine learning, Deep learning etc.)
4. Domain-Specific or Open-Domain
948 S. Hussain et al.
But in general, chatbots are classified into two main categories based on goals
[9–11] (Fig. 2):
1. Task-oriented chatbots
2. Non-task-oriented chatbots
Task-oriented chatbots are designed for a particular task and are set up to have short
conversations, usually within a closed domain. Unlike task-oriented chatbots, non-task
oriented chatbots can simulate a conversation with a person and seem to perform chit-
chat for entertainment purpose in open domains [10].
There are several different approaches that can be used to develop a task-oriented or
non-task oriented chatbot. These approaches can overlap between these two main
categories of chatbots. This section explores those approaches, in a broad scope, used
A Survey on Conversational Agents/Chatbots Classification and Design Techniques 949
in the development of chatbots since the very early chatbot ELIZA. These approaches
can be divided into three main categories [8, 10, 12–15];
1. Rule-Based Approaches
2. Retrieval-Based Approaches
3. Generative-Based Approaches
Each of these main approaches can employ following multiple techniques;
1. Parsing
2. Pattern Matching
3. AIML
4. Chatscript
5. Ontologies
6. Markov Chain Model
7. Artificial Neural Networks Models
7:1 Recurrent Neural Networks (RNNs)
7:2 Sequence to Sequence Neural Model
7:3 Long Short-Term Memory Networks (LSTMs)
1. Parsing. Parsing is a method that takes the text as an input and extract meaningful
information from it by converting that text into a set of more uncomplicated words
(lexical parsing) that can be easily stored and manipulated. It determines the
grammatical structure of a sentence. A simplistic parsing technique was used in an
early chatbot, ELIZA to parse the input text for the keyword in the sentence. The
keyword is then matched against the documents in the corpus to find the appropriate
response to the user [16]. A more advanced parsing technique is semantic parsing,
which converts user’s input sentence to a machine-understandable representation of
its meaning. It is used in some of the modern commercial chatbots tools like
Dialogflow to understand the user’s intent [17].
2. Pattern Matching. Pattern matching is the most commonly used approach in chat-
bots to classify the user input as <pattern> and produce a suitable response stored
in <template>. These <pattern> <template> pairs are hand crafted. Although pattern
matching techniques are used in both early and modern chatbots, the complexity of the
algorithms used in them differs. Early chatbots like ELIZA used simple pattern
matching rules, as compared to A.L.I.C.E, which uses more complex pattern matching
rules and associates some degree of conversational context while searching the stored
categories for a matching <pattern> [7]. Pattern matching technique is mostly used in
QA chatbots. This techniques has advantage of being flexible to create conversations.
The approach has some disadvantages in terms of scaling as all the possible patterns
are built manually and it’s not a trivial task. Due to the scaling issue, chatbots infor-
mation extraction capabilities are limited, and its responses could be predictable and
repetitive.
3. AIML. AIML (Artificial Intelligence Mark-up Language) has been derived from
XML (Extensible Mark-up Language). AIML is designed to create conversational
flow in chatbots. AIML is an open standard. AIML is made up of data objects which
are called AIML objects. These AIML objects, which are also called AIML
950 S. Hussain et al.
elements, are made up of units which are called topics and categories. The topic is
an optional top-level element that has a name attribute and a set of categories related
to that topic. Categories are the most fundamental unit of knowledge in an AIML
file. A category has a minimum of two more elements in it called ‘pattern’ and
‘template’. Each category is a rule for matching an input and converting it to an
output. The ‘pattern’ matches against the user input and the ‘template’ is used to
generate the Chatbot’s answer [18]. AIML is powerful in designing chatbots’
conversational flow, flexible and easy to use but needs some Natural language
processing and programming expertise.
4. Chatscript. Chatscript is an open source authoring tool for building chatbots.
Chatscript is a combination of natural language engine and dialog management
system designed for interactive conversation while maintaining user state across the
conversations [19]. It is a rule-based engine where rules are created in program scripts
through a process called dialog flow scripting. These scripts can be stored as a normal
text file. Machine learning tools can also be used to mine users conversations logs to
improve your dialog flows. Chatscript make use of concepts. A concept of all nouns
or adverbs can be created. An existing database of some 2000 predefined concepts
and scripters can also easily write their own concepts [20].
5. Ontologies. Domain ontologies are used in chatbots to replace hand crafted domain
knowledge with ontological domain knowledge. Use of ontologies is not new as
they have been used within specific dialogue system modules, for example in
language generation as the basis of the systemic grammar approach [21]. The main
advantage of using domain ontology in a chatbot is that the chatbot can explore the
concepts nodes of an ontology to establish the relationship between concepts that
are used in conversation but can also imply new reasoning [22]. However more
general use of ontologies in chatbots is relatively small.
6. Markov Chain Model. A Markov chain model is a probabilistic model and the
rules in the Markov chain process are based on probabilities. The Markov chain
seeks to model probabilities of state transitions over time. The key idea behind
Markov chain model is that given the current state, there is a fixed probability for
one or more states that it will go to next. When a chatbot uses this method, it will
produce an output that goes with the state transition. This allows the chatbot to
construct sentences for responses that are more suitable probabilistically whilst
being different every time but are more or less coherent. The starting state can be
based on the user input, giving the response some relevance. Markov Chains are a
popular method to create chatbots for entertainment purposes that imitate simple
human conversation. Because Markov chain model is a simplified version of a
complex decision-making process, it does not work well to emulate rich and
complex conversation [8]. A simple Markov chains model is easy to program and
the whole model can be summarized in a matrix.
7. Artificial Neural Networks Models. The latest advances in machine learning,
specifically in artificial neural networks, has made it possible to develop more
intelligent chatbots. Artificial Neural Networks based chatbots can use both
retrieval-based or generative-based approaches in terms of response generation,
although the research trend is moving into the generative-based approach [23, 24].
The main difference between rule-based and artificial neural network based chatbot
A Survey on Conversational Agents/Chatbots Classification and Design Techniques 951
Sequence model (Seq2Seq) is the current industry best practice for response
generation and is widely used [29].
7:3 Long Short-Term Memory Networks (LSTMs). Long Short-Term memory
networks (LSTMs) are a special kind of recurrent neural networks [8]. LSTMs
are designed to avoid the long term dependency problem of RNNs. Memory
cells and gates are introduced in LSTMs which allows the cells to remember the
previous information for long periods of time. These memory cells can store
information in, write new information and read information from them like data
in a computer’s memory. The flow of information is controlled with the use of
input gates, forget gates and output gates [30]. An LSTM network is ideal for
learning from experience as compared to a traditional RNN. LSTM networks
have since replaced RNNs as standard for this task. A well-trained LSTM
network has the capability to perform better classification, processing and
prediction of time series even when there is a long period of gaps of unknown
size between significant events. These capabilities exemplify LSTM’s high
performance as compared to other available RNNs, hidden Markov models, and
other sequence learning methods that are being used in many applications. Thus
LSTMs prove to be highly useful in designing chatbots due to their ability to
refer to a piece of distant information in time very frequently [8, 30].
4 Task-Oriented Chatbots
The main aim for task-oriented chatbots are to help the user to achieve a certain task.
They are designed for dealing with specific scenarios such as: booking a hotel/flight,
booking accommodations, placing an order for a product, scheduling an event, or
helping users to access some specific information etc. Personal assistants such as
Cortana, Alexa and Siri are examples of voice based task-oriented chatbots/
conversational agents who attempt to return an answer for the task they receive.
Task-oriented chatbots work well in restricted domains. These chatbots do not possess
general knowledge and you cannot ask them trivia questions. Rather, they are goal
oriented chatbots focused on helping you achieve a specific goal.
5 Non-task-Oriented Chatbots
Non-task oriented chatbots are systems designed for extended conversations, set up to
mimic the unstructured conversational or ‘chats’ characteristic of human-human
interaction, rather than focusing on a particular task like booking plane flights. These
systems often have an entertainment value. Non-task oriented chatbot architectures fall
into two classes:
1. Generative-Based such as sequence-to-sequence models, which generate proper
responses during the conversation
2. Retrieval-Based which learn to select responses from the current conversation from
a repository.
A Survey on Conversational Agents/Chatbots Classification and Design Techniques 953
Generative models can generate more proper responses that could have never
appeared in the corpus. Corpus-based systems mine large datasets of human-human
conversations, which can be done by using information retrieval (IR-based systems
simply copy a human’s response from a previous conversation) or by using a machine
translation paradigm such as neural network sequence-to- sequence systems, to learn to
map from a user utterance to a system response. Retrieval-based models enjoy the
advantage of informative and fluent responses [31], because they select a proper
response for the current conversation from a repository with response selection algo-
rithms. A variety of heuristics can be applied in order to choose a proper response. It
may be based on the fairly simple concept of a rule-based expression match or may
well be as complex as using a combination of Machine Learning classifiers. Systems
based on this concept do not produce new responses but just choose one from a pool of
predefined responses. Rule-based systems include the early influential ELIZA and
PARRY systems.
Non-task oriented chatbots typically do not have any goal to achieve and are not
designed to handle any particular task. Nonetheless, these chatbots are very helpful in
different applications, such as keeping elderly people company and improving the
understanding of the learners of the second language. In each of its applications, unlike
task-oriented chatbots, they might not have to observe a set of similar tasks; rather, they
would be required to respond to the users in order to proceed on the discussion [35].
Therefore, the algorithm designing in case of non-task oriented chatbots will be
954 S. Hussain et al.
complex as compared to a task-oriented chatbot. In some cases, these chatbots are also
combined with task-oriented chatbots in order to provide an enhanced experience to the
users for a smooth transition. The dialogue context in this case will be random and the
user might not have discussion related to any particular context [36]. For instance, the
user may ask the chatbot for information related to weather, or the question might be
related to horoscope or any recent news story. Therefore, the chatbot must be capable
of retrieving information from online resources in order to communicate effectively
with the user.
8 Conclusion
In this paper, we have explored chatbot’s broad and general classification and discussed
various design techniques used to design chatbots. To conclude, it can be argued that
the typical interaction between human and computer systems has been modernised and
natural languages have become a major input in contemporary chatbots. Natural lan-
guage has recently been viewed as a compelling enabling technology for personal-
ization, which allows each user to interact with the system in his or her own words,
rather than using one of a small number of preset ways to interact. In handling such
queries based on the natural language, the chatbots are programmed using different
strategies and algorithms in order to generate an effective response for the user. In
earlier discussion on the topics, the chatbots can be typically divided into two main
categories including task-oriented chatbots and non-task oriented chatbots. As the name
highlights, the task-oriented chatbots are designed to perform particular tasks based on
the instructions of the user while a non-task oriented chatbot will have several purposes
but will not be able to perform any specific task. The dialogue context in both of these
chatbots will be different. For instance, in case of a task-oriented chatbot, it might have
to process a set of similar inputs and simple algorithms based on pattern matching can
be used to process the queries. In case of non-task oriented chatbot, the queries may
vary in terms of their context and several algorithms and strategies would be required to
use in order to assure correct response of the system. Generative-based chatbots are
difficult to build and operate as compared to retrieval-based chatbots.
References
1. Zadrozny, W., et al.: Natural language dialogue for personalized interaction. Commun. ACM
43(8), 116–120 (2000)
2. Hussain, S., Athula, G.: Extending a conventional chatbot knowledge base to external
knowledge source and introducing user based sessions for diabetes education. In: 2018 32nd
International Conference on Advanced Information Networking and Applications Work-
shops (WAINA) 2018. IEEE
3. Levesque, H.J.: Common sense, the turing test, and the quest for real AI: Reflections on
Natural and Artificial Intelligence. MIT Press, Cambridge (2017)
4. Wikipedia: Chatbot. 29 December 2018 (cited 30 December 2018). https://en.wikipedia.org/
wiki/Chatbot
A Survey on Conversational Agents/Chatbots Classification and Design Techniques 955
5. Weizenbaum, J.: ELIZA–a computer program for the study of natural language commu-
nication between man and machine. Commun. ACM 26(1), 23–28 (1983)
6. Wikipedia. Artificial Linguistic Internet Computer Entity. 19 November 2018 (cited 30
December 2018). https://en.wikipedia.org/wiki/Artificial_Linguistic_Internet_Computer_
Entity
7. Wallace, R.S.: The anatomy of ALICE. In: Parsing the Turing Test, pp. 181–210. Springer,
Dordrecht (2009)
8. Ramesh, K., et al.: A Survey of Design Techniques for Conversational Agents. In:
International Conference on Information, Communication and Computing Technology.
Springer, Singapore (2017)
9. Budulan, S.: Chatbot Categories and Their Limitations (2018). (cited May 2018). https://
dzone.com/articles/chatbots-categories-and-their-limitations-1
10. Chen, H., et al.: A Survey on Dialogue Systems: Recent Advances and New Frontiers
(2017). arXiv preprint arXiv:1711.01731
11. Yan, Z., et al.: Building Task-Oriented Dialogue Systems for Online Shopping. In: AAAI
(2017)
12. Masche, J., Le, N.-T.: A Review of Technologies for Conversational Systems. In:
International Conference on Computer Science, Applied Mathematics and Applications.
Springer, Cham (2017)
13. Abdul-Kader, S.A., Woods, J.: Survey on chatbot design techniques in speech conversation
systems. Int. J. Adv. Comput. Sci. Appl. 6(7), 72–80 (2015)
14. Mathur, V., Singh, A.: The Rapidly Changing Landscape of Conversational Agents (2018).
arXiv preprint arXiv:1803.08419
15. Bradeško, L., Mladenić, D.: A survey of chatbot systems through a loebner prize
competition. In: Proceedings of Slovenian Language Technologies Society Eighth Confer-
ence of Language Technologies (2012)
16. Weizenbaum, J.: ELIZA—a computer program for the study of natural language
communication between man and machine. Commun. ACM 9(1), 36–45 (1966)
17. Clarke, D.: Three AI Technologies that could make chatbots intelligent. 24 March 2018
(cited 18 December 2018). https://hackernoon.com/three-ai-technologies-that-could-make-
chatbots-intelligent-10f8c6e8b4b0
18. Shawar, B.A., Atwell, E.: Chatbots: are they really useful? Zeitschrift für Computerlinguistik
und Sprachtechnologie, p. 29 (2007)
19. Wikipedia contributors. ChatScript. Wikipedia, The Free Encyclopedia. 4 September 2018,
19:19 UTC. https://en.wikipedia.org/w/index.php?title=ChatScript&oldid=858055386. Acce-
ssed 22 Jan 2019
20. Robino, G.: How to build your first chatbot using Chatscript (2018). (cited 18 December
2018). https://medium.freecodecamp.org/chatscript-for-beginners-chatbots-developers-c58b
b591da8
21. Milward, D., Beveridge, M.: Ontology-based dialogue systems. In: Proceedings of 3rd
Workshop on Knowledge and reasoning in practical dialogue systems (IJCAI 2003) 2003
22. Al-Zubaide, H., Issa, A.A.: Ontbot: Ontology based chatbot. In: 2011 Fourth International
Symposium on Innovation in Information & Communication Technology (ISIICT). IEEE
(2011)
23. Nuez Ezquerra, A.: Implementing ChatBots using Neural Machine Translation Techniques
(2018). Universitat Politècnica de Catalunya
24. Csáky, R.: Deep Learning Based Chatbot Models (2017). https://doi.org/10.13140/rg.2.2.
21857.40801
25. Pelk, H.: Machine learning, neural networks and algorithms (2016). (cited 18 January 2019).
https://itnext.io/machine-learning-neural-networks-and-algorithms-4cd27a105b89
956 S. Hussain et al.
26. Wikipedia contributors. Artificial neural network. In: Wikipedia, The Free Encyclopedia.
https://en.wikipedia.org/w/index.php?title=Artificial_neural_network&oldid=878429976.
Accessed 13:24, 25 Jan 2019
27. Young, T., et al.: Recent trends in deep learning based natural language processing. IEEE
Comput. Intell. Mag. 13(3), 55–75 (2018)
28. Cahn, J.: CHATBOT: Architecture, design, and development. In: University of Pennsylvania
School of Engineering and Applied Science Department of Computer and Information
Science (2017)
29. Cho, K., et al.: Learning phrase representations using RNN encoder-decoder for statistical
machine translation (2014). arXiv preprint arXiv:1406.1078
30. Sak, H., Senior, A., Beaufays, F.: Long short-term memory recurrent neural network
architectures for large scale acoustic modeling. In: Fifteenth Annual Conference of the
International Speech Communication Association (2014)
31. Ji, Z., et al.: An information retrieval approach to short text conversation (2014). arXiv
preprint. arXiv:1408.6988.1
32. Duijst, D., Sandberg, J., Buzzo, D.: Can we Improve the User Experience of Chatbots with
Personalisation? (2017)
33. Liu, B., Xu, Z., Sun, C., Wang, B., Wang, X., Wong, D.F., Zhang, M.: Content-oriented user
modeling for personalized response ranking in Chatbots. IEEE/ACM Trans. Audio Speech
Lang. Process. (2018)
34. Pilato, G., Augello, A., Gaglio, S.: A modular architecture for adaptive ChatBots. In:
Proceedings of 5th IEEE International Conference on Semantic Computing, ICSC 2011
(2011)
35. Vtyurina, A., Savenkov, D., Agichtein, E., Clarke, C.L.A.: Exploring conversational search
with humans, assistants, and wizards. In: Proceedings of the 2017 CHI Conference Extended
Abstracts on Human Factors in Computing Systems – CHI EA 2017 (2017)
36. Niculescu, A.I., Banchs, R.E.: Strategies to cope with errors in human-machine spoken
interactions: using chatbots as back-off mechanism for task-oriented dialogues. In: Errors by
Humans Mach. multimedia, multimodal Multiling, Data Process (2015)