Webinar and Live Demo given 6/25. https://ahoy.twilio.com/devgen_webinar_autopilot
GitHub repo with code: https://github.com/elizabethsiegle/autopilot_build_chatbot_with_machine_learning_webinar
What will we cover?
Subsets of machine learning and their different use cases, particularly pertaining to communication apps
Start off with a meme: Jokes aside, AI is more than if/else statements. Although here’s a secret, don’t tell my manager: I sometimes do still make chatbots using if/else statements, BUT we will see other tools, such as Twilio Autopilot, make it easy to handle user input without conditionals.
What’s the deal with AI, ML, and DL?
AI can be defined in multiple ways, particularly, as an automated system able to analyze data and make choices autonomously. SO this is what often leads people to connect AI to chatbots.
Machine learning is a subset of AI that uses algorithms to parse data, learn from that data, and make decisions based on that data and what it has learned.
Deep learning is subset of ml and also a subset of ai that structures algorithms in layers to make an “artificial neural network” that can learn and make intelligent decisions on its own. While both ML and DL fall under the broad category of AI, deep learning powers the more human-like artificial intelligence.
Natural Language Processing is the cornerstone of artificial intelligence, machine learning and linguistics. Decipher, understand, make sense of human languages in a manner that is valuable. Many NLP tasks make life easier for your users, such as spam detection, question answering, autocomplete, predictive typing, (click) detecting toxic chat messages, etc.
Subset of NLP= NLU, the processing chain that makes sense of the phrase. This is where the intention of text will be identified
Some fairly-common ML vocabulary.
Actions in Weak AI systems are pre-programmed by a human, are trained for a single task, and can only merely simulate human behavior. Examples of Weak AI include navigation systems, character recognition, and suggestions for corrections in searches, Alpha Go, Deep Blue who plays chess. On the other hand…
strong AI uses more complex algorithms to help it better act in different situations. They have a mind of their own. When presented with a situation it does not know or is unfamiliar with, it has enough intelligence to come up with a solution. This does not really exist yet, but examples would include Skynet, Terminator, C3Po…
Simplification of human brain: Neural networks can adapt to changing input; so the network generates the best possible result without needing to redesign the output criteria. Useful in generating text, music, predicting what’s next like in predictive analysis, image recognition, and speech processing.
Chatbots can be limited and get stuck—have you ever ordered a pizza via phone with a bot and try to change your order? In cases like answering questions or FAQs, play you a song or tell you the weather, chatbots can handle restaurant orders, take in answers about finances, schedule an appointment, and more.
Even more subsets of AI, which is a large over-arching subject, and what you can do with it (especially with Twilio and communication apps)
Computer vision is a field of AI that trains computers to interpret and understand the visual world. Machines can accurately identify and locate objects then react to what they “see” using digital images from cameras, videos, and deep learning models. Image classification (that is pizza in an image!), object detection (identify object location, how many are in image…), pose detection, facial recognition which is not very secure, detecting if someone is wearing a mask or touching their face…so many applications you can add to your applications and companies, especially when more and more meetings are happening over video and phone!
Real-time analysis of a phone call: extracting information/keywords or phrases from a long phone call or document, document summarization, speech recognition
Almost all of AI’s recent progress is through one method, where some input data (A here) generates some response (B). This requires a huge amount of data like you need to show the system a lot of examples of both A and B. As in, (click) I wanted to build a photo classifier determining if an image was a corgi or a blueberry requires anywhere from tens to hundreds of thousands of pictures (click) (input A) as well as labels or tags telling you if a pic is a corgi or a blueberry.
If a typical person can do a mental task with less than one second of thought, we can probably automate it using AI either now or in the near future. AI cannot diagnose a medical condition. It can estimate patient’s stress and mental health, but it cannot make a full prediction of the health condition without human help.
AI cannot write software. American computer architect Frederick Brooks conveys in the book The Mythical Man Month that in spite of the advancements brought by AI, it does not have the human faculty of understanding, which makes it incapable of writing software. It’s still biased (often because of training data that doesn’t represent everyone) ie. Automated towel dispenser that didn’t recognize a Black person’s hand.
What is Autopilot? At its core, I explain it succinctly as a bot-building platform where you build a bot once and deploy across channels. Twilio handles most of the ML on the backend for you, so you don’t necessarily need to understand it at a low-level, which isn’t very common with many ML tools—I’ve been using TensorFlow for a few months now, and was put off/intimidated at first by the steep learning curve and lots of different functions, parameters, and vocabulary
1. handles NLU backend so you don’t have to worry about it, performing and providing intent recognition, entity extraction, speech recognition, and providing custom entity models. Your bot will have the intelligence to understand everything your customers saying, including all permutations combinations of ways to say the same thing so you don’t need if/else conditionals. But at the same time, if it doesn’t understand the customer (which is always going to be a possibility, AI isn’t perfect), your bot needs to have the flexibility to escalate to agents from different channels (like Messenger, Slack, phone text, chat, Alexa, Google Assistant.)
Provides Now when it does escalate to an agent, the agent need to be empowered to provide all the information in the most seamless way possible, while holding context of past conversations.
An Autopilot bot is made up of Tasks, which are what you want your bot to accomplish. Tasks represent customer goals or outcomes.
How do Tasks run? Triggered by samples, which are words or phrases: real examples of how users would state their goals.. Much easier than using if/else statements to detect specific words, this uses ML on the backend to recognize that there are different ways of saying the same thing.
Tasks are programmed using Actions that can say/send back text, collect answers in a series of questions, redirect to a different server or application to handle the input or save it to a database, show an image, and more.
Static Actions (say, followed by collect with 2 questions, then redirects to a different task or could redirect to a server) all from the JSON Actions Bin
Dynamic Actions from Functions (or any other server)
Manage default settings: You can change the voice used in phone calls - different Alexa voices to choose from, like Polly, Joanna,, Matthew
Validation messages for Collect.
Max attempts before failover
Integrates with multiple Twilio products: we’ll see a seamless integration with Twilio Functions, our server less environment for Node.js apps, but on this slide you see
Twilio Studio has an Autopilot widget to access an Autopilot bot. Then it uses 2 other widgets to handoff a conversation to
Twilio Flex, our programmable call center product.
DEMO of Autopilot. Here we have the Mos Eisley Cantina, the galaxy’s best dimly-lit tavern known for strong drinks, hot tunes, and occasional outbreaks of shocking violence. We’re going to automate this flow: you either want to get today’s specials, make a reservation, or talk to the host. So we’re going to build a virtual assistant that does those 3 things.