ML & Chatbots workshop

ML & Chatbots workshop

8a235da15adae86851fa3216834198ed?s=128

Lee Boonstra

July 08, 2019
Tweet

Transcript

  1. Nederlandse Spoorwegen Machine Learning Workshop Tessa Reef Lee Boonstra 8

    July 2019
  2. ▶ 11.00 - 11.30 Arrival/coffee & Intro by Tessa ▶

    11.30 - 12.30 Chatbots & Google Assistant by Lee ▶ 12.30 - 13.00 Lunch ▶ 13.00 - 14.00 Cloud AI by Lee ▶ 14.00 - 14.15 Quiz - (Win a Google Home!) ▶ 14.15 - 14.30 Conclusions by Tessa Agenda
  3. Lee Boonstra @ Google Customer Engineer, Google Cloud (2,5 years)

    Dialogflow Expert Chapter Lead ERG Gayglers Public Speaker (since 2013) Writer/Blogger for Techzine, .Net Magazine, Marketingfacts.nl, CustomerTalk.nl and Google Cloud Blog www.leeboonstra.com
  4. Lee Boonstra before Google Book Writer O’Reilly (Hands-on Sencha Touch

    2, mobile web development) Technical Trainer @ Sencha Inc. 2012 - 2016 Lead Client-side Engineer @ Valtech 2009 - 2012 Senior Java Developer @ Accenture 2007 - 2009 Founder of my own company 2004 www.leeboonstra.com
  5. Improve your customer care by building an AI platform with

    the use of Google Cloud Lee Boonstra Sales engineer Google Cloud
  6. Chatbots are expected to trim business cost by more than

    $8 billion per year by 2022 Juniper Research
  7. Chatbots exists since the 90’s… So why are they popular

    now?
  8. FIRST CHATBOT, 1994

  9. SHIFT FROM A MOBILE FIRST TO AN AI FIRST STRATEGY

  10. HOW DID YOU LEARN YOUR FIRST LANGUAGE?

  11. 11 Chatbots is all about Machine Learning! • Natural Language

    Understanding • Intent Matching • Speech to Text • Text to Speech (Wavenet)
  12. How to create chatbots?

  13. None
  14. GOOGLE CLOUD HAS OVER 100 BUILDING BLOCKS INSTEAD LET’S FOCUS

    ON SOLUTIONS
  15. Introducing Cloud AI Less ML expertise More ML expertise Cloud

    AI solutions Cloud Job Discovery Contact Center Document Understanding Cloud AI building blocks Cloud AI platform Cloud ML Engine Cloud Video Intelligence ML professionals & service partners ASL Professional Services Organization Cloud AutoML Vision Vision Cloud Vision Language Cloud Natural Language Cloud AutoML NL Dialogflow Enterprise Cloud Translation Cloud Speech-to-Text Cloud Text-to-Speech Cloud AutoML Translation New New New Cloud GPU Cloud TPU Cloud Dataflow Cloud Dataproc Machine & Deep Learning ML accelerators ML libraries Tensorflow Kubeflow Kaggle/datasets Datasets
  16. 16 • Previously known as API.AI ◦ (Sept 2016, acquired

    by Google) • Powered by Machine Learning: ◦ Natural Language Understanding (NLU) ◦ Intent Matching ◦ Conversation Training • Cross platform • Build faster with the Web UI • Scalable: separate your conversation text from code • Speech / Voice Integration • Multi-lingual bot support (20+ languages) • Direct integration with 15+ channels like Google Assistant, Slack, Twilio, Facebook... Development suite for building Conversational UIs.
  17. Dialogflow for Enterprises • Built on Google Cloud Platform infrastructure,

    easy integration with over 100 Cloud components • Cloud Support and SLA available • Compliance • Extensive Documentation and training programs available. • Powerful IAM; User Roles and Permissions • Stackdriver integration for automatic logging, debugging, tracing and error reporting • Unlimited API call quotas
  18. Types of Chatbots and the use cases

  19. Three types of chatbots Chatbots Chatbots in websites, apps, or

    on social media like Facebook Messenger, Slack.... Voice Activated Speakers Smart Assistants, like Google Assistant, Alexa, Siri, on mobile phones and devices like Google Home, Google Hub, Watches, TVs... Callbots Chatbots integrated in IVR systems, phone reservation systems, contact centers...
  20. Chatbot / Web Chatbot • Chatbots for internal processes. •

    Chatbots that face customers. • Chatbots to collect feedback. • Topic Modelling • Chatbots for intent matching (Natural Language for Searching on websites.) • Chatbots on social media.
  21. Use Case: ING Bank Public facing chatbot Inge of ING

    Bank. Customers can ask ‘Inge’ information about their accounts and debit cards. Inge can detect the sentiment. When customers get frustrated, it will automatically route the user to a human agent.
  22. Architecture: Chatbots Dialogflow Enterprise Website Human Agent

  23. Google Assistant Action • Voice interface will be the future,

    since it’s very accessible. • Google Assistant has over 1 billion of users. • According to Adobe Analytics, 71% of owners of smart speakers use voice assistants at least daily, and 44% using them multiple times a day. • Extend the Google Assistant with your apps. Users expect your brand to be available on smart speakers.
  24. Use Case: Rabobank Ok Google, talk to Rabobank. The Rabobank

    Assistant can help you with banking via voice. You can request your balance, transfer money or set budget notifications. It’s available in multiple languages for Google Assistant on mobile devices and on the Google Home.
  25. Confidential + Proprietary Confidential + Proprietary You will need to

    design your conversation
  26. 26 Website Filter on account name or account number Lot’s

    of results on a screen.
  27. 27 Website with Natural Language... Natural way of asking!

  28. 28 How much have I spent on taxis last month?

    It looks like, you spent about 20 euros on taxis last month. You took the TCA taxi twice. Voice channels There’s no screen. Focus on the conversation.
  29. 29 It looks like, you spent about 20 euros on

    taxis last month. You took the TCA taxi twice. Here’s an overview: Voice channels with screens How much have I spent on taxis last month? Focus on the conversation. But also display stuff.
  30. 30 Assistance is not just about voice

  31. Confidential + Proprietary Confidential + Proprietary What happens under the

    hood?
  32. Google | Proprietary & Confidential 32 GOOGLE ASSISTANT USER Hey

    Google.. Idle
  33. Google | Proprietary & Confidential 33 GOOGLE ASSISTANT USER Hey

    Google.. ..will it rain today? Listening
  34. Google | Proprietary & Confidential 34 GOOGLE ASSISTANT USER WEB

    SERVER Hey Google.. ..will it rain today? GET www.weather.com/info city: Amsterdam Date: 2019-02-06 Recognizing
  35. Google | Proprietary & Confidential 35 GOOGLE ASSISTANT USER WEB

    SERVER Hey Google.. ..will it rain today? GET www.weather.com/info city: Amsterdam Date: 2019-02-06 { location: “amsterdam” weather: “rain”, temperature: 8 } Thinking
  36. Google | Proprietary & Confidential 36 GOOGLE ASSISTANT USER WEB

    SERVER Hey Google.. ..will it rain today? GET www.weather.com/info city: Amsterdam Date: 2019-02-06 { location: “amsterdam” weather: “rain”, temperature: 8 } Yes, it will rain in Amsterdam all day today. Speaking
  37. Confidential + Proprietary Confidential + Proprietary How can you build

    your own action on top of the Google Assistant?
  38. 38 3rd party integration Extend the Google Assistant with your

    own custom actions. Hey Google, let me talk to BookAMeetingRoom Welcome, how can I help you? I want to book a meeting room for 3 persons. Let’s get BookAMeetingRoom Sure, for when? Tomorrow, from 2pm to 3pm.
  39. 39 Ok Google, talk to __________. Ok Google, connect me

    with __________. Ok Google, get __________. Start a 3rd party action There is an app directory! (appstore). And the Google Assistant can give app suggestions.
  40. 40 • Write the conversation - Dialogflow (Enterprise) • Deploy

    on GA+ UX components - Actions on Google Optional: • Back-end integration - Fulfillment app (dialogflow/aog SDK) • Communication to back-ends - Your own APIs What do I need to build my own action?
  41. 41 • Bring your agents to smart speakers (Google Home)

    or phones (Android, iOS app) • Actions on Google includes: ◦ UI toolkit, ◦ Audio toolkit ◦ Account Linking API ◦ SDKs ◦ tutorial guides • UI components such as: ◦ Buttons, Images ◦ Cards, Carousels, ◦ Lists ◦ Tables Program for developers of Actions (“apps”) that run via Google Assistant Actions on Google
  42. Architecture: Google Assistant Dialogflow Enterprise Google Assistant

  43. Contact Center Frustrations • Long waiting / hold times •

    Unlimited Call transfers • IVR difficult to navigate • Availability • Inadequate information • Agents have to answer same types of questions over and over again.
  44. With AI in your Contact Center Bots that listen and

    give on screen solutions to the human agent. • Always answers the right question. • Shorten hold times • Shorten the call time Bots that understand your question. • No longer you need to listen to audio recordings & press keys. • You don’t need to be transferred from one agent to the other Bots that can answer / resolve common questions. • Shorten hold times • Shorten the call time • Availability • No longer you’ve been told to look on the website
  45. Use Case: Health Insurance The (health) insurance sector deals with

    contact center spikes. At the end of the year, customers are able to change their insurance. Which results in long waiting times and students that aren’t trained, picking up the phone. Calls needs to be monitored, to gather analytics about the type of questions and provided service.
  46. Architecture: Contact Center without AI Call Center Agent

  47. Architecture: Contact Center Dialogflow Enterprise Agent Assist Call Center Agent

    Text to S Speech
  48. Demo’s

  49. Babs the Banking Bot Web Chat Google Assistant Hey Google,

    let me talk to Babs The Banking Bot Welcome, how can I help you? I want to transfer money. Let’s get Babs the Banking Bot How much do you want to transfer? 100 euro.
  50. Which customers are unhappy and why? (Analytics)

  51. How can I improve the user experience? (Analytics)

  52. Collect real-time chats from Dialogflow SDK

  53. Mask sensitive Information with DLP API

  54. Understand the text with NLP API

  55. Store all data in a data-warehouse

  56. Optimize your agent

  57. Confidential + Proprietary Advanced Chatflow with machine learning bot analytics

    User types to custom UI or channel Chatbot replies Dialogflow Enterprise Customer Client JS Angular 5 web front-end Kubernetes Engine Chat Server Dialogflow SDK / socket.io Kubernetes Engine Back-end CRM Python / Django Kubernetes Engine Container Registry Containers images can be stored in the Container Registry Messaging Publisher Pub/Sub Webhook Router Cloud Function Webhook Container Builder Building Dev Pipelines
  58. Confidential + Proprietary Advanced Chatflow with machine learning and bot

    analytics User types to custom UI or channel Chatbot replies Dialogflow Enterprise Customer Client JS Angular 5 web front-end Kubernetes Engine Chat Server Dialogflow SDK / socket.io Kubernetes Engine Back-end CRM Python / Django Kubernetes Engine Subscription Cloud Function Sensitivity Filter DLP API Sentiment Detector NLP API Data Warehouse BigQuery Messaging Publisher Pub/Sub Webhook Router Cloud Function Webhook
  59. Cloud AI: Make your workloads smarter Lee Boonstra Sales engineer

    Google Cloud
  60. Why now? • Amount of data Better Models More Computing

    Power
  61. Machine Learning to classify things Dog vs. Mop Oh, that’s

    easy...
  62. Wait what?!

  63. We would need machine learning to give us results Confidence

    level
  64. It’s inspired by how our brains work Neural Networks

  65. It’s easier to make computers learn than to build smarter

    computers
  66. Why Google? Data Scientists use Tensorflow Tensorflow is what we

    use for our own internal machine learning projects, and now it’s available to you! Google made it open source. • More than 480 contributions • 10,000 commits in a year • 53k star rating http://www.tensorflow.org
  67. Google is an AI company Used across products: Unique project

    directories Time
  68. Confidential + Proprietary Confidential + Proprietary What’s the state of

    the industry?
  69. Very few people can create custom ML models today Who

    can actually use AI today? 10K DL researchers 2M ML experts +23M Developers +100M Business users
  70. Compute is Critical 80% of recent AI advances can be

    attributed to more available computing power Dileep George, Cofounder of the Machine Learning Startup Vicarious
  71. CLOUD AI PLATFORM’S GOAL Enable generalist software engineers to easily

    build and run custom AI applications anywhere.
  72. How do you go from data to intelligent actions?

  73. Three ways to go from data to intelligent actions Train

    Custom ML Model • Need a custom ML model • Have a team of data scientist • Run Hybrid / On-premise Pretrained Google ML Models • Don’t have much data • Have a team of developers • Run as full AI solution (no developers or data scientists needed) Retrain a Google ML Model • Need a custom ML model • Have a team of developers
  74. Introducing Cloud AI Less ML expertise More ML expertise Cloud

    AI solutions Cloud Job Discovery Contact Center Document Understanding Cloud AI building blocks Cloud AI platform Cloud ML Engine Cloud Video Intelligence ML professionals & service partners ASL Professional Services Organization Cloud AutoML Vision Vision Cloud Vision Language Cloud Natural Language Cloud AutoML NL Dialogflow Enterprise Cloud Translation Cloud Speech-to-Text Cloud Text-to-Speech Cloud AutoML Translation New New New Cloud GPU Cloud TPU Cloud Dataflow Cloud Dataproc Machine & Deep Learning ML accelerators ML libraries Tensorflow Kubeflow Kaggle/datasets Datasets
  75. Train a custom machine learning model Support for custom ML

    Models Cloud AI Platform Hardware optimised for your problem Cloud TPU, GPU, CPU Any ML framework Cloud ML Engine Managed Portable Portable & Open Kubeflow One stop AI catalog AI Hub
  76. ML Engine - Managed Machine Learning End to End Machine

    Learning pipeline Data ingestion 1 Data analysis 2 Data transformation 3 Train 4 Model evaluation 5 Model validation 6 Deploy 7 Pub/Sub Data studio Datalab Dataproc Dataflow Dataprep BigQuery
  77. ML Engine - Managed Machine Learning End to End Machine

    Learning pipeline Data ingestion 1 Data analysis 2 Data transformation 3 Train 4 Model evaluation 5 Model validation 6 Deploy 7 • Managed service to make training & prediction easy • Easy distributed training • Hyperparameter tuning • Top 4 frameworks • Custom container support coming soon
  78. Kubeflow Run portable & scalable ML workloads on Open Source

    Kubernetes Easy to get started • Out-of-box support for top frameworks ◦ pytorch, caffe, tf and xgboost • Kubernetes manages dependencies, resources Swappable & scalable • Library of ML services • CPU, GPU, TPU • Massive scale Meet customer where they are • GCP • On-prem ML microservices Kubernetes Cloud On-prem Training Predict Training Predict … …
  79. AI Hub One stop AI catalog Easily discover plug &

    play pipelines & other content built by Google AI. 01 Private hosting Host pipelines and ML content with private sharing controls within an enterprise to foster reuse within organizations. 02 Easy deployment on GCP and hybrid Deploy pipelines via Kubeflow on GCP and on premise. 03 (g.co/aihub)
  80. What is included? Kubeflow (On premises) AI Platform Integrated with

    Deep Learning VM Images Cloud Dataflow Cloud Dataproc Google BigQuery Cloud Dataprep Google Data Studio Notebooks Data Labeling Training Predictions Pre-built Algorithms For data warehousing For data transformation For data cleansing For Hadoop and Spark clusters For BI dashboards AI Hub
  81. Cloud Datalab OSS Jupyter notebook GCP integrations (BigQuery, Cloud Storage,

    etc) Run locally or powered by GCE
  82. Cloud TPU Offering Cloud TPU v2 180 teraflops 64 GB

    HBM training and inference Cloud TPU v2 PodALPHA 11.5 petaflops 4 TB HBM 2-D toroidal mesh network training and inference Cloud TPU v3ALPHA 420 teraflops 128 GB HBM training and inference
  83. None
  84. Use Pre-trained Google machine learning model Sight Cloud Vision Cloud

    Video Intelligence Language Cloud Translation Cloud Natural Language Conversation Cloud Speech-to-Text Dialogflow Enterprise Edition Cloud Text-to-Speech
  85. Speech API (STT) Powered by deep learning neural networking to

    power your applications.. No need for signal processing or noise cancellation before calling API. Can handle noisy audio from a variety of environments. Noise Robustness Can provide context hints for improved accuracy. Especially useful for device and app use cases. Word Hints Speech Recognition Recognizes over 80 languages & variants. Can also filter inappropriate content in text results Over 80 languages Can stream text results, returning partial recognition results as they become available. Can also be run on buffered or archived audio files. Real-time results
  86. API Usage: Understand Speech - Batch Stored Audio Recognized text

    Speech API Create JSON request with the audio file and language of audio (default is en_US) Process the JSON response Call the REST API 1 2 3
  87. API Usage: Understand Speech - Streaming Streaming Audio Speech API

    gRPC Recognized Text gRPC streaming request with initial context Real time streaming results while speaking Bi-directional: Streams audio in while stream text out 1 2 3
  88. 88 • Native audio responses, complementing existing Speech-to-Text capability. •

    Uses DeepMind’s WaveNet technology (It closes the voice-quality gap with human voice (based on the Mean Opinion Score for voice quality) by over 70 percent.) • Also used for Phone Calls, when making use of the Phone Gateway. • Device Profiles (Shape the waveform differently, depending on the speaker you use.) • You will need to enable Automatic Text to Speech in Settings/Speech menu. Text to Speech (TTS)
  89. 89 • Deep generative model of raw audio waveforms •

    Voices sound natural and unique • Capture subtleties like pitch, pace, and all the pauses that convey meaning • Create New voices in weeks i.s. Months https://deepmind.com/blog/wavenet-generative-model-raw-audio/ DeepMinds WaveNet Technology
  90. Natural Language API Identify entities and label by types such

    as person, organization, location, events, products and media. Enables you to easily analyze text in multiple languages including English, Spanish and Japanese. Extract tokens and sentences, identify parts of speech (PoS) and create dependency parse trees for each sentence. Syntax analysis Entity Recognition Multi-Language Support Understand the overall sentiment expressed in a block of text. Sentiment Analysis
  91. DLP API (Data Loss Prevention) • Mask, redact, and generalize

    PII and sensitive data with Machine Learning • Scan for and anonymize sensitive data to comply with regulations or policies (text, text on file system, Cloud Storage, DataStore, BigQuery) • Clear reporting for review and auditing
  92. Translation API 100+ languages: from Afrikaans to Zulu. Automatically identify

    languages wiht high accuracy. Easy to use Google REST API. You don’t have to extract text from you document. Just send it HTML documents and get back translated text. Can seamlessly scale with almost any volume. If a higher quota is needed, you can simply request an increase. Highly scalable The Premium edition is tailored for users who need precise, long-form translation services (e.g. livestream translations, high volume of emails, detailed articles and documents) Premium edition BETA Detect + translate Simple integration TRY THE API
  93. Vision API Detect broad sets of categories within an image,

    ranging from modes of transportation to animals. Analyze facial features to detect emotions: joy, sorrow, anger. Detect logos. Detect and extract text within an image, with support for a broad range of languages, along with support for automatic language identification. Extract text Detect different types of inappropriate content from adult to violent content. Powered by Google Safe Search Detect inappropriate content Object Recognition Facial sentiment & logos
  94. Video Intelligence API Detect entities within the video, such as

    "dog", "flower" or "car". You can now search your video catalog the same way you search text documents.. Extract actionable insights from video files without requiring any machine learning or computer vision knowledge. Enable Video Search Label Detection Insights From Videos
  95. Demo’s

  96. Use Pre-trained Google machine learning model Sight AutoML Vision AutoML

    Video Intelligence Language AutoML Natural Language AutoML Translation Structured Data AutoML Tables
  97. Retrain a Google machine learning model Cloud AutoML Dataset Train

    Deploy Serve Generate predictions with a REST API
  98. Auto ML Custom task Generic task Someone else has solved

    this before Trained on common classes Specific to your dataset ML APIs TensorFlow “cat” “bob” AUTO ML Developer Data Scientist Developer or Data scientist
  99. UPDATE DEPLOY EVALUATE TUNE ML MODEL PARAMETERS ML MODEL DESIGN

    DATA PREPROCESSING Introducing Cloud AutoML A technology that can automatically create a Machine Learning Model UPDATE DEPLOY EVALUATE TUNE ML MODEL PARAMETERS ML MODEL DESIGN DATA PREPROCESSING
  100. Via a web interface you will go through these steps

    1 3 4 5 Upload Labeled Data Evaluate Predict Iterate (if needed) 2 Train
  101. Optimize the pre-trained models with your own data Auto ML

    • Create models for your own domain, but use the Google pre-trained models as a base. ◦ Vision, Translation, or NLP • Web Interface, to upload a CSV with labeled data. • Your use-case is: ◦ Not supported by pre-built APIs AND ◦ Has sufficient labeled training data • You want to get to produce a model and predict quickly • You don’t want to build a model from scratch
  102. Demo’s

  103. Conclusion

  104. Confidential + Proprietary Wouldn’t it be nice to build one

    AI solution that can answer all questions and is available from anywhere
  105. BigQuery Dialogflow Enterprise Text to S Speech Google Assistant Website

    Social media Channel Agent Assist Call Center Agent Your System Social media Channel
  106. Confidential + Proprietary But if even if you just add

    one new AI channel. You can improve your customer experience and trim business costs.
  107. Like smart assistants... Dialogflow Enterprise Google Assistant Call Center Agent

  108. Thank you! My Examples http://www.futurebank.nl https://github.com/savelee/kube-django-ng https://github.com/GoogleCloudPlatform/tulip My Blue print

    https://cloud.google.com/blog/products/ai-machine-learnin g/simple-blueprint-for-building-ai-powered-customer-servi ce-on-gcp