SlideShare uma empresa Scribd logo
1 de 69
dd
Chatbots from First Principles
NLP Day
June 3, 2017
Jonathan Mugan
@jmugan
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
I’ll post the slides this
weekend on my LinkedIn
and my Twitter account
@jmugan
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Conversation requires shared reference
Language begins with shared attention by pointing to things
in the world. Words then point to shared ideas in our minds
[Gärdenfors, 2014].
Language as shared convention
A
B
Wittgenstein and his language games,
Philosophical Investigations, 1958
block
pillar
slab
beam
Two people building something.
“Bring me a beam.”
Eventually turns into a shared convention for a
community
Our brains map community conventions to
personal sensations and actions
sensation representation action
• When someone says “beam,” we map that to our experience with beams.
• We understand each other because we have had similar experiences.
See: Benjamin Bergen, Steven Pinker,
Mark Johnson, Jerome Feldman, and
Murray Shanahan
“beam”
This is what is means for language to be grounded.
We negotiate language and meaning as we go
Modified from Gärdenfors (2014), which was based on Winter (1998)
Coordination
of meaning
Coordination
of inner worlds
Instruction
Acknowledgement
Acknowledgement
Break
Break
• Levels of discourse
• Complicated to go
up and down the pyramid
We negotiate language and meaning as we go
Modified from Gärdenfors (2014), which was based on Winter (1998)
A fishing pole
is a stick, string
and hook
You can catch fish
with a fishing pole
Get me some fish
Acknowledgement
Acknowledgement
Break
Break
• Levels of discourse
• Complicated to go
up and down the pyramid
Conversation has its own rules (pragmatics)
• Conversational maxims: Grice (1975, 1978)
• Breaking these rules is a way to communicate more than the meaning of the words.
Maxim of Quantity: Say only what is not implied.
Yes: Bring me the block.
No: Bring me the block by transporting it to my location.
What did she mean by that?
Maxim of Quality: Say only things that are true.
Yes: “I hate carrying blocks.”
No: “I love carrying blocks, especially when they are covered in fire ants.”
She must be being sarcastic.
Maxim of Relevance: Say only things that matter.
Yes: “Bring me the block.”
No: “Bring me the block and birds sing.”
What did she mean by that?
Maxim of Manner: Speak in a way that can be understood.
Yes: “Bring me the block.”
No: “Use personal physical force to levitate the block and transport it to me.”
What did she mean by that?
Sometimes meaning isn’t even in the words but
how they are spoken (prosody)
Example from Voice User Interface Design
by Giangola and Balogh [2004]
``
1. You know. I don’t. [So don’t ask me.]
2. You know. I don’t. [As a matter of fact, I really don’t.]
3. You know I don’t. [You know that I don’t.]
‘’
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
We’ve all heard of Eliza
Python implementation at https://www.smallsurething.com/implementing-the-
famous-eliza-chatbot-in-python/
I want to buy a car.  How much does a car cost?
Simple substitutions to mimic a psychologist from the 1960s
“My mother wants me to buy a bazooka.” …
“Tell me why your mother wants you to buy a bazooka?”
You can extend it as much as you want
Modern mimicry agents are example based
Take a bunch of dialogs and use machine learning to predict
what the next statement will be given the last statement.
• Movie and TV subtitles
• OpenSubtitles
http://opus.lingfil.uu.se/OpenSubtitles.php
• Can mine Twitter
• Look for replies to tweets using the API
• Ubuntu Dialog Corpus
• Dialogs on people wanting technical support
https://arxiv.org/abs/1506.08909
Sequence-to-sequence model
The sequence-to-sequence (seq2seq) model can encode
sequences of tokens, such as sentences, into single
vectors.
It can then decode these vectors into other sequences
of tokens.
Both the encoding and decoding are done using
recurrent neural networks (RNNs).
The initial big application for this was machine
translation. For example, where the source sentences
are English and the target sentences are Spanish.
Encoding sentence meaning into a vector
h0
How
“How are you?”
Encoding sentence meaning into a vector
h0
How
h1
are
“How are you?”
Encoding sentence meaning into a vector
h0
How
h1
are
h2
you
“How are you?”
Encoding sentence meaning into a vector
h0
How
h1
are
h2
you
h3
?
“How are you?”
Decoding sentence meaning
I
h3
Decoding sentence meaning
I
h3 h4
Decoding sentence meaning
I
h3
am
h4
Decoding sentence meaning
I
h3
am
h4
great
h5
!
h5
[Cho et al., 2014]
It keeps generating until it generates a stop symbol. Note that the lengths don’t
need to be the same.
• Treats this task like it is devoid of meaning.
• Great that this can work on just about any kind of seq2seq
problem, but this generality highlights its limitation for use
as language understanding.
Seq2seq implementation
Enterprise ready seq2seq implementation
https://google.github.io/seq2seq/
Code is here
https://github.com/google/seq2seq
Generative adversarial networks (GANs)
Adversarial Learning for Neural Dialogue Generation, Li et al., 2017.
https://arxiv.org/pdf/1701.06547.pdf
Code in Torch (not Python!) for neural dialog generation
https://github.com/jiweil/Neural-Dialogue-Generation
• GANs have a discriminator that tries to tell if the generated
response was from a real conversation or generated by the model
• All the rage in image processing
• Still a work in progress for language
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Intention-based agents
Amazon Echo
Image by https://www.flickr.com/photos/turoczy/
License https://creativecommons.org/licenses/by/2.0/legalcode
Examples: Amazon Echo, Google
Assistant, Siri, Cortana
Like a command language
1. Identify what the user wants the
machine to do (the “intent”)
2. Figure out the details of the
intent so the machine can take
action
How to determine the intent?
With a bag-of-words in scikit-learn (library for Python)
http://scikit-
learn.org/stable/auto_examples/applications/plot_out_of_core_classification
.html
Using deep learning with a convolutional neural network (CNN) in
TensorFlow (use this if you have a lot of data)
https://github.com/dennybritz/cnn-text-classification-tf
“Get me
fourteen
chickens.”
keywords or
text-based
classification
adjust lights
order groceries
make appointment
raise army
Use keywords or text-based classification
What to do with the intent
Convert the squishiness of language into a Python dictionary
“Get me
fourteen
chickens.”
Natural language
understanding
{‘domain’: ‘purchase’,
‘item’:‘chicken_id344’,
‘quantity’: 14}
Called a frame and slot semantics
Natural language understanding with context
free grammars (compositional semantics)
$Order  $Purchase $ItemAmount, dunion(s[0],s[1])
$Purchase  is_purchase(tokens), {‘domain’: ’purchase’}
$ItemAmount  $Amount $Item, dunion(s[0],s[1])
$Amount  is_number(tokens), {‘amount’: get_number(tokens)}
$Item  is_item(tokens), {‘item’: get_item(tokens)}
def is_purchase(tokens):
return tokens in [‘get me’, ‘buy’, ‘grab me some’]
get_item(‘chickens’)  ‘chicken_id344’
get_item(‘soap’)  ‘soap_id143’
get_number(fourteen)  14
dunion: dictionary union
s[0] is the semantic value of the first item on rule right hand side
s[1] is the semantic value of the second item on rule right hand side
Natural language understanding with context
free grammars (compositional semantics)
$Order  $Purchase $ItemAmount, dunion(s[0],s[1])
$Purchase  is_purchase(tokens), {‘domain’: ’purchase’}
$ItemAmount  $Amount $Item, dunion(s[0],s[1])
$Amount  is_number(tokens), {‘amount’: get_number(tokens)}
$Item  is_item(tokens), {‘item’: get_item(tokens)}
def is_purchase(tokens):
return tokens in [‘get me’, ‘buy’, ‘grab me some’]
get_item(‘chickens’)  ‘chicken_id344’
get_item(‘soap’)  ‘soap_id143’
get_number(fourteen)  14
dunion: dictionary union
s[0] is the semantic value of the first item on rule right hand side
s[1] is the semantic value of the second item on rule right hand side
Natural language understanding with context
free grammars (compositional semantics)
$Order  $Purchase $ItemAmount, dunion(s[0],s[1])
$Purchase  is_purchase(tokens), {‘domain’: ’purchase’}
$ItemAmount  $Amount $Item, dunion(s[0],s[1])
$Amount  is_number(tokens), {‘amount’: get_number(tokens)}
$Item  is_item(tokens), {‘item’: get_item(tokens)}
def is_purchase(tokens):
return tokens in [‘get me’, ‘buy’, ‘grab me some’]
get_item(‘chickens’)  ‘chicken_id344’
get_item(‘soap’)  ‘soap_id143’
get_number(fourteen)  14
dunion: dictionary union
s[0] is the semantic value of the first item on rule right hand side
s[1] is the semantic value of the second item on rule right hand side
Natural language understanding with context
free grammars (compositional semantics)
$Order  $Purchase $ItemAmount, dunion(s[0],s[1])
$Purchase  is_purchase(tokens), {‘domain’: ’purchase’}
$ItemAmount  $Amount $Item, dunion(s[0],s[1])
$Amount  is_number(tokens), {‘amount’: get_number(tokens)}
$Item  is_item(tokens), {‘item’: get_item(tokens)}
def is_purchase(tokens):
return tokens in [‘get me’, ‘buy’, ‘grab me some’]
get_item(‘chickens’)  ‘chicken_id344’
get_item(‘soap’)  ‘soap_id143’
get_number(fourteen)  14
dunion: dictionary union
s[0] is the semantic value of the first item on rule right hand side
s[1] is the semantic value of the second item on rule right hand side
Natural language understanding with context
free grammars (compositional semantics)
$Order  $Purchase $ItemAmount, dunion(s[0],s[1])
$Purchase  is_purchase(tokens), {‘domain’: ’purchase’}
$ItemAmount  $Amount $Item, dunion(s[0],s[1])
$Amount  is_number(tokens), {‘amount’: get_number(tokens)}
$Item  is_item(tokens), {‘item’: get_item(tokens)}
def is_purchase(tokens):
return tokens in [‘get me’, ‘buy’, ‘grab me some’]
get_item(‘chickens’)  ‘chicken_id344’
get_item(‘soap’)  ‘soap_id143’
get_number(fourteen)  14
dunion: dictionary union
s[0] is the semantic value of the first item on rule right hand side
s[1] is the semantic value of the second item on rule right hand side
Natural language understanding with context
free grammars (compositional semantics)
$Order  $Purchase $ItemAmount, dunion(s[0],s[1])
$Purchase  is_purchase(tokens), {‘domain’: ’purchase’}
$ItemAmount  $Amount $Item, dunion(s[0],s[1])
$Amount  is_number(tokens), {‘amount’: get_number(tokens)}
$Item  is_item(tokens), {‘item’: get_item(tokens)}
def is_purchase(tokens):
return tokens in [‘get me’, ‘buy’, ‘grab me some’]
get_item(‘chickens’)  ‘chicken_id344’
get_item(‘soap’)  ‘soap_id143’
get_number(fourteen)  14
dunion: dictionary union
s[0] is the semantic value of the first item on rule right hand side
s[1] is the semantic value of the second item on rule right hand side
Parsing
Get me fourteen chickens
[Get:chickens]
[me:chickens]
[fourteen:chickens]
[chickens:chickens]
[Get:fourteen]
[me:fourteen]
[fourteen:fourteen]
[Get:me]
[me:me]
[Get:Get]
• Parsing is done using bottom-up dynamic programming.
• For each box, it loops over all n possible midpoints. E.g., (1,4) -> (1,2),(2,4) and (1,3),(3,4)
• This is why the rules have to have two non-terminals on RHS. Not a problem. You can
always put a context free grammar in this form (called Chomsky Normal Form).
Parsing
7. $Item
4. $Amount 8. $ItemAmount
2. ‘me’ 5. $Amount 9. $Order
1. ‘get’ 3. $Purchase 6. $Amount 10. $Order
Get me fourteen chickens
• Parsing is done using bottom-up dynamic programming.
• For each box, it loops over all n possible midpoints. E.g., (1,4) -> (1,2),(2,4) and (1,3),(3,4)
• This is why the rules have to have two non-terminals on RHS. Not a problem. You can
always put a context free grammar in this form (called Chomsky Normal Form).
Parsing
7. {‘item’:
‘chicken_id344’}
4. {‘amount’:14} 8. {‘item’:
‘chicken_id344’,
‘amount’:14}
2. ‘me’ 5. {‘amount’:14} 9. {‘domain’: ’purchase’,
‘item’: ‘chicken_id344’,
‘amount’:14,}
1. ‘get’ 3. {‘domain’:
’purchase’}
6. {‘amount’:14} 10. {‘domain’: ’purchase’,
‘item’: ‘chicken_id344’,
‘amount’:14,}
Get me fourteen chickens
• Parsing is done using bottom-up dynamic programming.
• For each box, it loops over all n possible midpoints. E.g., (1,4) -> (1,2),(2,4) and (1,3),(3,4)
• This is why the rules have to have two non-terminals on RHS. Not a problem. You can
always put a context free grammar in this form (called Chomsky Normal Form).
Python code for natural language understanding
Code is available in Python in the SippyCup library
https://github.com/wcmac/sippycup
There can be many valid parses, and a scoring algorithm can be
used to choose which one to use
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Conversational agents
Extended, meaningful conversations. Have to be able to keep track of the state
of the conversation and know when the person wants to talk about something else.
A teacher for the young
• Starts out as a cell phone app for a child
• Child can talk to its cartoon face and show it her toys
• Teaches her things
• “If you have 7 giraffes and bought 3 more, how many would you have?”
• “If you eat your chocolate bear today, how are you going to feel tomorrow when
you no longer have it?”
A guide for the adult
• As the child grows, so does the app, so it becomes her operating system
• Knows what you know. Can give turn-by-turn directions on fixing the washing machine
An advocate for the old
• Could advocate for us and guide us through government and healthcare bureaucracies
• Could help us live independently longer.
• Imagine it sees you confused. Could talk you through making coffee.
Blog post I wrote, You and Your Bot: A New Kind of Lifelong
Relationshiphttps://chatbotsmagazine.com/you-and-your-bot-a-new-kind-of-lifelong-relationship-
6a9649feeb71
How could a machine manage such conversations?
A dialog manager needs to
Take the person through all the things it wants to talk about
• Teach her math
• Then talk about planets
Recognize when she wants to talk about something else
and queue the current topics for later
RavenClaw from CMU is probably the best known dialog manager
Principles of RavenClaw
RavenClaw dialog manager.
Part of CMU Olympus system http://wiki.speech.cs.cmu.edu/olympus/index.php/Olympus
Listening phase
Take what the person said and see which dialog agent can respond
Dialog agents
Little programs organized hierarchically that correspond to different bits of conversation
E.g., general dialog agent about cooking, wants to discuss multiple things
Dialog stack
Stack of dialog agents to keep track of all the things the machine wants to talk about
Expectation agenda
Data structure of dialog agents to keep track of what the machine expects to hear
Execution phase
Take top dialog agent off dialog stack and let it talk. Also, set up what the
machine expects to hear in the expectation agenda
Hierarchy of dialog agents
Ask 4+5
Teach Arithmetic
Teach Planets
Tell Stories
Dialog Stack Expectation Agenda
9
Teach Arithmetic
Teach Planets
Tell Stories
Talk about toys
Talk about
toys always
there.
Hierarchy of dialog agents
Ask 4+5
Teach Arithmetic
Teach Planets
Tell Stories
Dialog Stack Expectation Agenda
9
Teach Arithmetic
Teach Planets
Tell Stories
Talk about toys
Robot just finished asking, “What is 4 + 5?”
Child says: “Do you like Mr. Fluffles?”
Hierarchy of dialog agents
Robot just finished asking, “What is 4 + 5?”
Child says: “Do you like Mr. Fluffles?”
Robot responds: “Very nice. Is he your favorite?”
Ask 4+5
Teach Arithmetic
Teach Planets
Tell Stories
Dialog Stack Expectation Agenda
9
Teach Arithmetic
Teach Planets
Tell Stories
Talk about toys
Hierarchy of dialog agents
Robot just finished asking, “What is 4 + 5?”
Child says: “Do you like Mr. Fluffles?”
Robot responds: “Very nice. Is he your favorite?”
Now we are
talking about
toys.
Talk about toys
Teach Arithmetic
Teach Planets
Tell Stories
Dialog Stack
Yes or No
Teach Arithmetic
Teach Planets
Tell Stories
Talk about toys
Expectation Agenda
Hierarchy of dialog agents
Robot just finished asking, “What is 4 + 5?”
Child says: “Do you like Mr. Fluffles?”
Robot responds: “Very nice. Is he your favorite?”
Now we are
talking about
toys.
Child says, “Of course!”
Update database
with new favorite toy.
Talk about toys
Teach Arithmetic
Teach Planets
Tell Stories
Dialog Stack
Yes or No
Teach Arithmetic
Teach Planets
Tell Stories
Talk about toys
Expectation Agenda
State-based dialog agents
Markov decision process
Set of states
Set of actions
Get a reward for being in a state s and taking an action a
States are things such as what the bot knows (questions it has answered),
the last thing the bot said, and the last thing the user said.
Actions are making particular statements.
Reward comes from meeting a goal state, such as child giving correct answer to a
math problem or successfully completing a travel reservation.
Use reinforcement learning to learn a policy that gives the best action a for being
in state s.
Beginning with random exploration
In reinforcement learning, the agent begins by
randomly exploring until it reaches its goal.
Reaching the goal
• When it reaches the goal, credit is propagated back to its previous states.
• The agent learns the function Q(s,a), which gives the cumulative expected
discounted reward of being in state s and taking action a and acting according
to the policy thereafter.
Eventually, the agent learns the value of being in each state and
taking each action and can therefore always do the best thing in
each state.
Learning the behavior
But there is limited observability
• Since speech-to-text and natural language
understanding are error prone, you actually don’t
know for sure which state you are in.
• Does she want to talk about her toys, or is she
telling me that I should be fluffier?
• Partially Observable Markov Decision Process (POMDP)
• As you can guess, these need a lot of training data. Generally
have to create a simulation of a person for the bot to talk to.
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Basic working with text
spaCy is good for general text
processing.
O’Reilly video course I made on doing
NLP in Python (not free)
http://shop.oreilly.com/product/063692
0061007.do
Free video I made on tokenizing
text in spaCy
https://www.oreilly.com/learning/how-
can-i-tokenize-a-sentence-with-python
https://demos.explosion.ai/displacy
Tokenization result:
['Get', 'me', 'fourteen', 'chickens', '.']
Speech-to-Text in Python
Use SpeechRecognition 3.6.5 Python library
https://pypi.python.org/pypi/SpeechRecognition/
Good blog post by Gurwinder Gulati here
https://ggulati.wordpress.com/2016/02/24/coding-jarvis-in-python-3-in-2016/
Can also use WaveNet. TensorFlow implementation: https://github.com/buriburisuri/speech-to-text-wavenet
WaveNet paper: https://arxiv.org/abs/1609.03499
Sphinx doesn’t work well for me. I use Google Cloud Speech API
https://cloud.google.com/speech/
Look at:
https://github.com/Uberi/speech_recognition/blob/master/speech_recognition/__init__.py
My modified version of Gurwinder’s blog post
Text-to-Speech in Python
Can also use WaveNet https://github.com/ibab/tensorflow-wavenet
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Additional resources not previously mentioned
• Jurafsky https://web.stanford.edu/class/cs124/lec/chatbot.pdf
• Jurafsky and Martin, Speech and Language Processing, Ch. 24, 2009
• New edition in progress https://web.stanford.edu/~jurafsky/slp3/
• Cathy Pearl, Designing Voice User Interfaces, 2016
Detailed resources are surprisingly hard to find
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Talk outline
What conversation is
The current state of chatbots
• Purposeless mimicry agents
• Intention-based agents
• Conversational agents
Other plumbing
Additional resources
Conclusion
Conclusion (1 of 3)
A
B
block
pillar
slab
beam
We can program this in
Computers need to know our conventions
Conclusion (2 of 3)
sensation representation action
“beam”
• Conventions need to be grounded in a system of sensation and action
• Hard when machines don’t have our bodies and experience
• Blog post of wrote in using physics simulations for natural language understanding
https://chatbotslife.com/computers-could-understand-natural-language-using-
simulated-physics-26e9706013da
Conclusion (3 of 3)
A fishing pole
is a stick, string
and hook
You can catch fish
with a fishing pole
Get me some fish
Acknowledgement
Acknowledgement
Break
Break
Machines also need to know the rules of conversation, so they can understand meanings
beyond words. And they need to understand meanings from how words are said.
I want me and my bot to have our
own culture. This ability to negotiate
meaning is what we would need.
Thanks for listening
Questions?
Jonathan Mugan
@jmugan

Mais conteúdo relacionado

Mais procurados

Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Mustafa Jarrar
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processingpunedevscom
 
Sk t academy lecture note
Sk t academy lecture noteSk t academy lecture note
Sk t academy lecture noteSusang Kim
 
02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysisSubhas Kumar Ghosh
 
Devoxx traitement automatique du langage sur du texte en 2019
Devoxx   traitement automatique du langage sur du texte en 2019 Devoxx   traitement automatique du langage sur du texte en 2019
Devoxx traitement automatique du langage sur du texte en 2019 Alexis Agahi
 
End-to-End Task-Completion Neural Dialogue Systems
End-to-End Task-Completion Neural Dialogue SystemsEnd-to-End Task-Completion Neural Dialogue Systems
End-to-End Task-Completion Neural Dialogue SystemsYun-Nung (Vivian) Chen
 
Developing Korean Chatbot 101
Developing Korean Chatbot 101Developing Korean Chatbot 101
Developing Korean Chatbot 101Jaemin Cho
 
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...Grammarly
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingYasir Khan
 
Natural Language Processing (NLP)
Natural Language Processing (NLP)Natural Language Processing (NLP)
Natural Language Processing (NLP)Yuriy Guts
 
Natural Language Processing for Games Research
Natural Language Processing for Games ResearchNatural Language Processing for Games Research
Natural Language Processing for Games ResearchJose Zagal
 
Natural language processing (Python)
Natural language processing (Python)Natural language processing (Python)
Natural language processing (Python)Sumit Raj
 
Natural language processing
Natural language processingNatural language processing
Natural language processingBasha Chand
 
HackYale - Natural Language Processing (Week 0)
HackYale - Natural Language Processing (Week 0)HackYale - Natural Language Processing (Week 0)
HackYale - Natural Language Processing (Week 0)Nick Hathaway
 
Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introductionRobert Lujo
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: ParsingRushdi Shams
 
Multiskill Conversational AI
Multiskill Conversational AIMultiskill Conversational AI
Multiskill Conversational AIDaniel Kornev
 

Mais procurados (20)

Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing
 
Chatbot_Presentation
Chatbot_PresentationChatbot_Presentation
Chatbot_Presentation
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Sk t academy lecture note
Sk t academy lecture noteSk t academy lecture note
Sk t academy lecture note
 
02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis
 
Devoxx traitement automatique du langage sur du texte en 2019
Devoxx   traitement automatique du langage sur du texte en 2019 Devoxx   traitement automatique du langage sur du texte en 2019
Devoxx traitement automatique du langage sur du texte en 2019
 
End-to-End Task-Completion Neural Dialogue Systems
End-to-End Task-Completion Neural Dialogue SystemsEnd-to-End Task-Completion Neural Dialogue Systems
End-to-End Task-Completion Neural Dialogue Systems
 
Developing Korean Chatbot 101
Developing Korean Chatbot 101Developing Korean Chatbot 101
Developing Korean Chatbot 101
 
Chatbots and AI
Chatbots and AIChatbots and AI
Chatbots and AI
 
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Natural Language Processing (NLP)
Natural Language Processing (NLP)Natural Language Processing (NLP)
Natural Language Processing (NLP)
 
Natural Language Processing for Games Research
Natural Language Processing for Games ResearchNatural Language Processing for Games Research
Natural Language Processing for Games Research
 
Natural language processing (Python)
Natural language processing (Python)Natural language processing (Python)
Natural language processing (Python)
 
Natural language processing
Natural language processingNatural language processing
Natural language processing
 
HackYale - Natural Language Processing (Week 0)
HackYale - Natural Language Processing (Week 0)HackYale - Natural Language Processing (Week 0)
HackYale - Natural Language Processing (Week 0)
 
Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introduction
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: Parsing
 
NLP
NLPNLP
NLP
 
Multiskill Conversational AI
Multiskill Conversational AIMultiskill Conversational AI
Multiskill Conversational AI
 

Destaque

Juego de eduardo navarrete
Juego de eduardo navarreteJuego de eduardo navarrete
Juego de eduardo navarretepluto1412
 
Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...
Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...
Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...Vera Rodrigues Prates
 
Tendências para 2018 aprendidas em 271 palestras da #SMWSP
Tendências para 2018 aprendidas em 271 palestras da #SMWSPTendências para 2018 aprendidas em 271 palestras da #SMWSP
Tendências para 2018 aprendidas em 271 palestras da #SMWSPEdney Souza
 
Introduction to Chatbots
Introduction to ChatbotsIntroduction to Chatbots
Introduction to ChatbotsDaden Limited
 
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational InterfacesThe Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational InterfacesTWG
 
chatbot and messenger as a platform
chatbot and messenger as a platformchatbot and messenger as a platform
chatbot and messenger as a platformDaisuke Minamide
 
AI Agent and Chatbot Trends For Enterprises
AI Agent and Chatbot Trends For EnterprisesAI Agent and Chatbot Trends For Enterprises
AI Agent and Chatbot Trends For EnterprisesTeewee Ang
 
Chatbot Artificial Intelligence
Chatbot Artificial IntelligenceChatbot Artificial Intelligence
Chatbot Artificial IntelligenceMd. Mahedi Mahfuj
 

Destaque (12)

Juego de eduardo navarrete
Juego de eduardo navarreteJuego de eduardo navarrete
Juego de eduardo navarrete
 
Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...
Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...
Fernando mentor-sucesso-universidade-polishop-ciclo-do-sucesso-110519084826-p...
 
Chatbots
ChatbotsChatbots
Chatbots
 
Tendências para 2018 aprendidas em 271 palestras da #SMWSP
Tendências para 2018 aprendidas em 271 palestras da #SMWSPTendências para 2018 aprendidas em 271 palestras da #SMWSP
Tendências para 2018 aprendidas em 271 palestras da #SMWSP
 
Bots in the Enterprise
Bots in the Enterprise Bots in the Enterprise
Bots in the Enterprise
 
Introduction to Chatbots
Introduction to ChatbotsIntroduction to Chatbots
Introduction to Chatbots
 
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational InterfacesThe Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
 
chatbot and messenger as a platform
chatbot and messenger as a platformchatbot and messenger as a platform
chatbot and messenger as a platform
 
Chatbot interfaces
Chatbot interfacesChatbot interfaces
Chatbot interfaces
 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
 
AI Agent and Chatbot Trends For Enterprises
AI Agent and Chatbot Trends For EnterprisesAI Agent and Chatbot Trends For Enterprises
AI Agent and Chatbot Trends For Enterprises
 
Chatbot Artificial Intelligence
Chatbot Artificial IntelligenceChatbot Artificial Intelligence
Chatbot Artificial Intelligence
 

Semelhante a Chatbots from first principles

Best Practices for Designing High-Fidelity Voice Experiences
Best Practices for Designing High-Fidelity Voice ExperiencesBest Practices for Designing High-Fidelity Voice Experiences
Best Practices for Designing High-Fidelity Voice ExperiencesPullString
 
Deep Learning for Natural Language Processing
Deep Learning for Natural Language ProcessingDeep Learning for Natural Language Processing
Deep Learning for Natural Language ProcessingJonathan Mugan
 
Dialogare con agenti artificiali
Dialogare con agenti artificiali  Dialogare con agenti artificiali
Dialogare con agenti artificiali Agnese Augello
 
aOS Moscow - E1 - Bots and language understanding - Rick van Rousselt
aOS Moscow - E1 - Bots and language understanding - Rick van RousseltaOS Moscow - E1 - Bots and language understanding - Rick van Rousselt
aOS Moscow - E1 - Bots and language understanding - Rick van RousseltaOS Community
 
Pycon ke word vectors
Pycon ke   word vectorsPycon ke   word vectors
Pycon ke word vectorsOsebe Sammi
 
CFP workshop
CFP workshopCFP workshop
CFP workshopAmit Zur
 
How to tell a better story (in code)(final)
How to tell a better story (in code)(final)How to tell a better story (in code)(final)
How to tell a better story (in code)(final)Bonnie Pan
 
Pair writing: how to collaborate effectively with subject matter experts – Co...
Pair writing: how to collaborate effectively with subject matter experts – Co...Pair writing: how to collaborate effectively with subject matter experts – Co...
Pair writing: how to collaborate effectively with subject matter experts – Co...Richard Ingram
 
Reading Street
Reading StreetReading Street
Reading Streetcavalcic
 
Reading Street
Reading StreetReading Street
Reading Streetcavalcic
 
Writing Clip Art Animated Free Clipa
Writing Clip Art Animated Free ClipaWriting Clip Art Animated Free Clipa
Writing Clip Art Animated Free ClipaJeff Nelson
 
Edit My College Essay. 10 Most Common Co
Edit My College Essay. 10 Most Common CoEdit My College Essay. 10 Most Common Co
Edit My College Essay. 10 Most Common CoKimberly Harris
 
Ux scot voice usability testing with woz - ar and sf - june 2019
Ux scot   voice usability testing with woz - ar and sf  - june 2019Ux scot   voice usability testing with woz - ar and sf  - june 2019
Ux scot voice usability testing with woz - ar and sf - june 2019User Vision
 
Voice usability testing with WOZ methodology - UX SCOT 2019
Voice usability testing with WOZ methodology - UX SCOT 2019Voice usability testing with WOZ methodology - UX SCOT 2019
Voice usability testing with WOZ methodology - UX SCOT 2019Abi Reynolds
 
Policy Issue Paper Example - Example 1 - Research Pap
Policy Issue Paper Example - Example 1 - Research PapPolicy Issue Paper Example - Example 1 - Research Pap
Policy Issue Paper Example - Example 1 - Research PapKim Isleb
 
What Is Thesis In Essay.pdf
What Is Thesis In Essay.pdfWhat Is Thesis In Essay.pdf
What Is Thesis In Essay.pdfCrystal Wright
 
God Mode for designing scenario-driven skills for DeepPavlov Dream
God Mode for designing scenario-driven skills for DeepPavlov DreamGod Mode for designing scenario-driven skills for DeepPavlov Dream
God Mode for designing scenario-driven skills for DeepPavlov DreamDaniel Kornev
 
Training 4th March Widgets & Wizardry for MFL update
Training 4th March Widgets & Wizardry for MFL update Training 4th March Widgets & Wizardry for MFL update
Training 4th March Widgets & Wizardry for MFL update jonmeier
 

Semelhante a Chatbots from first principles (20)

Best Practices for Designing High-Fidelity Voice Experiences
Best Practices for Designing High-Fidelity Voice ExperiencesBest Practices for Designing High-Fidelity Voice Experiences
Best Practices for Designing High-Fidelity Voice Experiences
 
Deep Learning for Natural Language Processing
Deep Learning for Natural Language ProcessingDeep Learning for Natural Language Processing
Deep Learning for Natural Language Processing
 
Dialogare con agenti artificiali
Dialogare con agenti artificiali  Dialogare con agenti artificiali
Dialogare con agenti artificiali
 
aOS Moscow - E1 - Bots and language understanding - Rick van Rousselt
aOS Moscow - E1 - Bots and language understanding - Rick van RousseltaOS Moscow - E1 - Bots and language understanding - Rick van Rousselt
aOS Moscow - E1 - Bots and language understanding - Rick van Rousselt
 
Pycon ke word vectors
Pycon ke   word vectorsPycon ke   word vectors
Pycon ke word vectors
 
CFP workshop
CFP workshopCFP workshop
CFP workshop
 
How to tell a better story (in code)(final)
How to tell a better story (in code)(final)How to tell a better story (in code)(final)
How to tell a better story (in code)(final)
 
Pair writing: how to collaborate effectively with subject matter experts – Co...
Pair writing: how to collaborate effectively with subject matter experts – Co...Pair writing: how to collaborate effectively with subject matter experts – Co...
Pair writing: how to collaborate effectively with subject matter experts – Co...
 
Reading Street
Reading StreetReading Street
Reading Street
 
Reading Street
Reading StreetReading Street
Reading Street
 
Beginners chatbotai workshopdbb_bitfusion
Beginners chatbotai workshopdbb_bitfusionBeginners chatbotai workshopdbb_bitfusion
Beginners chatbotai workshopdbb_bitfusion
 
Writing Clip Art Animated Free Clipa
Writing Clip Art Animated Free ClipaWriting Clip Art Animated Free Clipa
Writing Clip Art Animated Free Clipa
 
Edit My College Essay. 10 Most Common Co
Edit My College Essay. 10 Most Common CoEdit My College Essay. 10 Most Common Co
Edit My College Essay. 10 Most Common Co
 
Ux scot voice usability testing with woz - ar and sf - june 2019
Ux scot   voice usability testing with woz - ar and sf  - june 2019Ux scot   voice usability testing with woz - ar and sf  - june 2019
Ux scot voice usability testing with woz - ar and sf - june 2019
 
Pml3
Pml3Pml3
Pml3
 
Voice usability testing with WOZ methodology - UX SCOT 2019
Voice usability testing with WOZ methodology - UX SCOT 2019Voice usability testing with WOZ methodology - UX SCOT 2019
Voice usability testing with WOZ methodology - UX SCOT 2019
 
Policy Issue Paper Example - Example 1 - Research Pap
Policy Issue Paper Example - Example 1 - Research PapPolicy Issue Paper Example - Example 1 - Research Pap
Policy Issue Paper Example - Example 1 - Research Pap
 
What Is Thesis In Essay.pdf
What Is Thesis In Essay.pdfWhat Is Thesis In Essay.pdf
What Is Thesis In Essay.pdf
 
God Mode for designing scenario-driven skills for DeepPavlov Dream
God Mode for designing scenario-driven skills for DeepPavlov DreamGod Mode for designing scenario-driven skills for DeepPavlov Dream
God Mode for designing scenario-driven skills for DeepPavlov Dream
 
Training 4th March Widgets & Wizardry for MFL update
Training 4th March Widgets & Wizardry for MFL update Training 4th March Widgets & Wizardry for MFL update
Training 4th March Widgets & Wizardry for MFL update
 

Último

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Último (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Chatbots from first principles

  • 1. dd Chatbots from First Principles NLP Day June 3, 2017 Jonathan Mugan @jmugan
  • 2. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion I’ll post the slides this weekend on my LinkedIn and my Twitter account @jmugan
  • 3. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 4. Conversation requires shared reference Language begins with shared attention by pointing to things in the world. Words then point to shared ideas in our minds [Gärdenfors, 2014].
  • 5. Language as shared convention A B Wittgenstein and his language games, Philosophical Investigations, 1958 block pillar slab beam Two people building something. “Bring me a beam.” Eventually turns into a shared convention for a community
  • 6. Our brains map community conventions to personal sensations and actions sensation representation action • When someone says “beam,” we map that to our experience with beams. • We understand each other because we have had similar experiences. See: Benjamin Bergen, Steven Pinker, Mark Johnson, Jerome Feldman, and Murray Shanahan “beam” This is what is means for language to be grounded.
  • 7. We negotiate language and meaning as we go Modified from Gärdenfors (2014), which was based on Winter (1998) Coordination of meaning Coordination of inner worlds Instruction Acknowledgement Acknowledgement Break Break • Levels of discourse • Complicated to go up and down the pyramid
  • 8. We negotiate language and meaning as we go Modified from Gärdenfors (2014), which was based on Winter (1998) A fishing pole is a stick, string and hook You can catch fish with a fishing pole Get me some fish Acknowledgement Acknowledgement Break Break • Levels of discourse • Complicated to go up and down the pyramid
  • 9. Conversation has its own rules (pragmatics) • Conversational maxims: Grice (1975, 1978) • Breaking these rules is a way to communicate more than the meaning of the words. Maxim of Quantity: Say only what is not implied. Yes: Bring me the block. No: Bring me the block by transporting it to my location. What did she mean by that? Maxim of Quality: Say only things that are true. Yes: “I hate carrying blocks.” No: “I love carrying blocks, especially when they are covered in fire ants.” She must be being sarcastic. Maxim of Relevance: Say only things that matter. Yes: “Bring me the block.” No: “Bring me the block and birds sing.” What did she mean by that? Maxim of Manner: Speak in a way that can be understood. Yes: “Bring me the block.” No: “Use personal physical force to levitate the block and transport it to me.” What did she mean by that?
  • 10. Sometimes meaning isn’t even in the words but how they are spoken (prosody) Example from Voice User Interface Design by Giangola and Balogh [2004] `` 1. You know. I don’t. [So don’t ask me.] 2. You know. I don’t. [As a matter of fact, I really don’t.] 3. You know I don’t. [You know that I don’t.] ‘’
  • 11. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 12. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 13. We’ve all heard of Eliza Python implementation at https://www.smallsurething.com/implementing-the- famous-eliza-chatbot-in-python/ I want to buy a car.  How much does a car cost? Simple substitutions to mimic a psychologist from the 1960s “My mother wants me to buy a bazooka.” … “Tell me why your mother wants you to buy a bazooka?” You can extend it as much as you want
  • 14. Modern mimicry agents are example based Take a bunch of dialogs and use machine learning to predict what the next statement will be given the last statement. • Movie and TV subtitles • OpenSubtitles http://opus.lingfil.uu.se/OpenSubtitles.php • Can mine Twitter • Look for replies to tweets using the API • Ubuntu Dialog Corpus • Dialogs on people wanting technical support https://arxiv.org/abs/1506.08909
  • 15. Sequence-to-sequence model The sequence-to-sequence (seq2seq) model can encode sequences of tokens, such as sentences, into single vectors. It can then decode these vectors into other sequences of tokens. Both the encoding and decoding are done using recurrent neural networks (RNNs). The initial big application for this was machine translation. For example, where the source sentences are English and the target sentences are Spanish.
  • 16. Encoding sentence meaning into a vector h0 How “How are you?”
  • 17. Encoding sentence meaning into a vector h0 How h1 are “How are you?”
  • 18. Encoding sentence meaning into a vector h0 How h1 are h2 you “How are you?”
  • 19. Encoding sentence meaning into a vector h0 How h1 are h2 you h3 ? “How are you?”
  • 23. Decoding sentence meaning I h3 am h4 great h5 ! h5 [Cho et al., 2014] It keeps generating until it generates a stop symbol. Note that the lengths don’t need to be the same. • Treats this task like it is devoid of meaning. • Great that this can work on just about any kind of seq2seq problem, but this generality highlights its limitation for use as language understanding.
  • 24. Seq2seq implementation Enterprise ready seq2seq implementation https://google.github.io/seq2seq/ Code is here https://github.com/google/seq2seq
  • 25. Generative adversarial networks (GANs) Adversarial Learning for Neural Dialogue Generation, Li et al., 2017. https://arxiv.org/pdf/1701.06547.pdf Code in Torch (not Python!) for neural dialog generation https://github.com/jiweil/Neural-Dialogue-Generation • GANs have a discriminator that tries to tell if the generated response was from a real conversation or generated by the model • All the rage in image processing • Still a work in progress for language
  • 26. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 27. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 28. Intention-based agents Amazon Echo Image by https://www.flickr.com/photos/turoczy/ License https://creativecommons.org/licenses/by/2.0/legalcode Examples: Amazon Echo, Google Assistant, Siri, Cortana Like a command language 1. Identify what the user wants the machine to do (the “intent”) 2. Figure out the details of the intent so the machine can take action
  • 29. How to determine the intent? With a bag-of-words in scikit-learn (library for Python) http://scikit- learn.org/stable/auto_examples/applications/plot_out_of_core_classification .html Using deep learning with a convolutional neural network (CNN) in TensorFlow (use this if you have a lot of data) https://github.com/dennybritz/cnn-text-classification-tf “Get me fourteen chickens.” keywords or text-based classification adjust lights order groceries make appointment raise army Use keywords or text-based classification
  • 30. What to do with the intent Convert the squishiness of language into a Python dictionary “Get me fourteen chickens.” Natural language understanding {‘domain’: ‘purchase’, ‘item’:‘chicken_id344’, ‘quantity’: 14} Called a frame and slot semantics
  • 31. Natural language understanding with context free grammars (compositional semantics) $Order  $Purchase $ItemAmount, dunion(s[0],s[1]) $Purchase  is_purchase(tokens), {‘domain’: ’purchase’} $ItemAmount  $Amount $Item, dunion(s[0],s[1]) $Amount  is_number(tokens), {‘amount’: get_number(tokens)} $Item  is_item(tokens), {‘item’: get_item(tokens)} def is_purchase(tokens): return tokens in [‘get me’, ‘buy’, ‘grab me some’] get_item(‘chickens’)  ‘chicken_id344’ get_item(‘soap’)  ‘soap_id143’ get_number(fourteen)  14 dunion: dictionary union s[0] is the semantic value of the first item on rule right hand side s[1] is the semantic value of the second item on rule right hand side
  • 32. Natural language understanding with context free grammars (compositional semantics) $Order  $Purchase $ItemAmount, dunion(s[0],s[1]) $Purchase  is_purchase(tokens), {‘domain’: ’purchase’} $ItemAmount  $Amount $Item, dunion(s[0],s[1]) $Amount  is_number(tokens), {‘amount’: get_number(tokens)} $Item  is_item(tokens), {‘item’: get_item(tokens)} def is_purchase(tokens): return tokens in [‘get me’, ‘buy’, ‘grab me some’] get_item(‘chickens’)  ‘chicken_id344’ get_item(‘soap’)  ‘soap_id143’ get_number(fourteen)  14 dunion: dictionary union s[0] is the semantic value of the first item on rule right hand side s[1] is the semantic value of the second item on rule right hand side
  • 33. Natural language understanding with context free grammars (compositional semantics) $Order  $Purchase $ItemAmount, dunion(s[0],s[1]) $Purchase  is_purchase(tokens), {‘domain’: ’purchase’} $ItemAmount  $Amount $Item, dunion(s[0],s[1]) $Amount  is_number(tokens), {‘amount’: get_number(tokens)} $Item  is_item(tokens), {‘item’: get_item(tokens)} def is_purchase(tokens): return tokens in [‘get me’, ‘buy’, ‘grab me some’] get_item(‘chickens’)  ‘chicken_id344’ get_item(‘soap’)  ‘soap_id143’ get_number(fourteen)  14 dunion: dictionary union s[0] is the semantic value of the first item on rule right hand side s[1] is the semantic value of the second item on rule right hand side
  • 34. Natural language understanding with context free grammars (compositional semantics) $Order  $Purchase $ItemAmount, dunion(s[0],s[1]) $Purchase  is_purchase(tokens), {‘domain’: ’purchase’} $ItemAmount  $Amount $Item, dunion(s[0],s[1]) $Amount  is_number(tokens), {‘amount’: get_number(tokens)} $Item  is_item(tokens), {‘item’: get_item(tokens)} def is_purchase(tokens): return tokens in [‘get me’, ‘buy’, ‘grab me some’] get_item(‘chickens’)  ‘chicken_id344’ get_item(‘soap’)  ‘soap_id143’ get_number(fourteen)  14 dunion: dictionary union s[0] is the semantic value of the first item on rule right hand side s[1] is the semantic value of the second item on rule right hand side
  • 35. Natural language understanding with context free grammars (compositional semantics) $Order  $Purchase $ItemAmount, dunion(s[0],s[1]) $Purchase  is_purchase(tokens), {‘domain’: ’purchase’} $ItemAmount  $Amount $Item, dunion(s[0],s[1]) $Amount  is_number(tokens), {‘amount’: get_number(tokens)} $Item  is_item(tokens), {‘item’: get_item(tokens)} def is_purchase(tokens): return tokens in [‘get me’, ‘buy’, ‘grab me some’] get_item(‘chickens’)  ‘chicken_id344’ get_item(‘soap’)  ‘soap_id143’ get_number(fourteen)  14 dunion: dictionary union s[0] is the semantic value of the first item on rule right hand side s[1] is the semantic value of the second item on rule right hand side
  • 36. Natural language understanding with context free grammars (compositional semantics) $Order  $Purchase $ItemAmount, dunion(s[0],s[1]) $Purchase  is_purchase(tokens), {‘domain’: ’purchase’} $ItemAmount  $Amount $Item, dunion(s[0],s[1]) $Amount  is_number(tokens), {‘amount’: get_number(tokens)} $Item  is_item(tokens), {‘item’: get_item(tokens)} def is_purchase(tokens): return tokens in [‘get me’, ‘buy’, ‘grab me some’] get_item(‘chickens’)  ‘chicken_id344’ get_item(‘soap’)  ‘soap_id143’ get_number(fourteen)  14 dunion: dictionary union s[0] is the semantic value of the first item on rule right hand side s[1] is the semantic value of the second item on rule right hand side
  • 37. Parsing Get me fourteen chickens [Get:chickens] [me:chickens] [fourteen:chickens] [chickens:chickens] [Get:fourteen] [me:fourteen] [fourteen:fourteen] [Get:me] [me:me] [Get:Get] • Parsing is done using bottom-up dynamic programming. • For each box, it loops over all n possible midpoints. E.g., (1,4) -> (1,2),(2,4) and (1,3),(3,4) • This is why the rules have to have two non-terminals on RHS. Not a problem. You can always put a context free grammar in this form (called Chomsky Normal Form).
  • 38. Parsing 7. $Item 4. $Amount 8. $ItemAmount 2. ‘me’ 5. $Amount 9. $Order 1. ‘get’ 3. $Purchase 6. $Amount 10. $Order Get me fourteen chickens • Parsing is done using bottom-up dynamic programming. • For each box, it loops over all n possible midpoints. E.g., (1,4) -> (1,2),(2,4) and (1,3),(3,4) • This is why the rules have to have two non-terminals on RHS. Not a problem. You can always put a context free grammar in this form (called Chomsky Normal Form).
  • 39. Parsing 7. {‘item’: ‘chicken_id344’} 4. {‘amount’:14} 8. {‘item’: ‘chicken_id344’, ‘amount’:14} 2. ‘me’ 5. {‘amount’:14} 9. {‘domain’: ’purchase’, ‘item’: ‘chicken_id344’, ‘amount’:14,} 1. ‘get’ 3. {‘domain’: ’purchase’} 6. {‘amount’:14} 10. {‘domain’: ’purchase’, ‘item’: ‘chicken_id344’, ‘amount’:14,} Get me fourteen chickens • Parsing is done using bottom-up dynamic programming. • For each box, it loops over all n possible midpoints. E.g., (1,4) -> (1,2),(2,4) and (1,3),(3,4) • This is why the rules have to have two non-terminals on RHS. Not a problem. You can always put a context free grammar in this form (called Chomsky Normal Form).
  • 40. Python code for natural language understanding Code is available in Python in the SippyCup library https://github.com/wcmac/sippycup There can be many valid parses, and a scoring algorithm can be used to choose which one to use
  • 41. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 42. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 43. Conversational agents Extended, meaningful conversations. Have to be able to keep track of the state of the conversation and know when the person wants to talk about something else. A teacher for the young • Starts out as a cell phone app for a child • Child can talk to its cartoon face and show it her toys • Teaches her things • “If you have 7 giraffes and bought 3 more, how many would you have?” • “If you eat your chocolate bear today, how are you going to feel tomorrow when you no longer have it?” A guide for the adult • As the child grows, so does the app, so it becomes her operating system • Knows what you know. Can give turn-by-turn directions on fixing the washing machine An advocate for the old • Could advocate for us and guide us through government and healthcare bureaucracies • Could help us live independently longer. • Imagine it sees you confused. Could talk you through making coffee. Blog post I wrote, You and Your Bot: A New Kind of Lifelong Relationshiphttps://chatbotsmagazine.com/you-and-your-bot-a-new-kind-of-lifelong-relationship- 6a9649feeb71
  • 44. How could a machine manage such conversations? A dialog manager needs to Take the person through all the things it wants to talk about • Teach her math • Then talk about planets Recognize when she wants to talk about something else and queue the current topics for later RavenClaw from CMU is probably the best known dialog manager
  • 45. Principles of RavenClaw RavenClaw dialog manager. Part of CMU Olympus system http://wiki.speech.cs.cmu.edu/olympus/index.php/Olympus Listening phase Take what the person said and see which dialog agent can respond Dialog agents Little programs organized hierarchically that correspond to different bits of conversation E.g., general dialog agent about cooking, wants to discuss multiple things Dialog stack Stack of dialog agents to keep track of all the things the machine wants to talk about Expectation agenda Data structure of dialog agents to keep track of what the machine expects to hear Execution phase Take top dialog agent off dialog stack and let it talk. Also, set up what the machine expects to hear in the expectation agenda
  • 46. Hierarchy of dialog agents Ask 4+5 Teach Arithmetic Teach Planets Tell Stories Dialog Stack Expectation Agenda 9 Teach Arithmetic Teach Planets Tell Stories Talk about toys Talk about toys always there.
  • 47. Hierarchy of dialog agents Ask 4+5 Teach Arithmetic Teach Planets Tell Stories Dialog Stack Expectation Agenda 9 Teach Arithmetic Teach Planets Tell Stories Talk about toys Robot just finished asking, “What is 4 + 5?” Child says: “Do you like Mr. Fluffles?”
  • 48. Hierarchy of dialog agents Robot just finished asking, “What is 4 + 5?” Child says: “Do you like Mr. Fluffles?” Robot responds: “Very nice. Is he your favorite?” Ask 4+5 Teach Arithmetic Teach Planets Tell Stories Dialog Stack Expectation Agenda 9 Teach Arithmetic Teach Planets Tell Stories Talk about toys
  • 49. Hierarchy of dialog agents Robot just finished asking, “What is 4 + 5?” Child says: “Do you like Mr. Fluffles?” Robot responds: “Very nice. Is he your favorite?” Now we are talking about toys. Talk about toys Teach Arithmetic Teach Planets Tell Stories Dialog Stack Yes or No Teach Arithmetic Teach Planets Tell Stories Talk about toys Expectation Agenda
  • 50. Hierarchy of dialog agents Robot just finished asking, “What is 4 + 5?” Child says: “Do you like Mr. Fluffles?” Robot responds: “Very nice. Is he your favorite?” Now we are talking about toys. Child says, “Of course!” Update database with new favorite toy. Talk about toys Teach Arithmetic Teach Planets Tell Stories Dialog Stack Yes or No Teach Arithmetic Teach Planets Tell Stories Talk about toys Expectation Agenda
  • 51. State-based dialog agents Markov decision process Set of states Set of actions Get a reward for being in a state s and taking an action a States are things such as what the bot knows (questions it has answered), the last thing the bot said, and the last thing the user said. Actions are making particular statements. Reward comes from meeting a goal state, such as child giving correct answer to a math problem or successfully completing a travel reservation. Use reinforcement learning to learn a policy that gives the best action a for being in state s.
  • 52. Beginning with random exploration In reinforcement learning, the agent begins by randomly exploring until it reaches its goal.
  • 53. Reaching the goal • When it reaches the goal, credit is propagated back to its previous states. • The agent learns the function Q(s,a), which gives the cumulative expected discounted reward of being in state s and taking action a and acting according to the policy thereafter.
  • 54. Eventually, the agent learns the value of being in each state and taking each action and can therefore always do the best thing in each state. Learning the behavior
  • 55. But there is limited observability • Since speech-to-text and natural language understanding are error prone, you actually don’t know for sure which state you are in. • Does she want to talk about her toys, or is she telling me that I should be fluffier? • Partially Observable Markov Decision Process (POMDP) • As you can guess, these need a lot of training data. Generally have to create a simulation of a person for the bot to talk to.
  • 56. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 57. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 58. Basic working with text spaCy is good for general text processing. O’Reilly video course I made on doing NLP in Python (not free) http://shop.oreilly.com/product/063692 0061007.do Free video I made on tokenizing text in spaCy https://www.oreilly.com/learning/how- can-i-tokenize-a-sentence-with-python https://demos.explosion.ai/displacy Tokenization result: ['Get', 'me', 'fourteen', 'chickens', '.']
  • 59. Speech-to-Text in Python Use SpeechRecognition 3.6.5 Python library https://pypi.python.org/pypi/SpeechRecognition/ Good blog post by Gurwinder Gulati here https://ggulati.wordpress.com/2016/02/24/coding-jarvis-in-python-3-in-2016/ Can also use WaveNet. TensorFlow implementation: https://github.com/buriburisuri/speech-to-text-wavenet WaveNet paper: https://arxiv.org/abs/1609.03499 Sphinx doesn’t work well for me. I use Google Cloud Speech API https://cloud.google.com/speech/ Look at: https://github.com/Uberi/speech_recognition/blob/master/speech_recognition/__init__.py My modified version of Gurwinder’s blog post
  • 60. Text-to-Speech in Python Can also use WaveNet https://github.com/ibab/tensorflow-wavenet
  • 61. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 62. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 63. Additional resources not previously mentioned • Jurafsky https://web.stanford.edu/class/cs124/lec/chatbot.pdf • Jurafsky and Martin, Speech and Language Processing, Ch. 24, 2009 • New edition in progress https://web.stanford.edu/~jurafsky/slp3/ • Cathy Pearl, Designing Voice User Interfaces, 2016 Detailed resources are surprisingly hard to find
  • 64. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 65. Talk outline What conversation is The current state of chatbots • Purposeless mimicry agents • Intention-based agents • Conversational agents Other plumbing Additional resources Conclusion
  • 66. Conclusion (1 of 3) A B block pillar slab beam We can program this in Computers need to know our conventions
  • 67. Conclusion (2 of 3) sensation representation action “beam” • Conventions need to be grounded in a system of sensation and action • Hard when machines don’t have our bodies and experience • Blog post of wrote in using physics simulations for natural language understanding https://chatbotslife.com/computers-could-understand-natural-language-using- simulated-physics-26e9706013da
  • 68. Conclusion (3 of 3) A fishing pole is a stick, string and hook You can catch fish with a fishing pole Get me some fish Acknowledgement Acknowledgement Break Break Machines also need to know the rules of conversation, so they can understand meanings beyond words. And they need to understand meanings from how words are said. I want me and my bot to have our own culture. This ability to negotiate meaning is what we would need.