introducing amazon lex – service for building voice or text chatbots

41
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Niranjan Hira, Solutions Architect May 8 th 2017 Introducing Amazon Lex Service for Building Voice or Text Chatbots

Upload: amazon-web-services

Post on 22-Jan-2018

2.266 views

Category:

Technology


1 download

TRANSCRIPT

© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Niranjan Hira, Solutions Architect

May 8th 2017

Introducing Amazon LexService for Building Voice or Text Chatbots

Amazon Lex

Why did we build Amazon Lex?

What is Amazon Lex?

How do I build conversational apps using Amazon Lex?

Q&A

Why did we build

Amazon Lex?

Advent of conversational interactions

1st Gen:

Punch Cards & Memory Registers

2nd Gen:

Pointers & Sliders

3nd Gen:

Conversational Interfaces

Developer challenges

Conversational interfaces need to combine a large number of

sophisticated algorithms and technologies

Speech

Recognition Language

Understanding

Business Logic

Disparate

Systems

Authentication

Messaging

platforms

Scale Testing

Security

Availability

Mobile

Conversational access

On-demand

Accessible

Efficient

Natural

Amazon Lex:

A new service for building

conversational interfaces

using voice and text

Complete solution

End to End

Speech to Intent

ASR+NLU

integrated into

one API

Dialog Management

Native support &

maintains context

Text to Speech

Amazon Polly integrated

into API

Business Logic

Native integration with

AWS Lambda

Deployment

One click

deployment

Security

Encrypted data in

transit & at rest

Scale

Completely managed

service

Analytics

Monitor and improve

Text and speech language understanding: powered by the same technology

as Alexa

Enterprise Ready: connect to enterprise systems via SaaS connectors

Versioning and alias support

Build once and deploy to multiple platforms

Designed for builders: efficient and intuitive tools to build

conversations; scales automatically

Amazon Lex - features

Continuous Learning: monitor and improve your bot

Text and speech language understanding

Speech

Recognition

Natural Language

Understanding

Powered by the same deep learning technology as Alexa

Multi-platform

Mobile Messaging Platforms Web IoT

SDKs: iOS & Android

Mobile Hub

Facebook, Twilio

SMS and Slack

SDKs: Java, JavaScript,

Python, CLI, .NET, Ruby on

Rails, PHP, Go, and CPP

Integrated with AWS

IoT via AWS Lambda

Build once and deploy to multiple platforms

Designed for builders

Efficient and intuitive tools to build conversations

AWS Mobile Hub integration

Authenticate users

Analyze user behavior

Store and share media

Synchronize data

More ….Track retention

Conversational botsAmazon LexAWS Mobile SDKs

AWS Mobile Hub

Enterprise SaaS connectors with Mobile Hub

Amazon Lex

Mobile App

Mobile Hub

SaaS connector

Amazon API

Gateway

AWS

Lambda

1: Understand

user intent

Amazon API

Gateway

AWS

Lambda

3: REST

response into

natural language

2: Invoke a SaaS

application or existing

business application

Business

application

Firewall

User inputMobile Hub

custom connector

Versioning and Alias support

AliasVersioning

• Supported for Intents, Slots, and Bots

• Enables multi-developer environment

• Rollback to previous versions

• Deploy different aliases to different platforms

• Run different stacks for dev, stage and prod environments

• Target different user groups with different aliases

v1 v2 v3 latest

v1 dev

v2 stage

v3 prod

Continuous learning

Monitor

AWS CloudWatch metrics

Missed utterances

Improve

Add to intent

Analyze

Amazon Lex – use cases

Informational BotsChatbots for everyday consumer requests

Application BotsBuild powerful interfaces to mobile applications

• News updates

• Weather information

• Game scores ….

• Book tickets

• Order food

• Manage bank accounts ….

Enterprise Productivity BotsStreamline enterprise work activities and improve efficiencies

• Check sales numbers

• Marketing performance

• Inventory status ….

Internet of Things (IoT) BotsEnable conversational interfaces for device interactions

• Wearables

• Appliances

• Auto ….

Amazon Lex benefits

High quality text and speech language

understanding

Built-in integration with the AWS platform

Seamlessly deploy and scale

Easy to use

Cost effective

How do I build conversational

apps using Amazon Lex?

Amazon Lex

Utterances

Spoken or typed phrases that invoke

your intent

BookHotel

Intents

An intent performs an action in

response to natural language user

input

Slots

Slots are input data required to fulfill

the intent

Fulfillment

Fulfillment mechanism for your intent

“Book a hotel”

Book Hotel

NYC

“Book a Hotel in

NYC”

Automatic Speech

Recognition

Hotel Booking

New York City

Natural Language

Understanding

Intent/Slot

Model

UtterancesHotel Booking

City New York City

Check In April 19th

Check Out April 21st

“Your hotel is booked for

April 19th”

Amazon PollyConfirmation: “Your hotel

is booked for Nov 30th”

“Can I go ahead

with the booking?

a

in

Slot elicitation

Check In

4/19/2017

City

New York

City

I would like to book a hotel

Sure, which city will you be

traveling to?

New York City

What date do you want to

check in?

April 19th

Conversation context

Slot Values Intents Prompts ConfirmationsSession Attributes

Slot Value

Slot Value

Conversation

Yes/No

Session

Attributes

IntentPrompt

Lex maintains context by storing data throughout the conversation

Confirm

Dynamic conversation flow

ConversationSession

Attributes

Second Intent

Switch Intents

First Intent

Session

Attributes

Conversation

Chain Intents

Takeout

Dine In

Dine In or

Take out?

Anything

else today?Book a Car

Dialog management

I would like to book a hotel

Sure, which city will you be

traveling to?

New York City

What date do you want to

check in?

Tomorrow

… And for how many nights

is this for?

City

Simple Declarative Model

Check-In Date

Check-Out Date

Slots

Which city will you be travelling to?

What date do you want to check in?

How many nights is this for?

Prompts

Build Multi-turn Conversations

Easy Setup in Console

Customize conversations

I would like to book a hotel

Would you prefer to stay in

Downtown this time as well?

Yes

What date do you want to

check in?

April 19th

Sorry no availability. Would

a different location work?

Personalize conversation based

on user preferences

Validate user input and re-prompt

as necessary

Error handling

I want to …. {garbled} …..

Sorry can you please repeat

that?

I am having trouble understanding

Can you please say that again?

Sorry I am not able to assist

you at this time

Clarify by requesting user to repeat

Uses a different prompt every time

Hang up phrase to end the conversation

Rich message formatting

I would like to rent a car

Sure. What type of car are

you looking for?

Compact

• Formatted for messaging platforms

• Multiple cards supported

• Preview capability

• Test in console

Fulfillment

AWS Lambda

Integration

Return to

Client

User input parsed to derive

intents and slot values. Output

returned to client

for further processing

Intents and slots passed

to AWS Lambda function

for business logic

implementation

Save, build and publish

Save Build

Saving your bot

preserves the current

state on the server

Building your bot

creates versions

that you can test

Publish

Publishing your app will create a

version of your bot and provide

an alias to your clients

Test

Test your bot in a

chat window on the

console

Programmatically build bots

… build, test and deploy bots using SDKs

Add Utterances Add Slot Values

SDKs: Java, JavaScript, Python, CLI,

.NET, Ruby on Rails, PHP, Go, and CPP

Pre-defined resources

Built-in Slot Types

AMAZON.DATE

AMAZON.TIME

AMAZON.NUMBER

……

Ready to use slot types that are already trained

with sample values

Do not need to spend the time enumerating sample

values for these slot types

Benefit from continuously expanding pre-defined resources

Messaging platforms

Facebook Slack Twilio SMS

Customer testimonials

Amazon Lex pricing

Text Speech

Price per 1000 requests $0.75 $4.00

Free Tier*

(requests per month)10,000 5,000

*Available for the first year upon sign-up to new Amazon Lex customers

Amazon Lex - technology

Amazon Lex

Automatic Speech

Recognition (ASR)

Natural Language

Understanding (NLU)

Same technology that powers Alexa

Amazon Cognito Amazon CloudWatch

AWS Services

ActionAWS Lambda

Authentication

& Visibility

Speech

APILanguage

API

Fulfillment

End-Users

Developers

Console

SDK

Intents,

Slots,

Prompts,

Utterances

Input:

Speech

or Text

Multi-Platform Clients:

Mobile, IoT, Web,

Chat

API

Output:

Speech (via Amazon Polly TTS)

or Text

AWS chatbot challenge

TimelinePrizesChallenge

Start: April 19th 2017

End: July18th 2017

Results: August 11th 2017

Up to $5,000 USD

Up to $2,500 AWS Credits

Tickets to re:Invent 2017

… & more

Register for the AWS Chatbot challenge today!

Build a unique chatbot that helps

solves a problem or adds

value for prospective users.

Amazon Polly: life-like speech service

Converts text

to life-like speech

47 voices 24 languages Low latency,

real time

Fully managed

Amazon Polly: A focus on voice quality &

pronunciation

2. Intelligible and Easy to Understand

3. Add Semantic Meaning to Text

1. Automatic, Accurate Text Processing

4. Customized Pronunciation

Amazon Polly customers

Media and Entertainment

Education

Accessibility

Content Creation

Telephony/Contact Center

Internet of Things

Gaming

Thank you!

[email protected]