19/07/2018
Come sviluppare un chatbot capace di interagire con gli utenti e i device? Introduzione al conversation design - la disciplina che si occupa di disegnare e curare il linguaggio di un'interfaccia, basandosi sulla conversazione umana - e dimostrazione pratica dello sviluppo di un chatbot per Google Home tramite Dialogflow e Node.js.
2. Gianfranco Bottiglieri
● Junior Node.js Java
Developer
● Docente in Academy
Ci presentiamo
Theodor Dumitrescu
● Junior Java
Developer
● CoderDojo
Champion
● Conversation
Designer
3. Copyright 2011 - 2018, ThinkOpen S.r.l.
Chatbot
is a computer program or an artificial intelligence which conducts a
conversation via auditory or textual methods
3
5. Copyright 2011 - 2018, ThinkOpen S.r.l.
Tool di sviluppo
5
ACTION ON GOOGLE https://developers.google.com/actions/
DIALOGFLOW https://dialogflow.com/
6. Copyright 2011 - 2018, ThinkOpen S.r.l.
Actions On Google: create the project
6
7. Copyright 2011 - 2018, ThinkOpen S.r.l.
Actions On Google: create the project
7
10. Copyright 2011 - 2018, ThinkOpen S.r.l.
Dialogflow: create the first intent
10
11. Copyright 2011 - 2018, ThinkOpen S.r.l.
Dialogflow: the elements of an intent
11
12. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: training phrases
12
Dialogflow works taking some sample
user sentences to start out with. Then,
it trains it’s engine to generate an
algorithm that best matches these
sentences to the correct intents
13. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: events
13
Events is a feature that
allows you to invoke
intents by an event name
instead of a user query.
14. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: context
14
Contexts represent the
current context of a user's
request. This is helpful for
differentiating phrases
which may be vague or
have different meanings
depending on the topic of
conversation.
15. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: parameters
● Required – defines whether this
parameter is obligatory for the action.
● Entity – map the parameters to a
default or custom entity
● Value – we can simply use the value
name and the parameter will be
substituted in its place in a response
● Is List – if the parameter could be
found more times in a query
● Prompts – what should the agent say
while prompting the user for the
parameters?
15
16. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: responses
16
17. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: fulfilment
17
18. Copyright 2011 - 2018, ThinkOpen S.r.l.
The elements of an intent: fulfilment
18
A webhook in web
development is a method of
augmenting or altering the
behaviour of a web page, or
web application, with custom
callbacks. These callbacks
may be managed by
third-party developers who
may not necessarily be
affiliated with the originating
website or application.
19. Copyright 2011 - 2018, ThinkOpen S.r.l.
App with dialogflow from actions-on-google
19
25. Copyright 2011 - 2018, ThinkOpen S.r.l.
Awesome code is nothing
without an awesome
conversational flow
25
26. Copyright 2011 - 2018, ThinkOpen S.r.l.
Teach computers to talk to
humans and not the other way
26
27. Copyright 2011 - 2018, ThinkOpen S.r.l.
See the bot as a character
from a comics
27
28. Copyright 2011 - 2018, ThinkOpen S.r.l.
Conversational flow characteristics
● speed
● simplicity
28
hard
● clean conversation
● crips
● not designed for long engagement
29. Copyright 2011 - 2018, ThinkOpen S.r.l.
Design flows outside the box
29
prototype the flows
register yourself and act as the persona and the user
30. Copyright 2011 - 2018, ThinkOpen S.r.l.
Think through the conversation flow
30
● why is so?
● try to understand the context
○ when it evolve in this way?
○ at what time?
○ on which device?
● understand the errors from the user perspective
31. Copyright 2011 - 2018, ThinkOpen S.r.l.
Don’t repeat yourself
31
● prepare multiple response for the same intent
● use the context
○ take care about multiple vision
○ never go in circle
32. Copyright 2011 - 2018, ThinkOpen S.r.l.
Let the conversation flow naturally
32
● creating acknowledgement messages in complex flows
● splitting long questions in follow-up
● providing suggestions
● restoring the context when a new conversation start
● analysing the tone of the conversation
● learning how to say “no”
● crafting clever responses to cover all ground