SlideShare a Scribd company logo
Developing a Chatbot using Sequence Modelling
Problem Statement
Chatbots are proving themselves quite useful now a day’s. It has become a way of interacting to the
system. Chatbots like Siri(iOS), Google Assistant(Android), Google Allo (Cross Platform), Cortona
(Windows), Amazon Alexa and many more, are used daily by many people, in various parts of world.
These chatbots help us accomplish us many daily tasks like finding a location, booking a table at
restaurant, calling to someone, etc.
These chatbots are all open domain chatbots, I.e. they can be used for genal purpose daily tasks. But they
are unable to perform specific tasks like answering questions which are specific to industry, education, or
an organization. Such chatbots are called as closed domain chatbots. Many companies deploy such
chatbots on their website to answer specific questions related to them. Most of the replies are pre-fed and
if any new query comes to the chatbot, it either sends the query to the companies concerned authority to
reply the query or straight away ignores the question.
We will be focusing on how to build an open domain end-to-end conversation model for chatbots. The
method used for open domain chatbots can be applied for closed domain chatbots as well if there is
relevant data available for that domain. The only problem faced by closed domain chatbots is they lack
datasets for development, whereas lots of data is available for open domain chatbots. In the next section I
will be discuss some background of Chatbots.
Background
In 1966, Joseph Weizenbaum at MIT created the first chatbot that, arguably, came close to imitating a
human: ELIZA. Given an input sentence, ELIZA would identify keywords and pattern match those
keywords against a set of pre-programmed rules to generate appropriate responses. Since ELIZA, there
has been progress in the development of increasingly intelligent chatbots. In 1972, Kenneth Colby at
Stanford created PARRY, a bot the impersonated a paranoid schizophrenic. In 1995, Richard Wallace
created A.L.I.C.E, a significantly more complex bot that generated responses by pattern matching inputs
against <pattern> (input) <template> (output) pairs stored in documents in a knowledge base. These
documents were written in Artificial Intelligence Markup Language (AIML), an extension of XML,
which is still in use today. ALICE is a three-time winner of the Loebner prize, a competition held each
year which attempts to run the Turing Test, and awards the most intelligent chatbot.
Modern chatbots include: Amazon’s Echo and Alexa, Apple’s Siri, and Microsoft’s Cortana. The
architectures and retrieval processes of these bots take advantage of advances in machine learning to
provide advanced “information retrieval” processes, in which responses are generated based on analysis
of the results of web searches. Others have adopted “generative” models to respond; they use statistical
machine translation (SMT) techniques to “translate” input phrases into output responses. Seq2Seq, an
SMT algorithm that used recurrent neural networks (RNNs) to encode and decode inputs into responses is
a current best practice.
Methodology
Most of the methods follow Machine Translation models for Chatbot applications. The only reason
behind using Machine translation models is that chatbot works quite similar to Machine translations, only
instead of translating one language to another, it will produce a response of the input query. Following are
the steps that we can follow to build a chatbot:
Step 1: Collect the data and pre-process it. The preprocessing is done based on the requirement of model.
We also divide the data into training and testing data. We can also perform cross validation to gain better
results.
Step 2: We perform word embedding to convert the words into vector form.
Step 3: We design Bi-Directional Encoder layer with Long Short-Term Memory(LSTM) cells. These
encoders represent the input vector into its own representation.
Step 4: Then we can apply attention mechanism at decoding layer. Attention mechanism helps to
remember long-term dependencies for LSTM. In Attention mechanism larger weights are assigned to the
words which are more important to context.
Step 5: Loss is calculated by comparing the resultant response to the targeted response. And weights are
updated according to that in the next iteration.
Figure 1: Bi-directional Multilayer LSTM Encoder + LSTM Attention Decoder ["DeepProbe: Information
Directed Sequence Understanding and Chatbot Design via Recurrent Neural Networks" by Zi Yin, Keng-
hao Chang, Ruofei Zhang. In KDD’17, August 13–17, 2017, Canada]
Experimental Design
Dataset: Dataset is the main attribute of a chatbot, as its accuracy and ability is very much dependent on
the data it is trained. Here Since we are discussing about open domain chatbot, we can use Cornell Movie
Dialogue Corpus, Reddit conversation datasets or Maluuba Frames Dataset which realised by Microsoft
recently. There are many other open dialog datasets which can be used to train a chatbot model.
Evaluation Measures: The evaluation can be done based on F1 scores, this measurement can help to
understand whether the model will work properly in real world scenario. There are many other
evolutionary methods like BLUE Matrix, Dialogue Efficiency/Quality matrix (oldest method for
evaluating chatbots), last but not the least user satisfaction.
Software and Hardware Requirements: Python based Deep Learning libraries will be exploited for the
development and experimentation of the project. Tools such as Anaconda Python, and libraries such as
Gensim, Tensorflow, and Keras will be utilized for this process.

More Related Content

Similar to ms_3.pdf

IRJET - Deep Learning based Chatbot
IRJET - Deep Learning based ChatbotIRJET - Deep Learning based Chatbot
IRJET - Deep Learning based ChatbotIRJET Journal
 
Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Paul Houle
 
An Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexAn Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexIRJET Journal
 
Student information chatbot final report
Student information chatbot  final report Student information chatbot  final report
Student information chatbot final report jaysavani5
 
IRJET- Artificial Intelligence Based Chat-Bot
IRJET-  	  Artificial Intelligence Based Chat-BotIRJET-  	  Artificial Intelligence Based Chat-Bot
IRJET- Artificial Intelligence Based Chat-BotIRJET Journal
 
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOTA Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOTIRJET Journal
 
A Literature Survey Of Recent Advances In Chatbots
A Literature Survey Of Recent Advances In ChatbotsA Literature Survey Of Recent Advances In Chatbots
A Literature Survey Of Recent Advances In ChatbotsAngela Tyger
 
The implementation of Big Data and AI on Digital Marketing
The implementation of Big Data and AI on Digital MarketingThe implementation of Big Data and AI on Digital Marketing
The implementation of Big Data and AI on Digital MarketingMohamed Hanafy
 
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_StudentsNLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_StudentsHimanshu kandwal
 
How to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfHow to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfAnastasiaSteele10
 
How to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfHow to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfStephenAmell4
 
How to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfHow to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfJamieDornan2
 
Cómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intentoCómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intentoFacultad de Informática UCM
 
ChatGPT Deck.pptx
ChatGPT Deck.pptxChatGPT Deck.pptx
ChatGPT Deck.pptxomornahid1
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 

Similar to ms_3.pdf (19)

IRJET - Deep Learning based Chatbot
IRJET - Deep Learning based ChatbotIRJET - Deep Learning based Chatbot
IRJET - Deep Learning based Chatbot
 
Grok.pdf
Grok.pdfGrok.pdf
Grok.pdf
 
Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6
 
IRJET-V7I51160.pdf
IRJET-V7I51160.pdfIRJET-V7I51160.pdf
IRJET-V7I51160.pdf
 
Chatbot_Presentation
Chatbot_PresentationChatbot_Presentation
Chatbot_Presentation
 
An Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexAn Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon Lex
 
Student information chatbot final report
Student information chatbot  final report Student information chatbot  final report
Student information chatbot final report
 
IRJET- Artificial Intelligence Based Chat-Bot
IRJET-  	  Artificial Intelligence Based Chat-BotIRJET-  	  Artificial Intelligence Based Chat-Bot
IRJET- Artificial Intelligence Based Chat-Bot
 
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOTA Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT
 
A Literature Survey Of Recent Advances In Chatbots
A Literature Survey Of Recent Advances In ChatbotsA Literature Survey Of Recent Advances In Chatbots
A Literature Survey Of Recent Advances In Chatbots
 
AI Based Chatbot for FAQs
AI Based Chatbot for FAQs AI Based Chatbot for FAQs
AI Based Chatbot for FAQs
 
The implementation of Big Data and AI on Digital Marketing
The implementation of Big Data and AI on Digital MarketingThe implementation of Big Data and AI on Digital Marketing
The implementation of Big Data and AI on Digital Marketing
 
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_StudentsNLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
 
How to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfHow to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdf
 
How to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfHow to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdf
 
How to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdfHow to build an AI-powered chatbot.pdf
How to build an AI-powered chatbot.pdf
 
Cómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intentoCómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intento
 
ChatGPT Deck.pptx
ChatGPT Deck.pptxChatGPT Deck.pptx
ChatGPT Deck.pptx
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 

Recently uploaded

The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...
The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...
The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...Catherine Liao
 
Relationship between vascular system disfunction, neurofluid flow and Alzheim...
Relationship between vascular system disfunction, neurofluid flow and Alzheim...Relationship between vascular system disfunction, neurofluid flow and Alzheim...
Relationship between vascular system disfunction, neurofluid flow and Alzheim...Catherine Liao
 
Antiplatelets in IHD, Dose Duration, DAPT vs SAPT
Antiplatelets in IHD, Dose Duration, DAPT vs SAPTAntiplatelets in IHD, Dose Duration, DAPT vs SAPT
Antiplatelets in IHD, Dose Duration, DAPT vs SAPTAkashGanganePatil1
 
Scientificity and feasibility study of non-invasive central arterial pressure...
Scientificity and feasibility study of non-invasive central arterial pressure...Scientificity and feasibility study of non-invasive central arterial pressure...
Scientificity and feasibility study of non-invasive central arterial pressure...Catherine Liao
 
Is preeclampsia and spontaneous preterm delivery associate with vascular and ...
Is preeclampsia and spontaneous preterm delivery associate with vascular and ...Is preeclampsia and spontaneous preterm delivery associate with vascular and ...
Is preeclampsia and spontaneous preterm delivery associate with vascular and ...Catherine Liao
 
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptxANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptxBright Chipili
 
1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf
1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf
1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdfKs doctor
 
CURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptx
CURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptxCURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptx
CURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptxDr KHALID B.M
 
Effects of vaping e-cigarettes on arterial health
Effects of vaping e-cigarettes on arterial healthEffects of vaping e-cigarettes on arterial health
Effects of vaping e-cigarettes on arterial healthCatherine Liao
 
linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...KavyasriPuttamreddy
 
Mastering Wealth: A Path to Financial Freedom
Mastering Wealth: A Path to Financial FreedomMastering Wealth: A Path to Financial Freedom
Mastering Wealth: A Path to Financial FreedomFatimaMary4
 
Evaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsEvaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsShweta
 
Temporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptx
Temporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptxTemporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptx
Temporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptxDr. Rabia Inam Gandapore
 
Aptopadesha Pramana / Pariksha: The Verbal Testimony
Aptopadesha Pramana / Pariksha: The Verbal TestimonyAptopadesha Pramana / Pariksha: The Verbal Testimony
Aptopadesha Pramana / Pariksha: The Verbal TestimonyDr KHALID B.M
 
Compare home pulse pressure components collected directly from home
Compare home pulse pressure components collected directly from homeCompare home pulse pressure components collected directly from home
Compare home pulse pressure components collected directly from homeCatherine Liao
 
New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...
New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...
New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...i3 Health
 
180-hour Power Capsules For Men In Ghana
180-hour Power Capsules For Men In Ghana180-hour Power Capsules For Men In Ghana
180-hour Power Capsules For Men In Ghanahealthwatchghana
 
How to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for DoctorsHow to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for DoctorsLanceCatedral
 
TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...
TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...
TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...kevinkariuki227
 
TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...
TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...
TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...kevinkariuki227
 

Recently uploaded (20)

The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...
The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...
The POPPY STUDY (Preconception to post-partum cardiovascular function in prim...
 
Relationship between vascular system disfunction, neurofluid flow and Alzheim...
Relationship between vascular system disfunction, neurofluid flow and Alzheim...Relationship between vascular system disfunction, neurofluid flow and Alzheim...
Relationship between vascular system disfunction, neurofluid flow and Alzheim...
 
Antiplatelets in IHD, Dose Duration, DAPT vs SAPT
Antiplatelets in IHD, Dose Duration, DAPT vs SAPTAntiplatelets in IHD, Dose Duration, DAPT vs SAPT
Antiplatelets in IHD, Dose Duration, DAPT vs SAPT
 
Scientificity and feasibility study of non-invasive central arterial pressure...
Scientificity and feasibility study of non-invasive central arterial pressure...Scientificity and feasibility study of non-invasive central arterial pressure...
Scientificity and feasibility study of non-invasive central arterial pressure...
 
Is preeclampsia and spontaneous preterm delivery associate with vascular and ...
Is preeclampsia and spontaneous preterm delivery associate with vascular and ...Is preeclampsia and spontaneous preterm delivery associate with vascular and ...
Is preeclampsia and spontaneous preterm delivery associate with vascular and ...
 
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptxANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
 
1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf
1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf
1130525--家醫計畫2.0糖尿病照護研討會-社團法人高雄市醫師公會.pdf
 
CURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptx
CURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptxCURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptx
CURRENT HEALTH PROBLEMS AND ITS SOLUTION BY AYURVEDA.pptx
 
Effects of vaping e-cigarettes on arterial health
Effects of vaping e-cigarettes on arterial healthEffects of vaping e-cigarettes on arterial health
Effects of vaping e-cigarettes on arterial health
 
linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...linearity concept of significance, standard deviation, chi square test, stude...
linearity concept of significance, standard deviation, chi square test, stude...
 
Mastering Wealth: A Path to Financial Freedom
Mastering Wealth: A Path to Financial FreedomMastering Wealth: A Path to Financial Freedom
Mastering Wealth: A Path to Financial Freedom
 
Evaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsEvaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animals
 
Temporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptx
Temporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptxTemporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptx
Temporal, Infratemporal & Pterygopalatine BY Dr.RIG.pptx
 
Aptopadesha Pramana / Pariksha: The Verbal Testimony
Aptopadesha Pramana / Pariksha: The Verbal TestimonyAptopadesha Pramana / Pariksha: The Verbal Testimony
Aptopadesha Pramana / Pariksha: The Verbal Testimony
 
Compare home pulse pressure components collected directly from home
Compare home pulse pressure components collected directly from homeCompare home pulse pressure components collected directly from home
Compare home pulse pressure components collected directly from home
 
New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...
New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...
New Directions in Targeted Therapeutic Approaches for Older Adults With Mantl...
 
180-hour Power Capsules For Men In Ghana
180-hour Power Capsules For Men In Ghana180-hour Power Capsules For Men In Ghana
180-hour Power Capsules For Men In Ghana
 
How to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for DoctorsHow to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for Doctors
 
TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...
TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...
TEST BANK For Wong’s Essentials of Pediatric Nursing, 11th Edition by Marilyn...
 
TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...
TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...
TEST BANK For Williams' Essentials of Nutrition and Diet Therapy, 13th Editio...
 

ms_3.pdf

  • 1. Developing a Chatbot using Sequence Modelling Problem Statement Chatbots are proving themselves quite useful now a day’s. It has become a way of interacting to the system. Chatbots like Siri(iOS), Google Assistant(Android), Google Allo (Cross Platform), Cortona (Windows), Amazon Alexa and many more, are used daily by many people, in various parts of world. These chatbots help us accomplish us many daily tasks like finding a location, booking a table at restaurant, calling to someone, etc. These chatbots are all open domain chatbots, I.e. they can be used for genal purpose daily tasks. But they are unable to perform specific tasks like answering questions which are specific to industry, education, or an organization. Such chatbots are called as closed domain chatbots. Many companies deploy such chatbots on their website to answer specific questions related to them. Most of the replies are pre-fed and if any new query comes to the chatbot, it either sends the query to the companies concerned authority to reply the query or straight away ignores the question. We will be focusing on how to build an open domain end-to-end conversation model for chatbots. The method used for open domain chatbots can be applied for closed domain chatbots as well if there is relevant data available for that domain. The only problem faced by closed domain chatbots is they lack datasets for development, whereas lots of data is available for open domain chatbots. In the next section I will be discuss some background of Chatbots. Background In 1966, Joseph Weizenbaum at MIT created the first chatbot that, arguably, came close to imitating a human: ELIZA. Given an input sentence, ELIZA would identify keywords and pattern match those keywords against a set of pre-programmed rules to generate appropriate responses. Since ELIZA, there has been progress in the development of increasingly intelligent chatbots. In 1972, Kenneth Colby at Stanford created PARRY, a bot the impersonated a paranoid schizophrenic. In 1995, Richard Wallace created A.L.I.C.E, a significantly more complex bot that generated responses by pattern matching inputs against <pattern> (input) <template> (output) pairs stored in documents in a knowledge base. These documents were written in Artificial Intelligence Markup Language (AIML), an extension of XML, which is still in use today. ALICE is a three-time winner of the Loebner prize, a competition held each year which attempts to run the Turing Test, and awards the most intelligent chatbot. Modern chatbots include: Amazon’s Echo and Alexa, Apple’s Siri, and Microsoft’s Cortana. The architectures and retrieval processes of these bots take advantage of advances in machine learning to provide advanced “information retrieval” processes, in which responses are generated based on analysis of the results of web searches. Others have adopted “generative” models to respond; they use statistical machine translation (SMT) techniques to “translate” input phrases into output responses. Seq2Seq, an SMT algorithm that used recurrent neural networks (RNNs) to encode and decode inputs into responses is a current best practice.
  • 2. Methodology Most of the methods follow Machine Translation models for Chatbot applications. The only reason behind using Machine translation models is that chatbot works quite similar to Machine translations, only instead of translating one language to another, it will produce a response of the input query. Following are the steps that we can follow to build a chatbot: Step 1: Collect the data and pre-process it. The preprocessing is done based on the requirement of model. We also divide the data into training and testing data. We can also perform cross validation to gain better results. Step 2: We perform word embedding to convert the words into vector form. Step 3: We design Bi-Directional Encoder layer with Long Short-Term Memory(LSTM) cells. These encoders represent the input vector into its own representation. Step 4: Then we can apply attention mechanism at decoding layer. Attention mechanism helps to remember long-term dependencies for LSTM. In Attention mechanism larger weights are assigned to the words which are more important to context. Step 5: Loss is calculated by comparing the resultant response to the targeted response. And weights are updated according to that in the next iteration. Figure 1: Bi-directional Multilayer LSTM Encoder + LSTM Attention Decoder ["DeepProbe: Information Directed Sequence Understanding and Chatbot Design via Recurrent Neural Networks" by Zi Yin, Keng- hao Chang, Ruofei Zhang. In KDD’17, August 13–17, 2017, Canada]
  • 3. Experimental Design Dataset: Dataset is the main attribute of a chatbot, as its accuracy and ability is very much dependent on the data it is trained. Here Since we are discussing about open domain chatbot, we can use Cornell Movie Dialogue Corpus, Reddit conversation datasets or Maluuba Frames Dataset which realised by Microsoft recently. There are many other open dialog datasets which can be used to train a chatbot model. Evaluation Measures: The evaluation can be done based on F1 scores, this measurement can help to understand whether the model will work properly in real world scenario. There are many other evolutionary methods like BLUE Matrix, Dialogue Efficiency/Quality matrix (oldest method for evaluating chatbots), last but not the least user satisfaction. Software and Hardware Requirements: Python based Deep Learning libraries will be exploited for the development and experimentation of the project. Tools such as Anaconda Python, and libraries such as Gensim, Tensorflow, and Keras will be utilized for this process.