Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Chatbots, et si on passait la seconde ? (DevFest Lille 2018)

Chatbots, et si on passait la seconde ? (DevFest Lille 2018)

Après l’étape de conception du persona de votre chatbot, de ses dialogues, il est maintenant temps de passer la seconde et de se plonger dans des sujets plus avancés. Nous allons continuer notre exploration de Dialogflow, de la plateforme Actions on Google, pour parler d’authentification des utilisateurs (par exemple, avec “account linking”), comment peut-on effectuer des transactions, comment au mieux tirer parti de la “surface” d’utilisation (téléphone, enceinte connectée), ou bien quelles informations peuvent être demandées (localisation, adresse, nom, etc.)

Guillaume Laforge

June 21, 2018
Tweet

More Decks by Guillaume Laforge

Other Decks in Technology

Transcript

  1. Chatbots, et si on passait la seconde ? Wassim Chegham

    | SFEIR | @manekinekko Guillaume Laforge | Google | @glaforge
  2. Major shift in computing every 10 years Mainframe Desktop Internet

    Mobile AI/Assistants 2017 2007 1997 1987 1977
  3. Japanese German FR French CA French Korean UK English AU

    English CA English US English Italian Spanish BR Portuguese LATAM Spanish Hindi & IN English A growing audience: languages Swedish Danish Norwegian Indonesian Russian Thai Dutch
  4. Devices with the Google Assistant built-in These include voice activated

    speakers like Google Home, Android phones, iPhones etc. The Google Assistant A conversation between you and Google that helps you get things done in your world. Actions on Google How developers can extend the assistant
  5. Ok Google, talk to Personal Chef Sure, here’s Personal Chef

    What are you in the mood for? What protein would you like to use? Speech to Text NLP Knowledge Graph ML Ranking User Profile Speech to Text Text to Speech ... Invoke Personal Chef action Parse query and generate response Well, it’s kind of cold outside, so I’d like... Text to Speech
  6. Well, it’s kind of cold outside, so I'd like something

    to warm me up, like a hot soup, and I want it fast.
  7. “ Intent Matching — Match and categorize user utterances to

    an intent. Entity Extraction — Identify key words and phrases spoken by the user. @
  8. Ok Google, talk to Personal Chef Sure, here’s Personal Chef

    What are you in the mood for? What protein would you like to use? Speech to Text NLP Knowledge Graph ML Ranking User Profile Speech to Text Text to Speech ... ... ... Trigger WELCOME event ... NLP: Intent Matching Entity Extraction Well, it’s kind of cold outside, so I’d like... Text to Speech
  9. Intent name An Intent represents a mapping between what the

    user says and what action should be taken by your software. Each Action can have many intents, which will provide different experiences to the user.
  10. Training Phrases Triggered via a series of “user says” phrases

    or platform based events Can collects entity values Matched at every turn of conversation
  11. Parameters Values that we are trying to capture from the

    user phrases Can specify a parameter name and a type of value Values can be optional Values can be a list of fixed values
  12. Entities (slot-filling) Values that we are trying to capture from

    the user phrases Can specify a parameter name and a type of value Values can be optional Values can be a list of fixed values
  13. • Time • Date • Time Period • Number •

    Cardinal • Ordinal • Temperature • Speed • Volume • Weight • Age • Currency • Country • Location • Language • Artist • Music • …. System Entities
  14. Specify follow up questions if a user doesn’t specify certain

    values Read out in random order to make it more natural Prompts
  15. Test Console Test your agent by entering text or voice

    requests. Voice testing is available in Chrome and Firefox browsers.
  16. const { dialogflow, Suggestions, SimpleResponse } = require('actions-on-google'); const app

    = dialogflow(); // Say a fact app.intent('tell_fact', (conv, {category}) => { conv.ask('Actions are easy to build!'); conv.ask(new Suggestions('Tell me more')); }); // The entry point to handle a http request exports.factsAboutGoogle = functions.https.onRequest(app); Node.js Client library https://github.com/actions-on-google/actions-on-google-nodejs
  17. Support speech and display text https://developers.google.com/actions/assistant/responses conv.ask(new SimpleRespone({ speech: 'Howdy!

    I can tell you fun facts about ' + 'almost any number, like 42. What do you have in mind?', text: 'Howdy! I can tell you fun facts about ' + 'almost any number. What do you have in mind?' }));
  18. Guide the user (suggestion chips) https://developers.google.com/actions/assistant/responses conv.ask(new SimpleRespone({ speech: 'Howdy!

    I can tell you fun facts about ' + 'almost any number, like 42. What do you have in mind?', text: 'Howdy! I can tell you fun facts about ' + 'almost any number. What do you have in mind?' })); conv.ask(new Suggestions(['0', '42', '100', 'Never mind']));
  19. Display basic cards https://developers.google.com/actions/assistant/responses conv.ask('Math and prime numbers it is!')

    conv.ask(new BasicCard({ text: '42 is an even composite number. It is composed of three distinct prime ' + 'numbers multiplied together. It has a total of eight divisors. 42 is an ' + 'abundant number, because the sum of its proper divisors 54 is greater ' + 'than itself. To count from 1 to 42 would take you about twenty-one…', title: 'Math & prime numbers', buttons: new Button({ title: 'Read more', url: 'https://example.com', }), image: new Image({ url: 'https://example.google.com/42.png', alt: 'Image alternate text', }), }));
  20. Used for easy selection <10 items Used for comparison <30

    items Lists and carousels for selection https://developers.google.com/actions/assistant/responses
  21. Google Home Mobile Device NAME Registered device user’s full name

    Registered device user’s full name DEVICE_COARSE_LOCATION Zip code and city N/A DEVICE_PRECISE_LOCATION Coordinates and street address Coordinates Q: "Recommend me a local bookstore" A: "To find bookstores near you, I'll just need to get your zip code from Google. Is that okay?" Ask for information https://developers.google.com/actions/assistant/helpers#user_information conv.ask(new Permission({ context: 'To find bookstores near you', permissions: 'DEVICE_COARSE_LOCATION', }));
  22. Seamless account linking with Google Sign-in Link an account to

    your OAuth2 server https://developers.google.com/actions/identity/
  23. • Build orders • Use Google provided payment instrument •

    Use your payment processor (Stripe, Braintree, Vantiv, more coming) • Update order statu Transact with the user https://developers.google.com/actions/transactions (check policies and guidelines for availability)
  24. Smart Home Device Integration developers.google.com/actions/smarthome/ Dim the lights in the

    living room a little bit. What lights are on in the living room? Make it warmer. Turn off all the lights. What is the temperature inside? How many lights are on?
  25. Template features developers.google.com/actions/templates Create an Action within minutes Choose a

    pre-defined personality Build without code (Google Sheets) Expand to different languages (Trivia only)
  26. Ok Google, ask Personal Chef for a hot soup recipe

    Trigger Phrase Action Name Developer Specified Action Preposition Action Phrase Developer Specified Working Examples: Let’s speak to Domino’s Ask Dr. Doggy if dogs can eat chocolate Ok Google, let’s talk to Personal Chef Trigger Phrase Action Name Developer Specified In Dialogue Discovery: Explicit Triggering
  27. In Dialogue Discovery: Implicit Triggering Hey Google, I want to

    work out. Hey Google, I want to play a game. Hey Google, what’s the surf report? Hey Google, tell me a joke.
  28. Naming ✕ One-Word Names ✕ Common Phrases ✕ Generic Words

    ✕ Reserved words: OK, Google, Volume up, Game, Bot, Action, App
  29. Console bit.ly/buildactions-console Build with Templates developers.google.com/actions/templates Build with Dialogflow developers.google.com/actions/dialogflow

    Build with Actions SDK developers.google.com/actions/sdk Resources to get started and supported Documentation developers.google.com/actions Codelabs codelabs.developers.google.com Write and Deploy Functions bit.ly/firebase-get-started Deploy your fulfillment webhook using Cloud Functions for Firebase bit.ly/aog-cloud-functions
  30. Actions on Google Community Program developers.google.com/actions/community You are automatically invited

    to the program with publishing your first Action and will receive a Cool T Shirt + $200 Cloud Credits per month for a year The Assistant team also recognizes milestones: Traction Engagements Globalization
  31. Actions on Google Developer Community https://g.co/actionsdev Actions on Google Developers

    https://developers.google.com/actions Wassim Chegham SFEIR @manekinekko Actions on Google Twitter https://twitter.com/actionsongoogle #AoGDevs Guillaume Laforge Google @glaforge