Building a ChatBot Using Emotional Cognitive
Conversational Agent Architecture (ECCAA)
Gnaneswari Gnanaguru(&)
New Horizon College, Jain University, Bangalore, India
gnaneswari@yahoo.com
Abstract. Conversational agent popularly known as Chatbot Alexa, Siri,
Watson, etc., has become the most happening thing in our day to day lives. This
research paper is an attempt to design architecture for Conversational agents
based on human cognition. Conversational agents generally use NLP and
Machine Learning techniques for programming a ChatBot. To achieve human
like conversations we combine those techniques with the ‘Society of Minds’
human cognition layers.
Keywords: Artificial intelligence  Cognitive science  Chatbot  Machine
learning  Conversational agents
1 Introduction
Langley [1] says agents acquires knowledge about the environment through perception,
implication of situations through reasoning and perception, knowledge is gained
through learning, knowledge is also gained from other agent’s experience/learning
through communication. Cognitive architectures can be designed by clearly defining
the functionality, provide a mechanism based on the functionality and implement the
model in real time scenario. SMCA (Society of Mind approach to Cognitive Archi-
tecture) makes use of a generic architecture, and developed in terms of generic cog-
nitive and metacognitive agent types. The proposed architecture is based on SMCA [2].
2 Cognitive Agent Architectures
EM-ONE architecture proposed by P. Singh originated from Marvin Minsky’s
“Emotion Machine” architecture [3]. EM-ONE architecture for commonsense com-
puting, that is capable of reflective reasoning about situations involving physical,
social, and mental dimensions. SMCA: (Society of Mind approach to Cognitive
Architecture) was developed in terms of generic cognitive and metacognitive agent
types. Each agent is designed to fit one of the following categories: reflexive agents,
reactive agents, deliberative (BDI models) agents, learning, metacontrol and
metacognitive agents [2].
© Springer Nature Singapore Pte Ltd. 2020
A. Kumar et al. (eds.), ICDSMLA 2019, Lecture Notes in Electrical Engineering 601,
https://doi.org/10.1007/978-981-15-1420-3_187
The conversational agent architectures available were lacking the incorporation of
the cognitive theory with them. My research is an attempt to incorporate the conver-
sational agent architecture with the cognitive architecture so that the chatbot will sound
more like a human.
3 Design of an Emotional Cognitive Conversational Agent
Architecture (ECCAA)
My hypothesis is ‘There is an internal cognitive system in a conversational agent
architecture that will map a syntactic structure to a semantic one based on
pragmatics’.
Emotional Cognitive Conversational Agent Architecture (ECCAA) is a 7 Layer
architecture where each layer is connected to a specific database which stores suc-
cessful conversations. Basically the conversations are categorized into 5 different levels
such as Reflexive layer, Reactive layer, Deliberative layer, Learning layer and Cog-
nition layer based on SMCA. But in the case of conversational agent architecture we
need to further classify the Cognition layer. Thus in ECCAA, the Cognitive layer is
further classified into Cognition, Meta Cognition and Epistemic Cognition. Apart from
the horizontal layers; there are vertical layers such as perception, action and emotion
[4]. Thus ECCAA is language independent, flexible to all socio-cultural environments.
The language and knowledge engine is used to store the syntax, semantics of the
language and environmental, social facts respectively. Though the implementation is
based on the English language, the model will be universal and will be robust irre-
spective of the language [5].
3.1 Reflexive Layer
This is the first layer and it has very limited intelligence. It is based on the biological
reflex mechanism which acts instantly before thinking. This layer is completely
dependent on the knowledge engine. In conversational agents just one word answers
such as yes/no/ok are generated from this layer. The intelligence is only limited to
knowing its environment and acting spontaneously. As the intelligence capabilities of
the agent increases by experience more answers will fall under this layer [6].
3.2 Reactive Layer
The next layer is the reactive layer whose intelligence is completely based on facts and
general knowledge. Reasoning or decision making is not required for such type of
answers. Learned and successful conversations are stored in the knowledge engine and
the language protocols such as the syntax and semantics of the language are stored in
the language engine. It uses the knowledge engine for the acquiring data and the
language engine for communicating [6].
Building a ChatBot Using Emotional Cognitive Conversational 1837
3.3 Deliberative Layer
This layer does the goal based reasoning using heuristic search techniques to choose
the most optimum answer for the current situation. Understanding of the environment,
the role played by the agent, the purpose of the conversation etc. will be the deciding
factors [7].
3.4 Learning Layer
The only task of the learning layer is to store the successful conversations in the
knowledge base which will be used by the deliberative layer for future choices. When
the agents are allowed to communicate with each other this knowledge is multiply.
3.5 Cognitive Layer
This layer is considered to be one of the layers with the highest levels of intelligence. If
this level of intelligence is achieved in our conversational agent then we can consider
all the conversations to be successful. This level is achieved when there a proper
understanding of the environment, perseverance and problem solving capabilities. This
level when achieved could be the closet level to any human to human conversation.
3.6 Meta Cognition Layer
This layer is also considered to be one of the layers with the highest levels of intel-
ligence which is self reflective with consciousness. The agent will reflect on how
successful and be able to act wisely and come up with strategies to eliminate failure
without any human intervention. So as the agent lives more on certain circumstances
will tend to become more experienced and wise like humans do (Fig. 1).
ECCAA
Fig. 1. Architecture for emotional cognitive conversational agent
1838 G. Gnanaguru
3.7 Epistemic Cognition Layer
This layer is considered to be in the highest levels of intelligence which is self reflective
too [8]. In Epistemic cognition level, the agent reflects on the limits of its knowledge
and overcome such limitations. In this level of intelligence the agent must be able to
differentiate the known from the unknown. This intelligence is above the human level
of intelligence. Here the agent should know that it needs to have more
knowledge/information to participate in certain conversations and be able to say ‘I
don’t know’ and also have the urge to know. So the agent will know its limitations, will
have certainty of knowledge and also the criteria for knowing.
4 Implementation of the ECCAA Model
4.1 Reflexive Layer
In this layer only the yes/no responses are trained to the ‘GGBot’.
E.g. Are apples red fruits? Is India democratic?
Here basic stimuli and responses can be trained from the knowledge base and meta
data which is the information on the agent’s involved in conversation are stored. The
dataset used to train is ‘ggbotyesno’.
Knowledge base of Domain includes Company policies, Do’s and Dont’s, Today’s
Rates, Trouble shooting queries, Clarification, Functioning and protocols, etc.
Meta Data is information about the Agent which includes Name, Address, Status,
designation, family details, employer details, etc., Personality, state of mind, Status in
the society, body language, facial expressions, emotions, etc., Desire, Belief, Intentions
(BDI) and Goals.
4.2 Reactive Layer
This layer is very similar to the previous layer, except that instead of on yes/no
responses; responses are facts stored in the knowledge base and in the meta data. The
dataset contains more stimuli-response with the responses derived from the facts stored
in knowledge base together with the yes/no responses. The dataset used for this level of
training is known as ‘ggbotfacts’ (Fig. 2).
Building a ChatBot Using Emotional Cognitive Conversational 1839
E.g. Who is the president of United States? What is your designation?
4.3 Deliberative Layer
A Heuristic search is performed based on Neural Networks to choose the most accurate
reply. In order to train and perform heuristic search a large English corpus know as
‘ChatterBot English Corpus is used along with my datasets ‘ggbotcorpus’, ‘ggbo-
tyesno’ and ‘ggbotfacts’.
The numbers above indicate the percentage of accuracy which is also referred as
confidence in the responses.
4.4 Learning Layer
In all the above models, learning is inevitable in a ChatBot. So practically learning is
not a separate layer. Whenever there is a response for a stimulus, the new response is
stored in the database.
4.5 Cognition Layer
The core of the ECCAA is the cognitive layer. ‘Emotion’ is added to the dataset.
Before training the dataset, every stimuli and response is analyzed and classified based
on the emotions. This is done using an emotion detector API known as ‘indico’. It is
capable of detecting which is the dominant emotion in the sentence. The basic emotions
Fig. 2. Training a ChatBot
1840 G. Gnanaguru
considered are anger, joy, fear, sadness, surprise. For every statement, a vector value is
derived for every emotion. Now training is performed as usual with all the stimulus and
responses with emotions. The emotion with highest vector value is assigned to that
particular sentence (Fig. 3).
Fig. 3. Classification based on emotions
Fig. 4. Meta-cognition layer with self reflection
Building a ChatBot Using Emotional Cognitive Conversational 1841
4.6 Meta Cognition Layer
This layer is more intelligent than the above layers. This layer is self-reflective. This
can be implemented in which the chatbot has to choose responses with confidence
value more than the threshold assigned. If the confidence is say 65% then, the
response must be a specific response such as ‘I am sorry, I don’t know’ (Fig. 4).
Fig. 5. Epistemic cognition layer with self knowledge gaining
Fig. 6. Reflexive layer
1842 G. Gnanaguru
4.7 Epistemic Cognition Layer
In Epistemic cognition level, the agent reflects on the limits of its knowledge and
overcome such limitations. This is the highest level in ECCAA. It is not only ‘self-
reflective’ but also learns by itself. This is implemented by adding responses directly to
store in the database that is specified in the ‘Storage Adapter’. This added response is
added to the trained dataset (Fig. 5).
Fig. 7. Reactive layer
Fig. 8. Deliberative layer
Building a ChatBot Using Emotional Cognitive Conversational 1843
5 Results
A questionnaire was prepared commonly for all the models in order to measure their
performances. A graph was plotted with responses in the x axis and the confidence
value in the y axis. The result was as follow for various models (Figs. 6, 7, 8, 9, 10 and
11).
Fig. 9. Cognition layer
Fig. 10. Meta cognition layer
1844 G. Gnanaguru
6 Conclusion
Thus general conversational agent may produce good results, but in order to achieve
results that are close to the human responses, the cognitive model ECCAA is sug-
gested. The result suggests that it is a very efficient one. This model can be incorpo-
rated to any conversational agent architecture. This model also works for training
multilingual conversational agents with respective datasets.
References
1. Langley P, Laird JE, Rogers S (2009) Cognitive architectures: research issues and challenges.
Cogn Syst Res 10(2):141–160, ISSN 1389-0417
2. Venkatamuni MV (2008) A society of mind approach to cognition and metacognition in a
cognitive architecture. Dissertation of Doctor of Philosophy in computer science and
engineering, University of Hull, London
3. Singh P (2005) EMONE: an architecture for reflective commonsense thinking. Dissertation of
Doctor of Philosophy in computer science and engineering, Massachusetts Institute of
Technology, Cambridge, MA
4. Weitzenfeld A, Arbib M, Alexander A (2002) NSL—neural simulation language: a system for
brain modeling. MIT Press, Cambridge, MA
5. Gnanaguru G, Venkatamuni, MV (2017) Building a conversational agent based on the
principles of cognitive pragmatics using cognitive architecture. Int J Eng Res Technol 6(2),
ISSN: 2278-0181
6. AbuShawar B, Atwell, E (2015) ALICE chatbot: trials and outputs, Computación y Sistemas
19(4):625–63
Fig. 11. Epistemic cognition layer
Building a ChatBot Using Emotional Cognitive Conversational 1845
7. Davis N (2002) Computational architectures for intelligence and motivation. In: 17th IEEE
international symposium on intelligent control, Vancouver, Canada
8. Hintze A (2016) Understanding the four types of AI, from reactive robots to self-aware
beings. Michigan State University, 14 November 2016. https://theconversation.com/
understanding-the-four-types-of-ai-from-reactive-robots-to-self-aware-beings-67616, Acces-
sed 15 Nov 2017
1846 G. Gnanaguru

More Related Content

PDF
IRJET- Conversational Assistant based on Sentiment Analysis
PDF
IRJET - E-Assistant: An Interactive Bot for Banking Sector using NLP Process
PDF
Conversational AI:An Overview of Techniques, Applications & Future Scope - Ph...
PDF
Welcome to International Journal of Engineering Research and Development (IJERD)
PDF
N01741100102
PDF
IRJET- BDI using NLP for Efficient Depression Identification
PDF
Business intelligence analytics using sentiment analysis-a survey
PDF
Ai assignment
IRJET- Conversational Assistant based on Sentiment Analysis
IRJET - E-Assistant: An Interactive Bot for Banking Sector using NLP Process
Conversational AI:An Overview of Techniques, Applications & Future Scope - Ph...
Welcome to International Journal of Engineering Research and Development (IJERD)
N01741100102
IRJET- BDI using NLP for Efficient Depression Identification
Business intelligence analytics using sentiment analysis-a survey
Ai assignment

What's hot (20)

PPT
Introduction to soft computing
PDF
76201926
PDF
Report for Speech Emotion Recognition
PPTX
Deep learning
PDF
CV _Manoj
PPTX
Basics of Soft Computing
PDF
F0363942
DOC
MS Word
PDF
A model of a social chatbot
PDF
Adaptive Vocabulary Construction for Frustration Intensity Modelling in Custo...
PDF
ADAPTIVE VOCABULARY CONSTRUCTION FOR FRUSTRATION INTENSITY MODELLING IN CUSTO...
PDF
IRJET- Chatbot using NLP and Deep Learning
PDF
IJCS_2015_0201003
PDF
IRJET- Recognition of Handwritten Characters based on Deep Learning with Tens...
PDF
S33100107
PDF
Implementation of Emotional Intelligence in a machine
PDF
NLP BASED INTERVIEW ASSESSMENT SYSTEM
PDF
A51149 - Copy
PDF
An Intelligent Career Counselling Bot A System for Counselling
PDF
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
Introduction to soft computing
76201926
Report for Speech Emotion Recognition
Deep learning
CV _Manoj
Basics of Soft Computing
F0363942
MS Word
A model of a social chatbot
Adaptive Vocabulary Construction for Frustration Intensity Modelling in Custo...
ADAPTIVE VOCABULARY CONSTRUCTION FOR FRUSTRATION INTENSITY MODELLING IN CUSTO...
IRJET- Chatbot using NLP and Deep Learning
IJCS_2015_0201003
IRJET- Recognition of Handwritten Characters based on Deep Learning with Tens...
S33100107
Implementation of Emotional Intelligence in a machine
NLP BASED INTERVIEW ASSESSMENT SYSTEM
A51149 - Copy
An Intelligent Career Counselling Bot A System for Counselling
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
Ad

Similar to ECCAA (20)

PDF
Chakrabarti dissertation
PDF
How to make a chatbot with artificial intelligence converted
PDF
Development of Chatbot Using AIML Technologies
PDF
Meetup 6/3/2017 - Artificiële Intelligentie: over chatbots & robots
PDF
VOCAL- Voice Command Application using Artificial Intelligence
PDF
Artificial Assistants: How can I help you? by Christopher Currin
PDF
Human-like Chatbots: Promises, Challenges, and Implications
PPTX
Dialogare con agenti artificiali
PPTX
Using Chatbots to Assist Communication in Collaborative Networks: 19th IFIP W...
PDF
HealthCare ChatBot Using Machine Learning
PPTX
Test strategy for Conversational AI
PDF
A crisis-communication-network-based-on-embodied-conversational-agents-system...
PDF
IRJET- Recruitment Chatbot
PPTX
ChatGPT.pptx
PDF
How to Build an App with ChatGPT.pdf
PPTX
Build a Chatbot with IBM Watson - No Coding Required
PDF
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
PDF
Jual obat aborsi Palangkaraya ( 085657271886 ) Cytote pil telat bulan penggug...
PDF
Jual obat aborsi Ngawi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
PDF
Jual obat aborsi Bekasi ( 085657271886 ) Cytote pil telat bulan penggugur kan...
Chakrabarti dissertation
How to make a chatbot with artificial intelligence converted
Development of Chatbot Using AIML Technologies
Meetup 6/3/2017 - Artificiële Intelligentie: over chatbots & robots
VOCAL- Voice Command Application using Artificial Intelligence
Artificial Assistants: How can I help you? by Christopher Currin
Human-like Chatbots: Promises, Challenges, and Implications
Dialogare con agenti artificiali
Using Chatbots to Assist Communication in Collaborative Networks: 19th IFIP W...
HealthCare ChatBot Using Machine Learning
Test strategy for Conversational AI
A crisis-communication-network-based-on-embodied-conversational-agents-system...
IRJET- Recruitment Chatbot
ChatGPT.pptx
How to Build an App with ChatGPT.pdf
Build a Chatbot with IBM Watson - No Coding Required
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Palangkaraya ( 085657271886 ) Cytote pil telat bulan penggug...
Jual obat aborsi Ngawi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Bekasi ( 085657271886 ) Cytote pil telat bulan penggugur kan...
Ad

Recently uploaded (20)

PDF
Navigating the Thai Supplements Landscape.pdf
PPTX
CYBER SECURITY the Next Warefare Tactics
PDF
Best Data Science Professional Certificates in the USA | IABAC
PPTX
DS-40-Pre-Engagement and Kickoff deck - v8.0.pptx
PPT
statistics analysis - topic 3 - describing data visually
PPTX
The Data Security Envisioning Workshop provides a summary of an organization...
PDF
Session 11 - Data Visualization Storytelling (2).pdf
PPTX
chuitkarjhanbijunsdivndsijvndiucbhsaxnmzsicvjsd
PPTX
CHAPTER-2-THE-ACCOUNTING-PROCESS-2-4.pptx
PPT
Image processing and pattern recognition 2.ppt
PPTX
ai agent creaction with langgraph_presentation_
PDF
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
PPTX
New ISO 27001_2022 standard and the changes
PPT
DU, AIS, Big Data and Data Analytics.ppt
PPTX
Tapan_20220802057_Researchinternship_final_stage.pptx
PDF
©️ 02_SKU Automatic SW Robotics for Microsoft PC.pdf
PPT
expt-design-lecture-12 hghhgfggjhjd (1).ppt
PDF
Global Data and Analytics Market Outlook Report
PDF
A biomechanical Functional analysis of the masitary muscles in man
PPTX
1 hour to get there before the game is done so you don’t need a car seat for ...
Navigating the Thai Supplements Landscape.pdf
CYBER SECURITY the Next Warefare Tactics
Best Data Science Professional Certificates in the USA | IABAC
DS-40-Pre-Engagement and Kickoff deck - v8.0.pptx
statistics analysis - topic 3 - describing data visually
The Data Security Envisioning Workshop provides a summary of an organization...
Session 11 - Data Visualization Storytelling (2).pdf
chuitkarjhanbijunsdivndsijvndiucbhsaxnmzsicvjsd
CHAPTER-2-THE-ACCOUNTING-PROCESS-2-4.pptx
Image processing and pattern recognition 2.ppt
ai agent creaction with langgraph_presentation_
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
New ISO 27001_2022 standard and the changes
DU, AIS, Big Data and Data Analytics.ppt
Tapan_20220802057_Researchinternship_final_stage.pptx
©️ 02_SKU Automatic SW Robotics for Microsoft PC.pdf
expt-design-lecture-12 hghhgfggjhjd (1).ppt
Global Data and Analytics Market Outlook Report
A biomechanical Functional analysis of the masitary muscles in man
1 hour to get there before the game is done so you don’t need a car seat for ...

ECCAA

  • 1. Building a ChatBot Using Emotional Cognitive Conversational Agent Architecture (ECCAA) Gnaneswari Gnanaguru(&) New Horizon College, Jain University, Bangalore, India gnaneswari@yahoo.com Abstract. Conversational agent popularly known as Chatbot Alexa, Siri, Watson, etc., has become the most happening thing in our day to day lives. This research paper is an attempt to design architecture for Conversational agents based on human cognition. Conversational agents generally use NLP and Machine Learning techniques for programming a ChatBot. To achieve human like conversations we combine those techniques with the ‘Society of Minds’ human cognition layers. Keywords: Artificial intelligence Cognitive science Chatbot Machine learning Conversational agents 1 Introduction Langley [1] says agents acquires knowledge about the environment through perception, implication of situations through reasoning and perception, knowledge is gained through learning, knowledge is also gained from other agent’s experience/learning through communication. Cognitive architectures can be designed by clearly defining the functionality, provide a mechanism based on the functionality and implement the model in real time scenario. SMCA (Society of Mind approach to Cognitive Archi- tecture) makes use of a generic architecture, and developed in terms of generic cog- nitive and metacognitive agent types. The proposed architecture is based on SMCA [2]. 2 Cognitive Agent Architectures EM-ONE architecture proposed by P. Singh originated from Marvin Minsky’s “Emotion Machine” architecture [3]. EM-ONE architecture for commonsense com- puting, that is capable of reflective reasoning about situations involving physical, social, and mental dimensions. SMCA: (Society of Mind approach to Cognitive Architecture) was developed in terms of generic cognitive and metacognitive agent types. Each agent is designed to fit one of the following categories: reflexive agents, reactive agents, deliberative (BDI models) agents, learning, metacontrol and metacognitive agents [2]. © Springer Nature Singapore Pte Ltd. 2020 A. Kumar et al. (eds.), ICDSMLA 2019, Lecture Notes in Electrical Engineering 601, https://doi.org/10.1007/978-981-15-1420-3_187
  • 2. The conversational agent architectures available were lacking the incorporation of the cognitive theory with them. My research is an attempt to incorporate the conver- sational agent architecture with the cognitive architecture so that the chatbot will sound more like a human. 3 Design of an Emotional Cognitive Conversational Agent Architecture (ECCAA) My hypothesis is ‘There is an internal cognitive system in a conversational agent architecture that will map a syntactic structure to a semantic one based on pragmatics’. Emotional Cognitive Conversational Agent Architecture (ECCAA) is a 7 Layer architecture where each layer is connected to a specific database which stores suc- cessful conversations. Basically the conversations are categorized into 5 different levels such as Reflexive layer, Reactive layer, Deliberative layer, Learning layer and Cog- nition layer based on SMCA. But in the case of conversational agent architecture we need to further classify the Cognition layer. Thus in ECCAA, the Cognitive layer is further classified into Cognition, Meta Cognition and Epistemic Cognition. Apart from the horizontal layers; there are vertical layers such as perception, action and emotion [4]. Thus ECCAA is language independent, flexible to all socio-cultural environments. The language and knowledge engine is used to store the syntax, semantics of the language and environmental, social facts respectively. Though the implementation is based on the English language, the model will be universal and will be robust irre- spective of the language [5]. 3.1 Reflexive Layer This is the first layer and it has very limited intelligence. It is based on the biological reflex mechanism which acts instantly before thinking. This layer is completely dependent on the knowledge engine. In conversational agents just one word answers such as yes/no/ok are generated from this layer. The intelligence is only limited to knowing its environment and acting spontaneously. As the intelligence capabilities of the agent increases by experience more answers will fall under this layer [6]. 3.2 Reactive Layer The next layer is the reactive layer whose intelligence is completely based on facts and general knowledge. Reasoning or decision making is not required for such type of answers. Learned and successful conversations are stored in the knowledge engine and the language protocols such as the syntax and semantics of the language are stored in the language engine. It uses the knowledge engine for the acquiring data and the language engine for communicating [6]. Building a ChatBot Using Emotional Cognitive Conversational 1837
  • 3. 3.3 Deliberative Layer This layer does the goal based reasoning using heuristic search techniques to choose the most optimum answer for the current situation. Understanding of the environment, the role played by the agent, the purpose of the conversation etc. will be the deciding factors [7]. 3.4 Learning Layer The only task of the learning layer is to store the successful conversations in the knowledge base which will be used by the deliberative layer for future choices. When the agents are allowed to communicate with each other this knowledge is multiply. 3.5 Cognitive Layer This layer is considered to be one of the layers with the highest levels of intelligence. If this level of intelligence is achieved in our conversational agent then we can consider all the conversations to be successful. This level is achieved when there a proper understanding of the environment, perseverance and problem solving capabilities. This level when achieved could be the closet level to any human to human conversation. 3.6 Meta Cognition Layer This layer is also considered to be one of the layers with the highest levels of intel- ligence which is self reflective with consciousness. The agent will reflect on how successful and be able to act wisely and come up with strategies to eliminate failure without any human intervention. So as the agent lives more on certain circumstances will tend to become more experienced and wise like humans do (Fig. 1). ECCAA Fig. 1. Architecture for emotional cognitive conversational agent 1838 G. Gnanaguru
  • 4. 3.7 Epistemic Cognition Layer This layer is considered to be in the highest levels of intelligence which is self reflective too [8]. In Epistemic cognition level, the agent reflects on the limits of its knowledge and overcome such limitations. In this level of intelligence the agent must be able to differentiate the known from the unknown. This intelligence is above the human level of intelligence. Here the agent should know that it needs to have more knowledge/information to participate in certain conversations and be able to say ‘I don’t know’ and also have the urge to know. So the agent will know its limitations, will have certainty of knowledge and also the criteria for knowing. 4 Implementation of the ECCAA Model 4.1 Reflexive Layer In this layer only the yes/no responses are trained to the ‘GGBot’. E.g. Are apples red fruits? Is India democratic? Here basic stimuli and responses can be trained from the knowledge base and meta data which is the information on the agent’s involved in conversation are stored. The dataset used to train is ‘ggbotyesno’. Knowledge base of Domain includes Company policies, Do’s and Dont’s, Today’s Rates, Trouble shooting queries, Clarification, Functioning and protocols, etc. Meta Data is information about the Agent which includes Name, Address, Status, designation, family details, employer details, etc., Personality, state of mind, Status in the society, body language, facial expressions, emotions, etc., Desire, Belief, Intentions (BDI) and Goals. 4.2 Reactive Layer This layer is very similar to the previous layer, except that instead of on yes/no responses; responses are facts stored in the knowledge base and in the meta data. The dataset contains more stimuli-response with the responses derived from the facts stored in knowledge base together with the yes/no responses. The dataset used for this level of training is known as ‘ggbotfacts’ (Fig. 2). Building a ChatBot Using Emotional Cognitive Conversational 1839
  • 5. E.g. Who is the president of United States? What is your designation? 4.3 Deliberative Layer A Heuristic search is performed based on Neural Networks to choose the most accurate reply. In order to train and perform heuristic search a large English corpus know as ‘ChatterBot English Corpus is used along with my datasets ‘ggbotcorpus’, ‘ggbo- tyesno’ and ‘ggbotfacts’. The numbers above indicate the percentage of accuracy which is also referred as confidence in the responses. 4.4 Learning Layer In all the above models, learning is inevitable in a ChatBot. So practically learning is not a separate layer. Whenever there is a response for a stimulus, the new response is stored in the database. 4.5 Cognition Layer The core of the ECCAA is the cognitive layer. ‘Emotion’ is added to the dataset. Before training the dataset, every stimuli and response is analyzed and classified based on the emotions. This is done using an emotion detector API known as ‘indico’. It is capable of detecting which is the dominant emotion in the sentence. The basic emotions Fig. 2. Training a ChatBot 1840 G. Gnanaguru
  • 6. considered are anger, joy, fear, sadness, surprise. For every statement, a vector value is derived for every emotion. Now training is performed as usual with all the stimulus and responses with emotions. The emotion with highest vector value is assigned to that particular sentence (Fig. 3). Fig. 3. Classification based on emotions Fig. 4. Meta-cognition layer with self reflection Building a ChatBot Using Emotional Cognitive Conversational 1841
  • 7. 4.6 Meta Cognition Layer This layer is more intelligent than the above layers. This layer is self-reflective. This can be implemented in which the chatbot has to choose responses with confidence value more than the threshold assigned. If the confidence is say 65% then, the response must be a specific response such as ‘I am sorry, I don’t know’ (Fig. 4). Fig. 5. Epistemic cognition layer with self knowledge gaining Fig. 6. Reflexive layer 1842 G. Gnanaguru
  • 8. 4.7 Epistemic Cognition Layer In Epistemic cognition level, the agent reflects on the limits of its knowledge and overcome such limitations. This is the highest level in ECCAA. It is not only ‘self- reflective’ but also learns by itself. This is implemented by adding responses directly to store in the database that is specified in the ‘Storage Adapter’. This added response is added to the trained dataset (Fig. 5). Fig. 7. Reactive layer Fig. 8. Deliberative layer Building a ChatBot Using Emotional Cognitive Conversational 1843
  • 9. 5 Results A questionnaire was prepared commonly for all the models in order to measure their performances. A graph was plotted with responses in the x axis and the confidence value in the y axis. The result was as follow for various models (Figs. 6, 7, 8, 9, 10 and 11). Fig. 9. Cognition layer Fig. 10. Meta cognition layer 1844 G. Gnanaguru
  • 10. 6 Conclusion Thus general conversational agent may produce good results, but in order to achieve results that are close to the human responses, the cognitive model ECCAA is sug- gested. The result suggests that it is a very efficient one. This model can be incorpo- rated to any conversational agent architecture. This model also works for training multilingual conversational agents with respective datasets. References 1. Langley P, Laird JE, Rogers S (2009) Cognitive architectures: research issues and challenges. Cogn Syst Res 10(2):141–160, ISSN 1389-0417 2. Venkatamuni MV (2008) A society of mind approach to cognition and metacognition in a cognitive architecture. Dissertation of Doctor of Philosophy in computer science and engineering, University of Hull, London 3. Singh P (2005) EMONE: an architecture for reflective commonsense thinking. Dissertation of Doctor of Philosophy in computer science and engineering, Massachusetts Institute of Technology, Cambridge, MA 4. Weitzenfeld A, Arbib M, Alexander A (2002) NSL—neural simulation language: a system for brain modeling. MIT Press, Cambridge, MA 5. Gnanaguru G, Venkatamuni, MV (2017) Building a conversational agent based on the principles of cognitive pragmatics using cognitive architecture. Int J Eng Res Technol 6(2), ISSN: 2278-0181 6. AbuShawar B, Atwell, E (2015) ALICE chatbot: trials and outputs, Computación y Sistemas 19(4):625–63 Fig. 11. Epistemic cognition layer Building a ChatBot Using Emotional Cognitive Conversational 1845
  • 11. 7. Davis N (2002) Computational architectures for intelligence and motivation. In: 17th IEEE international symposium on intelligent control, Vancouver, Canada 8. Hintze A (2016) Understanding the four types of AI, from reactive robots to self-aware beings. Michigan State University, 14 November 2016. https://theconversation.com/ understanding-the-four-types-of-ai-from-reactive-robots-to-self-aware-beings-67616, Acces- sed 15 Nov 2017 1846 G. Gnanaguru