SlideShare a Scribd company logo
1 of 27
DISCOVER . LEARN . EMPOWER
ChatBots
INSTITUTE - UIE
DEPARTMENT- ACADEMIC
UNIT-1
Bachelor of Engineering (Computer Science &
Engineering)
Disruptive Technologies– I
Prepared By: Dr. Amandeep Sharma
ChatBots
CO
Number
Title Level
CO1 Grasp the characteristics of disruptive technologies and
understand building blocks of artificial intelligence, data science
and cloud computing.
Remember
CO2 Develop simple intelligent system using available tools and
techniques of AI to analyze and interpret domain knowledge.
Understand
CO3 Build effective data visualizations, and learn to work with data
through the entire datascience process.
Apply
CO4 Deploy, build, and monitor cloud-based applications. Analyze and
evaluate
CO5 Work in a team that can propose, design, implement and report on
their selected domain.
Create
Course Outcome
Introduction
• Chat Bot: A computer program that can talk to humans in natural
language!
• Uses Artificial Intelligence Markup Language (AIML) to represent
knowledge.
• Can replace a human for monotonous jobs of answering queries, e.g.
E-help desk.
How It All Started
• Eliza – the first chat bot made by Joseph Weizenbaum.
• Eliza Effect
• tendency of humans to attach associations to terms from prior experience.
• Working of Eliza is based on
• Knowledge Representation
• Pattern Recognition
• Substitution of key words into known phrases.
How does it respond
• Looks for certain patterns of words in the user's input.
• Replies with pre-determined output, if the pattern is matched.
• Needs to have an idea of what the user will chat
• Has suitable responses defined in the AIML file
Architecture of a Chat Bot
Responder
AIML Interpreter
AIML Objects
A Chat Bot
Knowledge Representation
• Types of AIML objects
• Topics
• Categories
• E.g. :
<aiml>
<topic name=“the topic” >
<category>
<pattern>PATTERN</pattern>
<that>THAT</that>
<template>TEMPLATE</template>
</category>
</topic>
</aiml>
Example AIML Object
• AIML Object
<category>
<pattern>HELLO</pattern>
<template>Hi there!</template>
</category>
• Chat Sequence
User: Hello!
Chat Bot: Hi There!
<category>
<pattern>YES</pattern>
<that>DO YOU LIKE MOVIES</that> <template>What
is your favorite movie?</template>
</category>
Chat Bot: Do you like Movies?
User: Yes
Chat Bot: What is your favorite movie
Topics and Categories
• Topic: an optional top-level element that contains category elements
• Category: consists of an input question (pattern) and an output answer
(template)
• Types of Categories
• Atomic Category
• Default Category
• Recursive Category
Atomic Category
<category>
<pattern>10 DOLLARS</pattern>
<template> wow, what a cheap </template>
</category>
User: This watch is for 10 dollars
Chat Bot: Wow, what a cheap watch!
• Contains patterns that does not have wildcards
“*” or “_”.
• Example:
• Conversation:
Default Category
• Contains patterns that have wildcards “*” or “_”.
• Example:
• Conversation:
<category>
<pattern>10 *</pattern> <template> It is
ten.</template>
</category>
User: 10 dollars.
Chat Bot: It is ten.
Recursive category
• Template calls the pattern matcher recursively
• Uses <srai> tag, that stands for symbolic recursion artificial
intelligence
• For example,
In English there are different ways to ask about X:
Describe x?
Tell me about X?
Do you know what X is?
The knowledge is stored in the simplest way.
Whatever the question is, it will be reduced to category like <What is>.
Input normalization
• Substitution normalizations
Abbreviations such as "Mr." may be spelled out as "Mister" to avoid sentence-splitting at the
period in the abbreviated form.
• Sentence-splitting normalizations
Rule: break sentences at periods. It relies upon substitutions performed
in the substitution phase.
• Pattern-fitting normalizations
Remove all characters that are not normal characters; like converting lowercase letters to
uppercase .
<category>
<pattern>_ WHAT IS 2 AND 2</pattern>
<template>
<sr/><srai>WHAT IS 2 AND 2</srai>
</template>
</category>
<category>
<pattern>WHAT IS 2 *</pattern>
<template><random>
<li>Two.</li>
<li>Four.</li>
<li>Six.</li>
<li>12.</li>
</random></template></category>
<category>
<pattern>HALO</pattern>
<template>
<srai>HELLO</srai>
</template>
</category>
<category>
<pattern>HELLO</pattern>
<template> <random>
<li>Well hello there!</li>
<li>Hi there!</li>
<li>Hi there. I was just wanting to
talk</li>
<li>Hello there !</li>
</random></template></category>
Example
Halo, What is 2 and 2
_ What is 2 and 2
</sr>
<srai> WHAT IS 2 AND 2 </srai>
Well hello there!
Hi there!
Hi there. I was just
wanting to talk.
Hello there !
WHAT IS 2 AND *
WHAT IS 2 *
Two
Four
Six
12
Hi There! Six
Question :
Answer :
HALO
HELLO
Graph-master – an example interpreter
• AIML interpreter: tries to match word by word to obtain the largest
pattern matching which is the best one.
• Graph-master: an interpreter that models this behavior
• Contains a set of nodes called Node-mappers .
• Node-Mappers : map branches from each node where branches
represent the first words of all patterns.
• Each leaf node contains a template.
Flowchart for Pattern Matching
Search sub-graph
rooted at child
node linked by ‘_’
Node-mapper
Contains ‘X’?
Match?
Search sub-graph
rooted at child
node linked by ‘X’
using input ‘tail’
Search sub-graph
rooted at child
node linked by ‘*’
Try all remaining
suffixes of input
following ‘X’
Node-mapper
Contains ‘_’?
Node-mapper
Contains ‘*’?
Try all remaining
suffixes of input
following ‘X’
Match?
Match?
yes
yes
yes
yes
yes
yes
no
no no
no
Some Observations
• Priority order at every node:
• ‘_’ wildcard, followed by
• an atomic word, followed by
• ‘*’ wildcard .
• Patterns need not be ordered alphabetically
• The matching is word-by-word, not category-by-category
• Highly restricted form of depth-first search
Turing Test
• Alan Turing proposed the Turing Test as a replacement for the question
“Can machines think?”
• Turing's aim is to provide a method to assess whether or not a machine
can think.
• The test
• A man (A), a woman (B) and an interrogator (C) chat.
• The objective of the interrogator is to determine which of the other two is the
woman
• If a machine (bot) chats instead of A or B and fools the interrogator, it has
passed the Turing test.
Can It Answer All My Questions?
• A Chat Bot has a limited number of patterns and responses.
• The AIML structure supports regular expressions
• In AIML, you can define recursive categories.
• The bot may sometimes give funny replies, but that depends on the
AIML spec, i.e. Its brain!
How to build a bot of your own
• Components – An AIML Object Spec, AIML interpreter, and a
responder!
• A Chat Bot represents and models a character.
• The brain is the AIML file, that defines patterns and corresponding
replies
• A bot can be trained to be an Expert System about a special theme –
large data!
• Training data – Yahoo Chat!
What is a Chat Bot useful for?
• Commercial chatter bots to help customers
• At web-shops and e-commerce sites.
• Bots to receive complaints from users, online
• An interactive (talking) encyclopedia.
• Chatter bots administrating IRC-channels and Hotline server.
• The Psychiatrist – the famous pronoun reversal trick
• Starship Titanic, a game created by the famous writer Douglas
Adams along with Terry Jones
Questions We Answered
• What is it? Who wants it? Why?
• Since when is it around?
• How does it work?
• How do you test it?
• Can it answer all my questions?
• Can I make one of my own?
• Where can I put it to work?
A Chat Bot…
Clarifications
• How powerful is JavaCC-built parser?
• As long as one can use JavaCC's look-ahead specification to guide the parsing where the LL(1) rules
are not sufficient, JavaCC can handle any grammar that is not left-recursive.
• Powerful than a yacc generated parser?
• AIML is connected to a system that allows for learning new patterns and putting them into a context
• Context sensitive
• Learning ?
• Dialogue Corpora can be used to train a Chatbot! (See References)
• Intelligent?
• Even Turing tests have different levels and yet cannot finally decide whether the system is intelligent
or not. Nowadays a system is considered to be intelligent if it is able to mimic intelligent behaviour
(e.g. within a specified domain).
References
• The Anatomy of A.L.I.C.E.: Dr. Richard S. Wallace, http://www.alicebot.org/anatomy.html
• Artificial Intelligence Markup Language (AIML), A.L.I.C.E. AI Foundation,
http://alicebot.org/TR/2001/WD-aiml/
• AIML Interpreter Overview 2004, http://www.aimlbots.com/en/aiml-interpreters.html
• Computing machinery and intelligence, Alan Turing [1950],
http://www.abelard.org/turpap/turpap.htm
• Using Dialogue Corpora to Train a Chatbot (Bayan Abu Shawar, Eric Atwell)
http://www.comp.leeds.ac.uk/andyr/research/papers/techreport2003_02.pdf
Project Proposal
• Extension to Chat Bot, that will reply emails
• Will maintain a chat session in terms of email-session-id
• Can be useful for auto replying to emails that have a common reply,
related to the question in the email
THANK YOU
For queries
Email: amandeep.ece@cumail.in

More Related Content

Similar to Chatbots.pptx

Design pattern
Design patternDesign pattern
Design patternOmar Isaid
 
Cs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ reportCs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ reportKhushboo Wadhwani
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptRushikeshChikane1
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptRushikeshChikane2
 
Models, Sketches and Everything In Between
Models, Sketches and Everything In BetweenModels, Sketches and Everything In Between
Models, Sketches and Everything In BetweenEoin Woods
 
Robotics, Search and AI with Solr, MyRobotLab, and Deeplearning4j
Robotics, Search and AI with Solr, MyRobotLab, and Deeplearning4jRobotics, Search and AI with Solr, MyRobotLab, and Deeplearning4j
Robotics, Search and AI with Solr, MyRobotLab, and Deeplearning4jKevin Watters
 
The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...
The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...
The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...Lucidworks
 
Matlab for a computational PhD
Matlab for a computational PhDMatlab for a computational PhD
Matlab for a computational PhDAlbanLevy
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012Alan Christensen
 
Researching with ChatGPT.pptx
Researching  with ChatGPT.pptxResearching  with ChatGPT.pptx
Researching with ChatGPT.pptxSB Kishor
 
KorraAI - a probabilistic virtual agent framework
KorraAI - a probabilistic virtual agent frameworkKorraAI - a probabilistic virtual agent framework
KorraAI - a probabilistic virtual agent frameworkAntonAndreev13
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21Jordi Cabot
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Jordi Cabot
 
Pair Programming Styles
Pair Programming StylesPair Programming Styles
Pair Programming StylesAttila Bertók
 
Solid Principles Of Design (Design Series 01)
Solid Principles Of Design (Design Series 01)Solid Principles Of Design (Design Series 01)
Solid Principles Of Design (Design Series 01)Heartin Jacob
 
CSCI 180 Project Grading  Your project is graded based .docx
CSCI 180 Project Grading   Your project is graded based .docxCSCI 180 Project Grading   Your project is graded based .docx
CSCI 180 Project Grading  Your project is graded based .docxfaithxdunce63732
 

Similar to Chatbots.pptx (20)

Design pattern
Design patternDesign pattern
Design pattern
 
Cs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ reportCs690 object oriented_software_engineering_team01_ report
Cs690 object oriented_software_engineering_team01_ report
 
The Role of the Architect
The Role of the ArchitectThe Role of the Architect
The Role of the Architect
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
The Modlet Pattern
The Modlet PatternThe Modlet Pattern
The Modlet Pattern
 
Models, Sketches and Everything In Between
Models, Sketches and Everything In BetweenModels, Sketches and Everything In Between
Models, Sketches and Everything In Between
 
Robotics, Search and AI with Solr, MyRobotLab, and Deeplearning4j
Robotics, Search and AI with Solr, MyRobotLab, and Deeplearning4jRobotics, Search and AI with Solr, MyRobotLab, and Deeplearning4j
Robotics, Search and AI with Solr, MyRobotLab, and Deeplearning4j
 
The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...
The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...
The Intersection of Robotics, Search and AI with Solr, MyRobotLab, and Deep L...
 
Matlab for a computational PhD
Matlab for a computational PhDMatlab for a computational PhD
Matlab for a computational PhD
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
 
Researching with ChatGPT.pptx
Researching  with ChatGPT.pptxResearching  with ChatGPT.pptx
Researching with ChatGPT.pptx
 
KorraAI - a probabilistic virtual agent framework
KorraAI - a probabilistic virtual agent frameworkKorraAI - a probabilistic virtual agent framework
KorraAI - a probabilistic virtual agent framework
 
Software Design
Software DesignSoftware Design
Software Design
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
 
Pair Programming Styles
Pair Programming StylesPair Programming Styles
Pair Programming Styles
 
Solid Principles Of Design (Design Series 01)
Solid Principles Of Design (Design Series 01)Solid Principles Of Design (Design Series 01)
Solid Principles Of Design (Design Series 01)
 
CSCI 180 Project Grading  Your project is graded based .docx
CSCI 180 Project Grading   Your project is graded based .docxCSCI 180 Project Grading   Your project is graded based .docx
CSCI 180 Project Grading  Your project is graded based .docx
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPT
 

Recently uploaded

Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxNiranjanYadav41
 
Configuration of IoT devices - Systems managament
Configuration of IoT devices - Systems managamentConfiguration of IoT devices - Systems managament
Configuration of IoT devices - Systems managamentBharaniDharan195623
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 

Recently uploaded (20)

Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
BSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptxBSNL Internship Training presentation.pptx
BSNL Internship Training presentation.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Configuration of IoT devices - Systems managament
Configuration of IoT devices - Systems managamentConfiguration of IoT devices - Systems managament
Configuration of IoT devices - Systems managament
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 

Chatbots.pptx

  • 1. DISCOVER . LEARN . EMPOWER ChatBots INSTITUTE - UIE DEPARTMENT- ACADEMIC UNIT-1 Bachelor of Engineering (Computer Science & Engineering) Disruptive Technologies– I Prepared By: Dr. Amandeep Sharma
  • 2. ChatBots CO Number Title Level CO1 Grasp the characteristics of disruptive technologies and understand building blocks of artificial intelligence, data science and cloud computing. Remember CO2 Develop simple intelligent system using available tools and techniques of AI to analyze and interpret domain knowledge. Understand CO3 Build effective data visualizations, and learn to work with data through the entire datascience process. Apply CO4 Deploy, build, and monitor cloud-based applications. Analyze and evaluate CO5 Work in a team that can propose, design, implement and report on their selected domain. Create Course Outcome
  • 3. Introduction • Chat Bot: A computer program that can talk to humans in natural language! • Uses Artificial Intelligence Markup Language (AIML) to represent knowledge. • Can replace a human for monotonous jobs of answering queries, e.g. E-help desk.
  • 4. How It All Started • Eliza – the first chat bot made by Joseph Weizenbaum. • Eliza Effect • tendency of humans to attach associations to terms from prior experience. • Working of Eliza is based on • Knowledge Representation • Pattern Recognition • Substitution of key words into known phrases.
  • 5. How does it respond • Looks for certain patterns of words in the user's input. • Replies with pre-determined output, if the pattern is matched. • Needs to have an idea of what the user will chat • Has suitable responses defined in the AIML file
  • 6. Architecture of a Chat Bot Responder AIML Interpreter AIML Objects A Chat Bot
  • 7. Knowledge Representation • Types of AIML objects • Topics • Categories • E.g. : <aiml> <topic name=“the topic” > <category> <pattern>PATTERN</pattern> <that>THAT</that> <template>TEMPLATE</template> </category> </topic> </aiml>
  • 8. Example AIML Object • AIML Object <category> <pattern>HELLO</pattern> <template>Hi there!</template> </category> • Chat Sequence User: Hello! Chat Bot: Hi There! <category> <pattern>YES</pattern> <that>DO YOU LIKE MOVIES</that> <template>What is your favorite movie?</template> </category> Chat Bot: Do you like Movies? User: Yes Chat Bot: What is your favorite movie
  • 9. Topics and Categories • Topic: an optional top-level element that contains category elements • Category: consists of an input question (pattern) and an output answer (template) • Types of Categories • Atomic Category • Default Category • Recursive Category
  • 10. Atomic Category <category> <pattern>10 DOLLARS</pattern> <template> wow, what a cheap </template> </category> User: This watch is for 10 dollars Chat Bot: Wow, what a cheap watch! • Contains patterns that does not have wildcards “*” or “_”. • Example: • Conversation:
  • 11. Default Category • Contains patterns that have wildcards “*” or “_”. • Example: • Conversation: <category> <pattern>10 *</pattern> <template> It is ten.</template> </category> User: 10 dollars. Chat Bot: It is ten.
  • 12. Recursive category • Template calls the pattern matcher recursively • Uses <srai> tag, that stands for symbolic recursion artificial intelligence • For example, In English there are different ways to ask about X: Describe x? Tell me about X? Do you know what X is? The knowledge is stored in the simplest way. Whatever the question is, it will be reduced to category like <What is>.
  • 13. Input normalization • Substitution normalizations Abbreviations such as "Mr." may be spelled out as "Mister" to avoid sentence-splitting at the period in the abbreviated form. • Sentence-splitting normalizations Rule: break sentences at periods. It relies upon substitutions performed in the substitution phase. • Pattern-fitting normalizations Remove all characters that are not normal characters; like converting lowercase letters to uppercase .
  • 14. <category> <pattern>_ WHAT IS 2 AND 2</pattern> <template> <sr/><srai>WHAT IS 2 AND 2</srai> </template> </category> <category> <pattern>WHAT IS 2 *</pattern> <template><random> <li>Two.</li> <li>Four.</li> <li>Six.</li> <li>12.</li> </random></template></category> <category> <pattern>HALO</pattern> <template> <srai>HELLO</srai> </template> </category> <category> <pattern>HELLO</pattern> <template> <random> <li>Well hello there!</li> <li>Hi there!</li> <li>Hi there. I was just wanting to talk</li> <li>Hello there !</li> </random></template></category> Example
  • 15. Halo, What is 2 and 2 _ What is 2 and 2 </sr> <srai> WHAT IS 2 AND 2 </srai> Well hello there! Hi there! Hi there. I was just wanting to talk. Hello there ! WHAT IS 2 AND * WHAT IS 2 * Two Four Six 12 Hi There! Six Question : Answer : HALO HELLO
  • 16. Graph-master – an example interpreter • AIML interpreter: tries to match word by word to obtain the largest pattern matching which is the best one. • Graph-master: an interpreter that models this behavior • Contains a set of nodes called Node-mappers . • Node-Mappers : map branches from each node where branches represent the first words of all patterns. • Each leaf node contains a template.
  • 17. Flowchart for Pattern Matching Search sub-graph rooted at child node linked by ‘_’ Node-mapper Contains ‘X’? Match? Search sub-graph rooted at child node linked by ‘X’ using input ‘tail’ Search sub-graph rooted at child node linked by ‘*’ Try all remaining suffixes of input following ‘X’ Node-mapper Contains ‘_’? Node-mapper Contains ‘*’? Try all remaining suffixes of input following ‘X’ Match? Match? yes yes yes yes yes yes no no no no
  • 18. Some Observations • Priority order at every node: • ‘_’ wildcard, followed by • an atomic word, followed by • ‘*’ wildcard . • Patterns need not be ordered alphabetically • The matching is word-by-word, not category-by-category • Highly restricted form of depth-first search
  • 19. Turing Test • Alan Turing proposed the Turing Test as a replacement for the question “Can machines think?” • Turing's aim is to provide a method to assess whether or not a machine can think. • The test • A man (A), a woman (B) and an interrogator (C) chat. • The objective of the interrogator is to determine which of the other two is the woman • If a machine (bot) chats instead of A or B and fools the interrogator, it has passed the Turing test.
  • 20. Can It Answer All My Questions? • A Chat Bot has a limited number of patterns and responses. • The AIML structure supports regular expressions • In AIML, you can define recursive categories. • The bot may sometimes give funny replies, but that depends on the AIML spec, i.e. Its brain!
  • 21. How to build a bot of your own • Components – An AIML Object Spec, AIML interpreter, and a responder! • A Chat Bot represents and models a character. • The brain is the AIML file, that defines patterns and corresponding replies • A bot can be trained to be an Expert System about a special theme – large data! • Training data – Yahoo Chat!
  • 22. What is a Chat Bot useful for? • Commercial chatter bots to help customers • At web-shops and e-commerce sites. • Bots to receive complaints from users, online • An interactive (talking) encyclopedia. • Chatter bots administrating IRC-channels and Hotline server. • The Psychiatrist – the famous pronoun reversal trick • Starship Titanic, a game created by the famous writer Douglas Adams along with Terry Jones
  • 23. Questions We Answered • What is it? Who wants it? Why? • Since when is it around? • How does it work? • How do you test it? • Can it answer all my questions? • Can I make one of my own? • Where can I put it to work? A Chat Bot…
  • 24. Clarifications • How powerful is JavaCC-built parser? • As long as one can use JavaCC's look-ahead specification to guide the parsing where the LL(1) rules are not sufficient, JavaCC can handle any grammar that is not left-recursive. • Powerful than a yacc generated parser? • AIML is connected to a system that allows for learning new patterns and putting them into a context • Context sensitive • Learning ? • Dialogue Corpora can be used to train a Chatbot! (See References) • Intelligent? • Even Turing tests have different levels and yet cannot finally decide whether the system is intelligent or not. Nowadays a system is considered to be intelligent if it is able to mimic intelligent behaviour (e.g. within a specified domain).
  • 25. References • The Anatomy of A.L.I.C.E.: Dr. Richard S. Wallace, http://www.alicebot.org/anatomy.html • Artificial Intelligence Markup Language (AIML), A.L.I.C.E. AI Foundation, http://alicebot.org/TR/2001/WD-aiml/ • AIML Interpreter Overview 2004, http://www.aimlbots.com/en/aiml-interpreters.html • Computing machinery and intelligence, Alan Turing [1950], http://www.abelard.org/turpap/turpap.htm • Using Dialogue Corpora to Train a Chatbot (Bayan Abu Shawar, Eric Atwell) http://www.comp.leeds.ac.uk/andyr/research/papers/techreport2003_02.pdf
  • 26. Project Proposal • Extension to Chat Bot, that will reply emails • Will maintain a chat session in terms of email-session-id • Can be useful for auto replying to emails that have a common reply, related to the question in the email
  • 27. THANK YOU For queries Email: amandeep.ece@cumail.in