SlideShare a Scribd company logo
1 of 54
Agnese Augello
ICAR-CNR
Dialogare con Agenti Artificiali
Seminari di Logica e Filosofia della Scienza
Outline
Can machines dialogue?
• Test di Turing
• Expectation of strong Artificial Intelligence
• Components and issues of a dialogue system
Chatbots
• Overview of popular chatbots
• The illusion of Weizenbaum
• Technology of a chabot
An “intuitive/rational” chatbot as interface to I.R retrieval systems
• Rational Area
• Intuitive Area
• An application
Can machines dialogue?
Conversational Agents
 A conversational agent is a computer program
that interacts with users turn by turn using natural
language;
 Aim: to improve the usability of human-computer
interfaces
 Issues: The effective use of language is
intertwined with our general cognitive abilities.
The Turing Test
Can machines think?
Alan Turing
“Computing
Machinery and
Intelligence” , 1950
Interaction with HAL 9000
Expectation of an artificial
intelligence system: HAL 9000
 HAL (Heuristically programmed ALgorithmic
computer) is a sentient computer that controls the
systems of the Discovery spacecraft and interacts
with the ship's astronaut crew.
 HAL is capable of advanced language-processing
behavior as speaking and understanding English,
and at a crucial moment in the plot, even reading
lips!
Components of a Spoken Conversationa
Agent
Automatic
Speech
Recognition
component
(ASR)
Natural
Language
Understanding
component
(NLU)
)Text-To-
Speech
synthesis
component
(TTS)
Natural
Language
Generation
component
(NLG)
)
Dialogue
Manager
HAL, open the pod bay doors
I'm sorry, Dave. I'm afraid I can't do that.
I’m I do, sorry that afraid Dave I’m can’t.
what is a `pod bay door’?
Natural Language
Understanding
where you get that idea, Hal?
REQUEST:
HAL, open the pod bay door.
STATEMENT:
HAL, the pod bay door is open.
INFORMATIONQUESTION:
HAL,is the pod bay door open?
I’m sorry , I’m afraid
Natural Language Ambiguity
Consider the spoken sentence:
I made her duck
 I cooked waterfowl for her.
 I cooked waterfowl belonging to her.
 I created the (plaster?) duck she owns.
 I caused her to quickly lower her head or body.
 I waved my magic wand and turned her into
undifferentiated waterfowl.
Chatbots
Chatbot
 A simple conversational agent based on a pattern
matching dialogue mechanism.
 Main applications: e-learning platforms, research
engines, web-site navigation.
 From ELIZA (Joseph Weizenbaum1966) to SIRI
(APPLE 2010)
13
From Eliza (Joseph Weizenbaum1966) …
 ELIZA was an early natural language processing
system capable of carrying on a limited form of
conversation with a user.
 Consider the following session with a version of
ELIZA that imitated the responses of a
psychotherapist.
User1: You are like my father in some ways.
ELIZA1: WHAT RESEMBLANCE DO YOU SEE
User2: You are not very aggressive but I think you don’t want me to notice that.
ELIZA2: WHAT MAKES YOU THINK I AM NOT AGGRESSIVE
User3: You don’t argue with me.
ELIZA3: WHY DO YOU THINK I DON’T ARGUE WITH YOU
User4: You are afraid of me.
ELIZA4: DOES IT PLEASE YOU TO BELIEVE I AM AFRAID OF YOU
… To SIRI (Apple, 2010)
“The Weizenbaum illusion”
 “I was startled to see how quickly and how very
deeply people conversing with DOCTOR became
emotionally involved with the computer and how
unequivocally they anthropomorphized it.”
J. Weizenbaum, Computer Power and Human
Reason, 1976
 Human cognition is geared toward finding
patterns… and we hear coherent language use
where there are only snippets of canned text.
Alice Chatbot
An Example of AIML Category
<category>
<pattern> WHO ARE YOU</pattern>
<template> I’m a chat robot. My
knowledge base is composed of
question-answer modules, (categories)
structured with the Artificial Intelligence
Mark-up Language (AIML)
</template>
</category>
?
I’m a chat robot. My knowledge base is
composed of question-answer modules,
(categories) structured with the Artificial
Intelligence Mark-up Language (AIML)
Rappresentazione compatta: diversi pattern condividono rami dell’albero
Graphmaster
Default Categories
<category>
<pattern> * LOVE * </pattern>
<template>
<random>
<li>Aren't we all looking for love?</li>
<li>And what kind of love are we
looking for
today?</li>
</random>
</template>
Recursive Categories:
synonimy, symbolic reduction, divide and
conquer
<category>
<pattern>BYE BYE </pattern>
<template>
<srai> GOODBYE </srai>
</template>
</category>
<category>
<pattern> DO YOU KNOW WHAT IS *
</pattern>
<template> <srai>WHAT IS <star/> </srai>
</template>
</category>
<category>
<pattern>GOODBYE </pattern>
<template> Goodbye,
user!</template>
</category>
…
<That> </That>
User: Tell me something
Chat-bot: Do you like movies?
User: Yes
Chat-bot: What is your favourite movie?
<category>
<pattern> TELL ME SOMETHING
</pattern>
<template> Do you like movies?
</template>
</category>
<category>
<pattern> YES </pattern>
<that> DO YOU LIKE MOVIES <that>
<template> What is your favourite movie?
</template>
</category>
A dialogue between two chatbots
Chatbot Limitations
 The dialogue mechaninsm is too rigid;
 The language understanding capability is very
limited;
 The chatbot knowledge base is expensive and
boring to create
An “intuitive/rational” chatbot as
interface to I.R retrieval systems
Goals
To simplify the
knowledge base
design process:
• extending the chatbot knowledge base with other
information repositories;
• generalizing as much as possible the AIML
categories;
• train automatically the chatbot knowledge base.
To enhance the
answering
mechanism:
• providing the chatbot of reasoning capabilities;
• allowing the chatbot to perform a “semantic analysis”
of the questions
Brain-Inspired Chatbot KB
Rational – Intuitive chatbots
 Integration of two approaches for knowledge
representation:
 Symbolic: Knowledge formalization by means of
semantic networks;
 Sub-symbolic: Data driven creation of semantic
spaces in which it is possible to represent and
compare natural language elements.
Symbolic Approach
An ontology is a formal specification of a
shared conceptualization, Borst, 1997
• Cyc is a large, multi-contextual, common sense knowledge
base
and inference engine
• The knowledge base is composed of concepts, logic
assertions, common sense rules and heuristics for the
reasoning about quotidian life objects and events “(currently
~200,000 terms each with several assertions; over 1,000,000
rules )
•Assertions sharing some features are associated together in
inherited clusters called “microtheories”.
Symbolic Approach
What’s in Cyc?
 A Knowledge Base (KB) consisting of terms
Dog, DogFood, Doghouse, SnoopDoggyDogg
 Assertions that relate these terms.
 Ground Assertions:
(isa MyDogSharkey BelgianSheepdog)
(genls BelgianSheepdog Dog)
 Rules, which derive assertions from Ground
Assertions:
(isa THING COL ) +
(genls COL SUPERCOL) --->
(isa THING SUPERCOL)
Predicates and Functions
 Predicates are truth-functional relations which can be evaluated
according to facts in the KB and used to make sentences that
are true or false
 Usually Lowercase
(objectHasColor BrownDog Brown)
(memberStatusOfOrganization Norway NATO FoundingMember)
 Functions take arguments to denote Non-Atomic Terms (NATs),
expressions that represent things
 Usually Uppercase
(FruitFn AppleTree) denotes an apple
(BorderBetweenFn Sweden Norway) denotes the border between
Sweden and Norway.
Sub-symbolic Approach
•“Sub-Symbolic” representation of natural language
elements in a vector space.
•The natural language elements are related each other
on the strength of the proximity of their corresponding
vectors in the space.
Meanings are locations in a semantic space, and
semantic similarity is proximity between the
locations (Sahlgren, 2006)
You shall know a word by the company it keeps
(Firth, 1957).
Sub-symbolic Approach
•Semantic spaces can be automatically induced from
data by using LSA;
•LSA is capable to “simulate” human evocative
capabilities
y
x
z
Conceptual
Space
Text Docs “The orthonormal axis of the induced
space represent “primitive concepts”
Semantic Spaces vs Semantic Networks Models
Semantic Spaces
• Unsupervised Learning
• Statistical
• Numerical
• Non-Structured
• Knowledge Free
Semantic Networks
• Supervised Learning
• Rule Based
• Symbolic
• Structured
• Knowledge Based
33/42
Chatbot Rational Component
CYD: Alice ProgramD + CYC
AIML/SUBL
Translator
Query Engine
CYD
CYC New AIML tags allowing the chatbot to:
•translate a natural language term into a Cyc
constant (cycterm);
•execute a query into the Cyc KB
(cycsystem);
•assert or delete a Cyc formula into or from a
Cyc microtheory (cycassert and cycretract);
•verify the value of a Cyc statement and in
consequence give an answer (cyccondition );
•execute a Cyc statement and return a
random answer (cycrandom)
An example of interaction in the M.A.G.A. project
<category>
<pattern> I NEED INFORMATION ABOUT THE ARTIFACT * </pattern>
<template> It belongs to
<cycsystem>(cyc-query '(# $CreatedDuring <star/> ?X)) </cycsystem>,
it has been found at
<cycsystem>(cyc-query '(#$ComingFrom <star/>?X))
</cycsystem>
and represents
<cycsystem>(cyc-query '(#$Representing <star/>?X))
</cycsystem>
</template>
</category>
I need information
about the artifact
Pan Head
It belongs to the
Roman age, it has
been found at Ribera
and represents Pan
divinity
Chatbot Intuitive Component
LSABot
Query LSAbot
KB
Answer
Data-driven
“Conceptual Space”
Intuitive vs Traditional Chatbot
39/42
Do you knoow C
plus plus
language?
C plus plus is the
object oriented
extension of the C
programming
language.
Can you speak any
other languages?
Rational/intuitive Chatbot
An Hybrid Symbolic/Subsymbolic
Chatbot
Logical and
Analytical thinking
Spatial and Intuitive
thinking
New AIML tags allowing the chatbot
to interact with the semantic space
 LsaCompetence: it changes the distance threshold used to
consider “similar” two vectors in the semantic space;
 LsaQuery: it encodes the user's request in the semantic space
obtaining the nearest concepts and returning only those whose
distance is below a known threshold set with the lsacompetence
tag;
 LsaRandomQuery: it runs a LsaQuery query and it returns a
random result between the available ones;
 LsaRelated: it obtains the nearest concepts of the input one
returning only those whose distance is below a known threshold
set with the <lsacompetence> tag;
 LsaRandomRelated: it runs a LsaRelated query and it returns a
random result between the available ones.
Rational/intuitive Chatbot
in the F.R.A.S.I. project
Chatbot
Answer
AIML/SU
BL
Translator
Query
Engine
E-SRAI (Enhanced Symbolic Reduction Artifical
Intelligence)
AIML
KB
Dialogue
Engine
ALICE-BOT
Question
Schemas
Analysis
Ontology
Querying
Categories
Creation
AIML
BOOTSTRAP
CYD
Ontology
User
Sentences
Reply Module
Question
Analysis
Sentence Type
Sentence
HeuristicTokenize
r
Sentence
Splitter
POS
Tagger
Gazettee
r
F.R.A.S.I. (Framework for Agent-Based Semantic-Aware
Interoperability)
Automatic Construction of Semantic Queries
GATE NLP modules
LSAbot
Milk Domain: Question features
Topics:
• Production;
• Food Quality/Safety;
• Nutrition/ Curiosity .
Sentence roles:
• Formal;
• Constitutive;
• Agentive;
• Telic.
Actually it recognizes this kind of sentence:
FORMAL/Definition:
WHAT+ IS +ENTITY
WHAT = {which|what|who}
IS={about|be|be meaning of|be definition of|be sense
of|mean|appear}
ENTITY= {SUBSTANCE}|{PRODUCT}|
{PROCESS}|{TASK}|{AGENT}
-SRAI: reduction of user queries to AIML pattern
<pattern>
FORM-DEFINITION …
</pattern>
Milk Microtheory
Latte
LatteIntero
Latte
Scremato
Produttore
Lattosio
Sindrome
Parmalat
Gala
omogeneizzazion
e
Utente
LatteMt
Microtheory
isa
genls
genls
Componente
Chimico
isa
haParte
haParte
Oggetto
Sociale
isa
isa
Processo
isa
GranLatteIntero
prodottoDa
PremiumBlu
prodottoDa
MarioBianchi
isa
Intolleranza
AlLattosio
isa
prodottoDa
soffreDi
isa
• FORM-
DEFINITION
Question
Schemas Reading
• (#$comment ?X
?Y)
Ontology
Querying
• Pattern Filling:
• <pattern>FORM-DEFINITION X</pattern>
• Template Filling
• <template>X is “Y”</template>
Categories
Creation
Bootstrap Example
Enhanced AIML KB
Ultimat
e
Default
Ontology and
LSA Default
Categories
Clasic Default
Atomic
E-SRAI
User Question
Ontology
CYD
AIML
Bootstrap
Automatically
generated
Defined by the
Botmaster
Run Time
Modules
Offline
Module
LSA
Run Time
Module
FRASI project: An example of interaction
<category>
<pattern>Form Definition *</pattern>
<template>
<think><set name
=”prodotto"><star/></set></think>
<cycsystem>(fi-ask
'(#$comment <cycterm><star
index="1"/></cycterm> ?X) #$LatteMt)
</cycsystem>
Vuoi conoscere i produttori principali? Se si
scrivi la parola Marche
</template>
</category>
<category>
<pattern>MARCHE</pattern>
<template> I produttori che commercializzano il
<get
name=”prodotto"/> sono i seguenti:
<cycsystem>(fi-ask
'(#$thereExists ?Y
(#$and (#$isa ?Y
<cycterm> <get name=”prodotto"/></cycterm>)
(#$prodottoDa ?Y ?X)))#$LatteMt)
</cycsystem>
</template>
</category>
Cosa puoi
dirmi del
Latte Intero?
Latte non
assoggettato al
processo di
riduzione dei …
Vuoi conoscere I
produttori principali?
Se si scrivi la parola
Marche
FRASI project: An inference example
<category>
<pattern>uk Vorrei provare il latte *</pattern>
<template>
Sto verificando se questo prodotto è sconsigliato per il
tuo profilo, il risultato è:
<cycsystem>(new-cyc-query
'(#$prodottoSconsigliato <cycterm><star/></cycterm>
<cycterm> <get name="utente"/> </cycterm>)#
$BaseKB '(:INFERENCE-MODE :SHALLOW ))
</cycsystem>
</template>
</category>
Inference Rule
(implies
(and
(soffreDi ?X IntolleranzaAlLattosio)
(haParte ?Y Lattosio))
(prodottoSconsigliato ?Y ?X))
Vorrei
provare il
latte
PremiumBlu
Sto verificando se questo
prodotto è sconsigliato per il tuo
profilo, il risultato è: Prodotto
Sconsigliato
An example of interaction
Conclusion
 Overview of conversational agents: history,
expectations and issues;
 Popularity of simple, rule-based conversational
agents;
 Introduction of a rational-intuitive chatbot
architecture.

More Related Content

Similar to Dialogare con agenti artificiali

Data Day Seattle, From NLP to AI
Data Day Seattle, From NLP to AIData Day Seattle, From NLP to AI
Data Day Seattle, From NLP to AIJonathan Mugan
 
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Codemotion
 
Object-Oriented Programming in Java (Module 1)
Object-Oriented Programming in Java (Module 1)Object-Oriented Programming in Java (Module 1)
Object-Oriented Programming in Java (Module 1)muhammadmubinmacadad2
 
HPAI Class 2 - human aspects and computing systems in ai - 012920
HPAI  Class 2 - human aspects and computing systems in ai - 012920HPAI  Class 2 - human aspects and computing systems in ai - 012920
HPAI Class 2 - human aspects and computing systems in ai - 012920melendez321
 
From Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial IntelligenceFrom Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial IntelligenceJonathan Mugan
 
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
 
Deep Learning for NLP: An Introduction to Neural Word Embeddings
Deep Learning for NLP: An Introduction to Neural Word EmbeddingsDeep Learning for NLP: An Introduction to Neural Word Embeddings
Deep Learning for NLP: An Introduction to Neural Word EmbeddingsRoelof Pieters
 
Software Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic ArchitecturesSoftware Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic ArchitecturesAngelos Kapsimanis
 
Deep learning introduction
Deep learning introductionDeep learning introduction
Deep learning introductionAdwait Bhave
 
Hpai class 11 - online potpourri - 032320
Hpai   class 11 - online potpourri - 032320Hpai   class 11 - online potpourri - 032320
Hpai class 11 - online potpourri - 032320melendez321
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Hpai class 12 - potpourri &amp; perception - 032620
Hpai   class 12 - potpourri &amp; perception - 032620Hpai   class 12 - potpourri &amp; perception - 032620
Hpai class 12 - potpourri &amp; perception - 032620melendez321
 
Using construction grammar in conversational systems
Using construction grammar in conversational systemsUsing construction grammar in conversational systems
Using construction grammar in conversational systemsCJ Jenkins
 
Chatbots and Deep Learning
Chatbots and Deep LearningChatbots and Deep Learning
Chatbots and Deep LearningAndherson Maeda
 
Data Day Seattle, Chatbots from First Principles
Data Day Seattle, Chatbots from First PrinciplesData Day Seattle, Chatbots from First Principles
Data Day Seattle, Chatbots from First PrinciplesJonathan Mugan
 
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
 

Similar to Dialogare con agenti artificiali (20)

Data Day Seattle, From NLP to AI
Data Day Seattle, From NLP to AIData Day Seattle, From NLP to AI
Data Day Seattle, From NLP to AI
 
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
 
Chatbots.pptx
Chatbots.pptxChatbots.pptx
Chatbots.pptx
 
Object-Oriented Programming in Java (Module 1)
Object-Oriented Programming in Java (Module 1)Object-Oriented Programming in Java (Module 1)
Object-Oriented Programming in Java (Module 1)
 
HPAI Class 2 - human aspects and computing systems in ai - 012920
HPAI  Class 2 - human aspects and computing systems in ai - 012920HPAI  Class 2 - human aspects and computing systems in ai - 012920
HPAI Class 2 - human aspects and computing systems in ai - 012920
 
From Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial IntelligenceFrom Natural Language Processing to Artificial Intelligence
From Natural Language Processing to Artificial Intelligence
 
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
 
Deep Learning for NLP: An Introduction to Neural Word Embeddings
Deep Learning for NLP: An Introduction to Neural Word EmbeddingsDeep Learning for NLP: An Introduction to Neural Word Embeddings
Deep Learning for NLP: An Introduction to Neural Word Embeddings
 
Software Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic ArchitecturesSoftware Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic Architectures
 
Deep learning introduction
Deep learning introductionDeep learning introduction
Deep learning introduction
 
Hpai class 11 - online potpourri - 032320
Hpai   class 11 - online potpourri - 032320Hpai   class 11 - online potpourri - 032320
Hpai class 11 - online potpourri - 032320
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Hpai class 12 - potpourri &amp; perception - 032620
Hpai   class 12 - potpourri &amp; perception - 032620Hpai   class 12 - potpourri &amp; perception - 032620
Hpai class 12 - potpourri &amp; perception - 032620
 
AI Introduction
AI Introduction AI Introduction
AI Introduction
 
Using construction grammar in conversational systems
Using construction grammar in conversational systemsUsing construction grammar in conversational systems
Using construction grammar in conversational systems
 
Chatbots and Deep Learning
Chatbots and Deep LearningChatbots and Deep Learning
Chatbots and Deep Learning
 
Data Day Seattle, Chatbots from First Principles
Data Day Seattle, Chatbots from First PrinciplesData Day Seattle, Chatbots from First Principles
Data Day Seattle, Chatbots from First Principles
 
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...
 
group7-Chatbots.ppt
group7-Chatbots.pptgroup7-Chatbots.ppt
group7-Chatbots.ppt
 

Recently uploaded

Oxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptxOxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptxfarhanvvdk
 
6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR
6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR
6.1 Pests of Groundnut_Binomics_Identification_Dr.UPRPirithiRaju
 
BACTERIAL SECRETION SYSTEM by Dr. Chayanika Das
BACTERIAL SECRETION SYSTEM by Dr. Chayanika DasBACTERIAL SECRETION SYSTEM by Dr. Chayanika Das
BACTERIAL SECRETION SYSTEM by Dr. Chayanika DasChayanika Das
 
Loudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptxLoudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptxpriyankatabhane
 
DNA isolation molecular biology practical.pptx
DNA isolation molecular biology practical.pptxDNA isolation molecular biology practical.pptx
DNA isolation molecular biology practical.pptxGiDMOh
 
Speed Breeding in Vegetable Crops- innovative approach for present era of cro...
Speed Breeding in Vegetable Crops- innovative approach for present era of cro...Speed Breeding in Vegetable Crops- innovative approach for present era of cro...
Speed Breeding in Vegetable Crops- innovative approach for present era of cro...jana861314
 
Unit-V-Introduction to Data Mining.pptx
Unit-V-Introduction to  Data Mining.pptxUnit-V-Introduction to  Data Mining.pptx
Unit-V-Introduction to Data Mining.pptxHarsha Patel
 
Production technology of Brinjal -Solanum melongena
Production technology of Brinjal -Solanum melongenaProduction technology of Brinjal -Solanum melongena
Production technology of Brinjal -Solanum melongenajana861314
 
Think Science: What Are Eclipses (101), by Craig Bobchin
Think Science: What Are Eclipses (101), by Craig BobchinThink Science: What Are Eclipses (101), by Craig Bobchin
Think Science: What Are Eclipses (101), by Craig BobchinNathan Cone
 
Environmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxEnvironmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxpriyankatabhane
 
Pests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPRPests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPRPirithiRaju
 
Food_safety_Management_pptx.pptx in microbiology
Food_safety_Management_pptx.pptx in microbiologyFood_safety_Management_pptx.pptx in microbiology
Food_safety_Management_pptx.pptx in microbiologyHemantThakare8
 
Timeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological CorrelationsTimeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological CorrelationsDanielBaumann11
 
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPRPirithiRaju
 
Total Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of CannabinoidsTotal Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of CannabinoidsMarkus Roggen
 
lect1 introduction.pptx microbiology ppt
lect1 introduction.pptx microbiology pptlect1 introduction.pptx microbiology ppt
lect1 introduction.pptx microbiology pptzbyb6vmmsd
 
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer ZahanaEGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer ZahanaDr.Mahmoud Abbas
 
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary MicrobiologyLAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary MicrobiologyChayanika Das
 

Recently uploaded (20)

Oxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptxOxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptx
 
6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR
6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR
6.1 Pests of Groundnut_Binomics_Identification_Dr.UPR
 
BACTERIAL SECRETION SYSTEM by Dr. Chayanika Das
BACTERIAL SECRETION SYSTEM by Dr. Chayanika DasBACTERIAL SECRETION SYSTEM by Dr. Chayanika Das
BACTERIAL SECRETION SYSTEM by Dr. Chayanika Das
 
Loudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptxLoudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptx
 
DNA isolation molecular biology practical.pptx
DNA isolation molecular biology practical.pptxDNA isolation molecular biology practical.pptx
DNA isolation molecular biology practical.pptx
 
Speed Breeding in Vegetable Crops- innovative approach for present era of cro...
Speed Breeding in Vegetable Crops- innovative approach for present era of cro...Speed Breeding in Vegetable Crops- innovative approach for present era of cro...
Speed Breeding in Vegetable Crops- innovative approach for present era of cro...
 
Unit-V-Introduction to Data Mining.pptx
Unit-V-Introduction to  Data Mining.pptxUnit-V-Introduction to  Data Mining.pptx
Unit-V-Introduction to Data Mining.pptx
 
Bioenergetics and the role of ATP to drive the beats of life.
Bioenergetics and the role of ATP to drive the beats of life.Bioenergetics and the role of ATP to drive the beats of life.
Bioenergetics and the role of ATP to drive the beats of life.
 
Production technology of Brinjal -Solanum melongena
Production technology of Brinjal -Solanum melongenaProduction technology of Brinjal -Solanum melongena
Production technology of Brinjal -Solanum melongena
 
Think Science: What Are Eclipses (101), by Craig Bobchin
Think Science: What Are Eclipses (101), by Craig BobchinThink Science: What Are Eclipses (101), by Craig Bobchin
Think Science: What Are Eclipses (101), by Craig Bobchin
 
Environmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxEnvironmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptx
 
Pests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPRPests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPR
 
Food_safety_Management_pptx.pptx in microbiology
Food_safety_Management_pptx.pptx in microbiologyFood_safety_Management_pptx.pptx in microbiology
Food_safety_Management_pptx.pptx in microbiology
 
Timeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological CorrelationsTimeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
 
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
 
Total Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of CannabinoidsTotal Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of Cannabinoids
 
lect1 introduction.pptx microbiology ppt
lect1 introduction.pptx microbiology pptlect1 introduction.pptx microbiology ppt
lect1 introduction.pptx microbiology ppt
 
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer ZahanaEGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
 
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary MicrobiologyLAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
 
Interferons.pptx.
Interferons.pptx.Interferons.pptx.
Interferons.pptx.
 

Dialogare con agenti artificiali

  • 1. Agnese Augello ICAR-CNR Dialogare con Agenti Artificiali Seminari di Logica e Filosofia della Scienza
  • 2. Outline Can machines dialogue? • Test di Turing • Expectation of strong Artificial Intelligence • Components and issues of a dialogue system Chatbots • Overview of popular chatbots • The illusion of Weizenbaum • Technology of a chabot An “intuitive/rational” chatbot as interface to I.R retrieval systems • Rational Area • Intuitive Area • An application
  • 4. Conversational Agents  A conversational agent is a computer program that interacts with users turn by turn using natural language;  Aim: to improve the usability of human-computer interfaces  Issues: The effective use of language is intertwined with our general cognitive abilities.
  • 5. The Turing Test Can machines think? Alan Turing “Computing Machinery and Intelligence” , 1950
  • 7. Expectation of an artificial intelligence system: HAL 9000  HAL (Heuristically programmed ALgorithmic computer) is a sentient computer that controls the systems of the Discovery spacecraft and interacts with the ship's astronaut crew.  HAL is capable of advanced language-processing behavior as speaking and understanding English, and at a crucial moment in the plot, even reading lips!
  • 8. Components of a Spoken Conversationa Agent Automatic Speech Recognition component (ASR) Natural Language Understanding component (NLU) )Text-To- Speech synthesis component (TTS) Natural Language Generation component (NLG) ) Dialogue Manager
  • 9. HAL, open the pod bay doors I'm sorry, Dave. I'm afraid I can't do that. I’m I do, sorry that afraid Dave I’m can’t. what is a `pod bay door’? Natural Language Understanding where you get that idea, Hal? REQUEST: HAL, open the pod bay door. STATEMENT: HAL, the pod bay door is open. INFORMATIONQUESTION: HAL,is the pod bay door open? I’m sorry , I’m afraid
  • 10. Natural Language Ambiguity Consider the spoken sentence: I made her duck  I cooked waterfowl for her.  I cooked waterfowl belonging to her.  I created the (plaster?) duck she owns.  I caused her to quickly lower her head or body.  I waved my magic wand and turned her into undifferentiated waterfowl.
  • 12. Chatbot  A simple conversational agent based on a pattern matching dialogue mechanism.  Main applications: e-learning platforms, research engines, web-site navigation.  From ELIZA (Joseph Weizenbaum1966) to SIRI (APPLE 2010)
  • 13. 13 From Eliza (Joseph Weizenbaum1966) …  ELIZA was an early natural language processing system capable of carrying on a limited form of conversation with a user.  Consider the following session with a version of ELIZA that imitated the responses of a psychotherapist. User1: You are like my father in some ways. ELIZA1: WHAT RESEMBLANCE DO YOU SEE User2: You are not very aggressive but I think you don’t want me to notice that. ELIZA2: WHAT MAKES YOU THINK I AM NOT AGGRESSIVE User3: You don’t argue with me. ELIZA3: WHY DO YOU THINK I DON’T ARGUE WITH YOU User4: You are afraid of me. ELIZA4: DOES IT PLEASE YOU TO BELIEVE I AM AFRAID OF YOU
  • 14. … To SIRI (Apple, 2010)
  • 15. “The Weizenbaum illusion”  “I was startled to see how quickly and how very deeply people conversing with DOCTOR became emotionally involved with the computer and how unequivocally they anthropomorphized it.” J. Weizenbaum, Computer Power and Human Reason, 1976  Human cognition is geared toward finding patterns… and we hear coherent language use where there are only snippets of canned text.
  • 16. Alice Chatbot An Example of AIML Category <category> <pattern> WHO ARE YOU</pattern> <template> I’m a chat robot. My knowledge base is composed of question-answer modules, (categories) structured with the Artificial Intelligence Mark-up Language (AIML) </template> </category> ? I’m a chat robot. My knowledge base is composed of question-answer modules, (categories) structured with the Artificial Intelligence Mark-up Language (AIML)
  • 17. Rappresentazione compatta: diversi pattern condividono rami dell’albero Graphmaster
  • 18. Default Categories <category> <pattern> * LOVE * </pattern> <template> <random> <li>Aren't we all looking for love?</li> <li>And what kind of love are we looking for today?</li> </random> </template>
  • 19. Recursive Categories: synonimy, symbolic reduction, divide and conquer <category> <pattern>BYE BYE </pattern> <template> <srai> GOODBYE </srai> </template> </category> <category> <pattern> DO YOU KNOW WHAT IS * </pattern> <template> <srai>WHAT IS <star/> </srai> </template> </category> <category> <pattern>GOODBYE </pattern> <template> Goodbye, user!</template> </category> …
  • 20. <That> </That> User: Tell me something Chat-bot: Do you like movies? User: Yes Chat-bot: What is your favourite movie? <category> <pattern> TELL ME SOMETHING </pattern> <template> Do you like movies? </template> </category> <category> <pattern> YES </pattern> <that> DO YOU LIKE MOVIES <that> <template> What is your favourite movie? </template> </category>
  • 21. A dialogue between two chatbots
  • 22. Chatbot Limitations  The dialogue mechaninsm is too rigid;  The language understanding capability is very limited;  The chatbot knowledge base is expensive and boring to create
  • 23. An “intuitive/rational” chatbot as interface to I.R retrieval systems
  • 24. Goals To simplify the knowledge base design process: • extending the chatbot knowledge base with other information repositories; • generalizing as much as possible the AIML categories; • train automatically the chatbot knowledge base. To enhance the answering mechanism: • providing the chatbot of reasoning capabilities; • allowing the chatbot to perform a “semantic analysis” of the questions
  • 26. Rational – Intuitive chatbots  Integration of two approaches for knowledge representation:  Symbolic: Knowledge formalization by means of semantic networks;  Sub-symbolic: Data driven creation of semantic spaces in which it is possible to represent and compare natural language elements.
  • 27. Symbolic Approach An ontology is a formal specification of a shared conceptualization, Borst, 1997
  • 28. • Cyc is a large, multi-contextual, common sense knowledge base and inference engine • The knowledge base is composed of concepts, logic assertions, common sense rules and heuristics for the reasoning about quotidian life objects and events “(currently ~200,000 terms each with several assertions; over 1,000,000 rules ) •Assertions sharing some features are associated together in inherited clusters called “microtheories”. Symbolic Approach
  • 29. What’s in Cyc?  A Knowledge Base (KB) consisting of terms Dog, DogFood, Doghouse, SnoopDoggyDogg  Assertions that relate these terms.  Ground Assertions: (isa MyDogSharkey BelgianSheepdog) (genls BelgianSheepdog Dog)  Rules, which derive assertions from Ground Assertions: (isa THING COL ) + (genls COL SUPERCOL) ---> (isa THING SUPERCOL)
  • 30. Predicates and Functions  Predicates are truth-functional relations which can be evaluated according to facts in the KB and used to make sentences that are true or false  Usually Lowercase (objectHasColor BrownDog Brown) (memberStatusOfOrganization Norway NATO FoundingMember)  Functions take arguments to denote Non-Atomic Terms (NATs), expressions that represent things  Usually Uppercase (FruitFn AppleTree) denotes an apple (BorderBetweenFn Sweden Norway) denotes the border between Sweden and Norway.
  • 31. Sub-symbolic Approach •“Sub-Symbolic” representation of natural language elements in a vector space. •The natural language elements are related each other on the strength of the proximity of their corresponding vectors in the space. Meanings are locations in a semantic space, and semantic similarity is proximity between the locations (Sahlgren, 2006) You shall know a word by the company it keeps (Firth, 1957).
  • 32. Sub-symbolic Approach •Semantic spaces can be automatically induced from data by using LSA; •LSA is capable to “simulate” human evocative capabilities y x z Conceptual Space Text Docs “The orthonormal axis of the induced space represent “primitive concepts”
  • 33. Semantic Spaces vs Semantic Networks Models Semantic Spaces • Unsupervised Learning • Statistical • Numerical • Non-Structured • Knowledge Free Semantic Networks • Supervised Learning • Rule Based • Symbolic • Structured • Knowledge Based 33/42
  • 35. CYD: Alice ProgramD + CYC AIML/SUBL Translator Query Engine CYD CYC New AIML tags allowing the chatbot to: •translate a natural language term into a Cyc constant (cycterm); •execute a query into the Cyc KB (cycsystem); •assert or delete a Cyc formula into or from a Cyc microtheory (cycassert and cycretract); •verify the value of a Cyc statement and in consequence give an answer (cyccondition ); •execute a Cyc statement and return a random answer (cycrandom)
  • 36. An example of interaction in the M.A.G.A. project <category> <pattern> I NEED INFORMATION ABOUT THE ARTIFACT * </pattern> <template> It belongs to <cycsystem>(cyc-query '(# $CreatedDuring <star/> ?X)) </cycsystem>, it has been found at <cycsystem>(cyc-query '(#$ComingFrom <star/>?X)) </cycsystem> and represents <cycsystem>(cyc-query '(#$Representing <star/>?X)) </cycsystem> </template> </category> I need information about the artifact Pan Head It belongs to the Roman age, it has been found at Ribera and represents Pan divinity
  • 39. Intuitive vs Traditional Chatbot 39/42 Do you knoow C plus plus language? C plus plus is the object oriented extension of the C programming language. Can you speak any other languages?
  • 41. An Hybrid Symbolic/Subsymbolic Chatbot Logical and Analytical thinking Spatial and Intuitive thinking
  • 42. New AIML tags allowing the chatbot to interact with the semantic space  LsaCompetence: it changes the distance threshold used to consider “similar” two vectors in the semantic space;  LsaQuery: it encodes the user's request in the semantic space obtaining the nearest concepts and returning only those whose distance is below a known threshold set with the lsacompetence tag;  LsaRandomQuery: it runs a LsaQuery query and it returns a random result between the available ones;  LsaRelated: it obtains the nearest concepts of the input one returning only those whose distance is below a known threshold set with the <lsacompetence> tag;  LsaRandomRelated: it runs a LsaRelated query and it returns a random result between the available ones.
  • 43. Rational/intuitive Chatbot in the F.R.A.S.I. project
  • 44. Chatbot Answer AIML/SU BL Translator Query Engine E-SRAI (Enhanced Symbolic Reduction Artifical Intelligence) AIML KB Dialogue Engine ALICE-BOT Question Schemas Analysis Ontology Querying Categories Creation AIML BOOTSTRAP CYD Ontology User Sentences Reply Module Question Analysis Sentence Type Sentence HeuristicTokenize r Sentence Splitter POS Tagger Gazettee r F.R.A.S.I. (Framework for Agent-Based Semantic-Aware Interoperability) Automatic Construction of Semantic Queries GATE NLP modules LSAbot
  • 45. Milk Domain: Question features Topics: • Production; • Food Quality/Safety; • Nutrition/ Curiosity . Sentence roles: • Formal; • Constitutive; • Agentive; • Telic.
  • 46. Actually it recognizes this kind of sentence: FORMAL/Definition: WHAT+ IS +ENTITY WHAT = {which|what|who} IS={about|be|be meaning of|be definition of|be sense of|mean|appear} ENTITY= {SUBSTANCE}|{PRODUCT}| {PROCESS}|{TASK}|{AGENT} -SRAI: reduction of user queries to AIML pattern <pattern> FORM-DEFINITION … </pattern>
  • 48. • FORM- DEFINITION Question Schemas Reading • (#$comment ?X ?Y) Ontology Querying • Pattern Filling: • <pattern>FORM-DEFINITION X</pattern> • Template Filling • <template>X is “Y”</template> Categories Creation Bootstrap Example
  • 49.
  • 50. Enhanced AIML KB Ultimat e Default Ontology and LSA Default Categories Clasic Default Atomic E-SRAI User Question Ontology CYD AIML Bootstrap Automatically generated Defined by the Botmaster Run Time Modules Offline Module LSA Run Time Module
  • 51. FRASI project: An example of interaction <category> <pattern>Form Definition *</pattern> <template> <think><set name =”prodotto"><star/></set></think> <cycsystem>(fi-ask '(#$comment <cycterm><star index="1"/></cycterm> ?X) #$LatteMt) </cycsystem> Vuoi conoscere i produttori principali? Se si scrivi la parola Marche </template> </category> <category> <pattern>MARCHE</pattern> <template> I produttori che commercializzano il <get name=”prodotto"/> sono i seguenti: <cycsystem>(fi-ask '(#$thereExists ?Y (#$and (#$isa ?Y <cycterm> <get name=”prodotto"/></cycterm>) (#$prodottoDa ?Y ?X)))#$LatteMt) </cycsystem> </template> </category> Cosa puoi dirmi del Latte Intero? Latte non assoggettato al processo di riduzione dei … Vuoi conoscere I produttori principali? Se si scrivi la parola Marche
  • 52. FRASI project: An inference example <category> <pattern>uk Vorrei provare il latte *</pattern> <template> Sto verificando se questo prodotto è sconsigliato per il tuo profilo, il risultato è: <cycsystem>(new-cyc-query '(#$prodottoSconsigliato <cycterm><star/></cycterm> <cycterm> <get name="utente"/> </cycterm>)# $BaseKB '(:INFERENCE-MODE :SHALLOW )) </cycsystem> </template> </category> Inference Rule (implies (and (soffreDi ?X IntolleranzaAlLattosio) (haParte ?Y Lattosio)) (prodottoSconsigliato ?Y ?X)) Vorrei provare il latte PremiumBlu Sto verificando se questo prodotto è sconsigliato per il tuo profilo, il risultato è: Prodotto Sconsigliato
  • 53. An example of interaction
  • 54. Conclusion  Overview of conversational agents: history, expectations and issues;  Popularity of simple, rule-based conversational agents;  Introduction of a rational-intuitive chatbot architecture.