ppt - CSE, IIT Bombay

Download Report

Transcript ppt - CSE, IIT Bombay

CHATBOTS
GROUP-8
RaviKant Narayan
Gaurav Jain
Introduction

Interaction is in natural language

No use of formal languages
Revolutionary step in the field of
human-machine interaction


Artificial Conversational agents
Example chat-ELIZA
Men are all alike.
IN WHAT WAY?
They're always bugging us about something or other.
CAN YOU THINK OF A SPECIFIC EXAMPLE?
Well, my boyfriend made me come here.
YOUR BOYFRIEND MADE YOU COME HERE
He says I'm depressed much of the time.
I AM SORRY TO HEAR YOU ARE DEPRESSED
Motivation
Use at places like railway enquiry

psychotherapy

Play MUDs,tell stories

How it all started

The Turing test -The Imitation game

PARRY-Artificial paranoia

The Turing test as a simulation validator

The Loebner Prize
Elizabeth

Script Command Notations
W: Welcome message
Q: quitting message
N: No match
V: Void input
I: Input transformation
/ : Comment
K: Key word pattern
R: key word response
M: Memorise phrase
N: No match
O: Output transformation
&: Action to be perform
ELIZABETH
Knowledge stored as script in text file

Script file – 4 parts

Part 1 – Script command line

Holds welcome, void and no keyword messages

Part 2 – Input transformation rules

Part 3 – Output transformation rules

Part 4 – Keyword patterns

Example

Input Transformation rule
I MUM => mother

Output Transformation rule
O my => YOUR

Keyword Transformation rule
K I LIKE [string]ING
R HAVE YOU [string]ED AT ALL RECENTLY?
Dynamic Processing

Modification of script while conversing

Adding, Memorization, deleting
New scripts could be added while ongoing
conversation

Responses are kept at a hold for future
matching


Script commands can be deleted
Pattern matching algorithm
Firstly some preparations done for pattern
matching algorithm(like removing illegal
characters)


Then five stages
Stage 1 - All input transformation rules applied
one by one


Stage 2 – Keyword pattern matching
Pattern matching algorithm contd

Stage 3 – Output transformation rules applied
Stage 4 – In case no match found in stage 2, it
gives void or no keyword message

Stage 5 – Dynamic processes performed if
required

ALICE

Artificial Linguistic Internet Computer Entity
Has knowledge about patterns in English
conversation


The storage is done in AIML files

A derivative of XML
AIML

Artificial Intelligence Markup Language

AIML objects(data objects)

Fundamentals units are Topics and Categories

Topic – Like a node

Has a name and a list of related categories
continued
Category – A rule for giving outputs based on
given input patterns

Contains a pattern(user input) and a
template(represents possible output)

Categories types
Atomic Categories :- No wildcard symbols
(_ and *) in the patterns

Default categories :- Patterns have wild card
symbols

Recursive categories :- Templates contain srai
and sr tags


Srai :- Simply recursive artificial intelligence
Continued

Sr :- Symbolic Reduction
Reducing complex grammatical forms to
simpler ones


Dealing with synonyms

Divide and Conquer.
Pattern Matching in ALICE
Requires Preparation

Normalization Process

Three step procedure

Normalization Process
Three steps

Substitution Normalization

Sentence Splitting Normalization

Pattern filling Normalization

Example
Input - “ I do not know. Do you, or will you,
have a robots.txt file”

Step1 - “I do not know. Do you, or will you,
have a robots dot txt file”

Information susceptible to loss in next steps
is retained

Continued
Step2 - “I do not know.” “Do you, or will you,
have a robots dot txt file”


The input split into sentences
Step3 - “I DO NOT KNOW” “DO YOU OR WILL
YOU HAVE A ROBOTS DOT TXT FILE”


Punctuation removal

Conversion to upper case
Pattern matching algorithm
The algorithm is similar to that used in
Graphmaster set of files and directories


First the preperation work is done
Then a depth first search combined with
backtracking is used to get a matching
pattern

Example

user inputs”halo what is 2 and 2”
Converted to :Sentence 1 – Halo
Sentence 2 – WHAT IS 2 AND 2

Atomic pattern match found for HALO as
HELLO


Dealing with synonyms
continued

Template available for WHAT IS 2 *

Backtracking applied
Pattern match found and response selected
randomly from list of responses


Answer is “Hi there! Four.”
continued
(1) <category>
<pattern>_ WHAT IS 2 AND 2</pattern>
<template> <sr/> <srai>WHAT IS 2 AND 2</srai> </template>
</category>
(2) <category>
<pattern>WHAT IS 2 *</pattern>
<template> <random> <li>Two.</li> <li>Four.</li> <li>Six.</li>
<li>12.</li> </random>
</template>
</category>
continued
(3) <category>
<pattern>HALO</pattern>
<template> <srai>HELLO</srai> </template>
</category>
(4) <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>
How alice responded to complex
sentences
Human:I will now give you a very comlex sentence
and you have to figure out what does it mean
ALICE: Would you recommend this action to a
friend?
Human: what would you do if you were left
stranded in very lonely island away from all human
beings with nobody to speak to ,with only a
handful of clothes and food
ALICE: I will let you know when I become a left
stranded in very lonely island away from all human
beings with nobody to speak to with only a handful
of clothes and food.
Tricks
Chatbots use a lot of them for a
more human effect

Some use a trick of deduction

To let the user speak first and then
reply from the deduction made from
that

Tricks Contd
Some use the approach of slowing
down

The chatbot takes a specific
amount of time to reply as a human
would

Making seemingly random
mistakes intentionally

Tricks Contd

Can say I dont know

launch a new story
Why do you ask that?, which is really a way of
changing the subject.

Applications
A large number of them possible
Use at places like railway enquiry

Saves lot of valuable human
resources

As a psychiatrist(hard to find a
good listener these days)

Continued

ITS :- Intelligent Tutoring System

Chatbots in foreign language learning
The system uses a communication
response mechanism

The learning is motivated by the personality
of the learner


Social engineering
Conclusion
Chatbots have wide range of applications
like artificial tutoring, social networking etc.


Come handy in case of call centers
Most aspects of chatbots are pretty well
developed today

Need to do a lookout against mean users
who tend to take undue advantage of the
facility

References
1. Ayse Pinar Saygin1,Ilyas Cicekli & Varol Akman,Turing Test:50
years later,Department of Cognitive Science,University of
California,San Diego;Department of Computer Engineering,Bilkent
University,Bilkent, 2000
2. Bayan Abu Shawar,Eric Atwell ,Using Dialogue Corpora to train
a chatbot, School of computing University of leeds England, 2002
3. H. Chad Lane,Intelligent tutoring systems: Prospect for Guided
Practice and Efficient Learning Institute for creative technologies,
University of southern California, 2006
4.http://en.wikipedia.org/wiki/Chatbots