Transcription of Amazon Lex - V2 Developer Guide
1 Amazon LexV2 Developer GuideAmazon Lex V2 Developer GuideAmazon Lex: V2 Developer GuideCopyright Amazon Web Services, Inc. and/or its affiliates. All rights 's trademarks and trade dress may not be used in connection with any product or service that is notAmazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages ordiscredits Amazon . All other trademarks not owned by Amazon are the property of their respective owners, who mayor may not be affiliated with, connected to, or sponsored by Lex V2 Developer GuideTable of ContentsWhat is Amazon Lex V2?
2 1 Are You a First-time User of Amazon Lex V2? .. 2 How it works .. 3 Supported languages .. 4 Supported languages and locales .. 4 Languages and locales supported by Amazon Lex V2 features .. 5 Getting started .. 7 Step 1: Set Up an Account .. 7 Sign Up for AWS .. 7 Create an IAM User .. 8 Next step .. 8 Step 2: Getting started (Console) .. 8 Exercise 1: Create a bot from an example .. 9 Exercise 2: Review the conversation flow .. 10 Building 17 Creating a bot .. 17 Adding a language.
3 18 Adding intents .. 18 Turning off responses .. 19 Adding slot types .. 19 Testing a bot .. 20 Creating versions .. 23 The Draft version .. 23 Creating a version .. 24 Updating an Amazon Lex V2 bot .. 24 Deleting an Amazon Lex V2 bot or version .. 24 Built-in intents and slot types .. 24 Built-in intents .. 24 Built-in slot types .. 35 Using a custom grammar slot type .. 43 Adding a grammar slot type .. 44 Grammar 44 Script 51 Industry grammars .. 58 Creating custom slot types.
4 140 Creating a custom vocabulary to improve speech recognition .. 141 Custom vocabulary basics .. 141 Best practices for creating a custom vocabulary .. 141 Creating a custom vocabulary for eliciting intents .. 142 Creating a custom vocabulary file .. 143 Using multiple values in a 143 Using a Lambda function .. 145 Attaching a Lambda function to a bot alias .. 145 Input event format .. 146 Response format .. 150 Lambda router function .. 152 Using the Automated Chatbot Designer (Preview).
5 154 Importing conversation transcripts .. 154 Importing transcripts from Contact Lens for Amazon Connect .. 155 Prepare transcripts .. 155 Upload your transcripts to an S3 bucket .. 156 Analyze your transcripts using Amazon Lex V2 console .. 156 Creating intents and slot types .. 157 Input transcript 157iiiAmazon Lex V2 Developer GuideOutput transcript 158 Deploying bots .. 160 Integrating with a Java application .. 161 Integrating your bots .. 165 Messaging platforms .. 165 Integrating with Facebook.
6 165 Integrating with 168 Integrating with Twilio SMS .. 171 Contact centers .. 172 Amazon Chime SDK .. 173 Amazon Connect .. 173 Genesys 174 Using 175 Managing conversations .. 175 Managing conversation context .. 176 Setting intent context .. 176 Using default slot 178 Setting session attributes .. 178 Setting request attributes .. 180 Setting the session timeout .. 180 Sharing information between intents .. 181 Setting complex attributes .. 181 Managing 182 Starting a new session.
7 183 Switching intents .. 183 Resuming a prior intent .. 184 Validating slot values .. 184 Analyzing 184 Using confidence scores .. 185 Using intent confidence scores .. 186 Using voice transcription confidence scores .. 187 Using runtime hints to improve recognition of slot values .. 194 Adding slot values in context .. 195 Adding hints to a slot .. 195 Using spelling styles to capture slot values .. 196 Enabling 197 Example code .. 197 Streaming conversations .. 201 Starting a stream to a bot.
8 202 Time sequence of events for an audio conversation .. 204 Starting a streaming conversation .. 206 Event stream encoding .. 217 Enabling your bot to be interrupted .. 218 Waiting for the user to provide additional information .. 219 Configuring fulfillment progress updates .. 220 Fulfillment 221 Post-fulfillment response .. 222 Timeouts for user 222 Timeouts for voice input .. 223 Timeouts for text input .. 223 Configuration for DTMF input .. 225 Monitoring with conversation logs.
9 225 Configuring conversation logs .. 225 Viewing text logs in Amazon cloudwatch Logs .. 227 Accessing audio logs in Amazon S3 .. 232ivAmazon Lex V2 Developer GuideMonitoring conversation log status with cloudwatch metrics .. 232 Obscuring slot 233 Viewing utterance statistics .. 234 Logging with CloudTrail .. 235 Amazon Lex V2 information in CloudTrail .. 235 Understanding Amazon Lex V2 log file entries .. 236 Monitoring with cloudwatch .. 237 Importing and exporting .. 242 Exporting .. 242 IAM permissions required to export.
10 243 Exporting a bot (console) .. 243 Importing .. 244 IAM permissions required to import .. 245 Importing a bot (console) .. 246 Using a password when importing or exporting .. 247 JSON format for importing and exporting .. 247 Manifest file structure .. 248 Bot file structure .. 248 Bot locale file structure .. 248 Intent file structure .. 249 Slot file structure .. 250 Slot type file structure .. 251 Custom vocabulary file structure.. 252 Tagging resources .. 253 Tagging your resources.