使用 Amazon Lex 在應用程式中建立對話式機器人

33
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. John Chang Technology Evangelist Amazon Web Services, HKT March 2017 Amazon Lex Conversational interfaces for your applications, powered by the same deep learning technologies as Alexa

Transcript of 使用 Amazon Lex 在應用程式中建立對話式機器人

Page 1: 使用 Amazon Lex 在應用程式中建立對話式機器人

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

John Chang Technology EvangelistAmazon Web Services, HKT

March 2017

Amazon LexConversational interfaces for your applications, powered by the same deep learning technologies as Alexa

Page 2: 使用 Amazon Lex 在應用程式中建立對話式機器人

Amazon Lex

Why did we build Amazon Lex?

What is Amazon Lex?

How do I get started using Amazon Lex?

Q & A

Page 3: 使用 Amazon Lex 在應用程式中建立對話式機器人

Why Did We Build Amazon Lex?

Page 4: 使用 Amazon Lex 在應用程式中建立對話式機器人

Advent of Conversational Interactions

1st Gen: Punch Cards & Memory Registers

2nd Gen: Pointers & Sliders

3nd Gen: Conversational Interfaces

Page 5: 使用 Amazon Lex 在應用程式中建立對話式機器人

Conversational Access

On-Demand

Accessible

Efficient

Natural

Page 6: 使用 Amazon Lex 在應用程式中建立對話式機器人

Developer Challenges

Speech Recognition Language

Understanding

Business Logic

Disparate Systems

Authentication

Messaging platforms

Scale Testing

Security

Availability

Mobile

Conversational interfaces need to combine a large number of sophisticated algorithms and technologies

Page 7: 使用 Amazon Lex 在應用程式中建立對話式機器人

Amazon Lex: New service for building conversational interfaces using voice and

text

Page 8: 使用 Amazon Lex 在應用程式中建立對話式機器人

Amazon Lex - FeaturesText and Speech language understanding: Powered by the same technology as Alexa

Enterprise SaaS Connectors: Connect to enterprise systems

Deployment to chat services

Designed for Builders: Efficient and intuitive tools to build conversations; scales automatically

Versioning and alias support

Page 9: 使用 Amazon Lex 在應用程式中建立對話式機器人

Text and Speech Language Understanding

SpeechRecognition

Natural Language Understanding

Powered by the same Deep Learning technology as Alexa

Page 10: 使用 Amazon Lex 在應用程式中建立對話式機器人

Deployment to Chat Services

Amazon Lex

Facebook Messenger

Card DescriptionButton 1Button 2Button 3

Card Description

Option 1

Option 2

Authentication

Rich FormattingOne-Click Deployment

Mobile

Page 11: 使用 Amazon Lex 在應用程式中建立對話式機器人

Designed for Builders

Efficient and intuitive tools to build conversations

Page 12: 使用 Amazon Lex 在應用程式中建立對話式機器人

Versioning and Alias Support

AliasVersioning

v1 v2 v3 latest

• Supported for Intents, Slots and Bots

• Enables multi-developer environment

• Rollback to previous versions

v1 Dev

v2 Stage

v3 Prod

• Deploy different aliases to different platforms

• Run different stacks for dev, stage and prod environments

• Target different user groups with different aliases

Page 13: 使用 Amazon Lex 在應用程式中建立對話式機器人

AWS Mobile Hub Integration

Authenticate users

Analyze user behavior

Store and share media

Synchronize data

More ….Track retention

Conversational BotsLexAWS Mobile SDKs

AWS Mobile Hub

Page 14: 使用 Amazon Lex 在應用程式中建立對話式機器人

Mobile Hub SaaS Connector

Amazon API Gateway

AWS Lambda

Amazon API Gateway

AWS Lambda

Mobile Hub Custom Connector

Business Application

Firewall

Mobile App Amazon Lex

Enterprise SaaS Connectors with Mobile Hub

AWS Lambda

Page 15: 使用 Amazon Lex 在應用程式中建立對話式機器人

Enterprise 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: Translate REST response into natural language

Mobile Hub Custom Connector

2: Invoke a SaaS application or an existing business application

Business Application

Firewall

User Input

Page 16: 使用 Amazon Lex 在應用程式中建立對話式機器人

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 ….

Page 17: 使用 Amazon Lex 在應用程式中建立對話式機器人

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

Page 18: 使用 Amazon Lex 在應用程式中建立對話式機器人

Lex Bot Structure

UtterancesSpoken or typed phrases that invoke your intent

BookHotelIntentsAn Intent performs an action in response to natural language user input

SlotsSlots are input data required to fulfill the intent

FulfillmentFulfillment mechanism for your intent

Page 19: 使用 Amazon Lex 在應用程式中建立對話式機器人

Utterances

I’d like to book a hotel

I want to make my hotel reservations

I want to book a hotel in New York City

Can you help me book my hotel?

Page 20: 使用 Amazon Lex 在應用程式中建立對話式機器人

Slots

destination City New York City, Seattle, London, …

Slot Type Values

Check In Date Valid dates

Check Out Date Valid dates

Page 21: 使用 Amazon Lex 在應用程式中建立對話式機器人

Slot Elicitation

I’d like to book a hotel

What date do you check in?

New York City

Sure what city do you want to book?

Nov 30th Check In 11/30/2016

CityNew York City

Page 22: 使用 Amazon Lex 在應用程式中建立對話式機器人

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.

Page 23: 使用 Amazon Lex 在應用程式中建立對話式機器人

“Book a Hotel”

Book HotelNYC

“Book a Hotel in NYC”

Automatic Speech Recognition

Hotel Booking

New York City

Natural Language Understanding

Intent/Slot Model

UtterancesHotel BookingCity New York CityCheck In Nov 30th

Check Out Dec 2nd

“Your hotel is booked for Nov 30th”

Polly Confirmation: “Your hotel is booked for Nov 30th”

ain

“Can I go ahead with the booking?

Page 24: 使用 Amazon Lex 在應用程式中建立對話式機器人

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 bot 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

Page 25: 使用 Amazon Lex 在應用程式中建立對話式機器人

Monitoring

Track your bot

Request Latency

Missed Utterance Count

Page 26: 使用 Amazon Lex 在應用程式中建立對話式機器人

Customer Testimonials: Capital One

“A highly scalable solution, it also offers potential to speed time to market for a new generation of voiceand text interactions such as our recently launched Capital One skill for Alexa.”

“As a heavy user of AWS, Amazon Lex’s seamless integration with other AWS services like AWS Lambda and AWS DynamoDB is really appealing.”

Page 27: 使用 Amazon Lex 在應用程式中建立對話式機器人

Customer Testimonials: HubSpot

“Through Amazon's Lex, we're adding sophisticated natural language processing capabilities that helpsGrowthBot provide a more intuitive UI for our users. Amazon Lex lets us take advantage of advanced A.I.and machine learning without having to code the algorithms ourselves.”

“HubSpot's GrowthBot is an all-in-one chatbot which helps marketers and sales people be more productive by providing access to relevant data and services using a conversational interface. With GrowthBot, marketers can get help creating content, researching competitors, and monitoring their analytics.”

Page 28: 使用 Amazon Lex 在應用程式中建立對話式機器人

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

Page 29: 使用 Amazon Lex 在應用程式中建立對話式機器人

Amazon Lex - Technology

Amazon Lex

Automatic Speech Recognition (ASR)

Natural Language Understanding (NLU)

Same technology that powers Alexa

Cognito CloudTrail CloudWatch

AWS Services

ActionAWS Lambda

Authentication & Visibility

Speech API

LanguageAPI

Fulfillment

End-Users

Developers

Console

SDK

Intents, Slots,Prompts, Utterances

Input: Speech or Text

Multi-Platform Clients:Mobile, IoT, Web,

Chat

API

Response: Speech (via Polly TTS) or Text

Page 30: 使用 Amazon Lex 在應用程式中建立對話式機器人

How Do I Get Started Using Amazon Lex?

Page 31: 使用 Amazon Lex 在應用程式中建立對話式機器人

Register for the Preview @ aws.amazon.com/lex

Sign-Up & Whitelist

Build your first bot!

Page 32: 使用 Amazon Lex 在應用程式中建立對話式機器人

Q & A

Page 33: 使用 Amazon Lex 在應用程式中建立對話式機器人

Thank You!

http://aws.amazon.com/lex

Email: [email protected]