Amazon Lex | Bot Structure Flashcards
I was in the Amazon Lex preview program. Now that Amazon Lex is GA, what happens to my account?
Bot Structure
Amazon Lex | Machine Learning
On April 19, 2017, Amazon Web Services announced that Amazon Lex exited Preview and entered General Availability. As such, we will be terminating the Amazon Lex Preview Program on May 1, 2017. Usage will be charged as per the pricing plan starting May 1st. Your first 12 months for the free tier will start on May 1st. Please note that Amazon Lex is now supported under Developer Support, Business Support and Enterprise Support plans. You can also post your queries on the public Amazon Lex forums.
How do I create a bot in Amazon Lex?
Bot Structure
Amazon Lex | Machine Learning
To create a bot, you will first define the actions performed by the bot. These actions are the intents that need to be fulfilled by the bot. For each intent, you will add sample utterances and slots. Utterances are phrases that invoke the intent. Slots are input data required to fulfill the intent. Lastly, you will provide the business logic necessary to execute the action. An Amazon Lex bot can be created both via Console and REST APIs.
Can I implement business logic on the client?
Bot Structure
Amazon Lex | Machine Learning
Yes. Amazon Lex provides the option of returning parsed intent and slots back to the client for business logic implementation.
How can I validate user input?
Bot Structure
Amazon Lex | Machine Learning
Amazon Lex provides deep integration with AWS Lambda and you can validate user input using the initialization and validation codeHook. This code gets executed at every turn of the conversation. The codehook can be used to set up session parameters, validate user input and customize responses.
What is an Intent?
Bot Structure
Amazon Lex | Machine Learning
To build an Amazon Lex bot, you will need to identify a set of actions - known as ‘intents’ – that you want your bot to fulfill. A bot can have multiple intents. For example, a ‘BookTickets’ bot can have intents to make reservations, cancel reservations and review reservations.
What is an utterance?
Bot Structure
Amazon Lex | Machine Learning
An ‘utterance’ is the spoken or typed phrase to invoke an intent. For example, to invoke the intent to make reservations, you would provide a sample utterance such as, “Can I make a reservation?”
What are slots?
Bot Structure
Amazon Lex | Machine Learning
To fulfill an intent, the Amazon Lex bot needs information from the user. This information is captured in ‘slots’. For example, you would define show name and time as slots for intent to make reservations.
What are prompts?
Bot Structure
Amazon Lex | Machine Learning
Amazon Lex elicits the defined ‘slots’ by using the ‘prompts’ provided. For example, to elicit value for the slot ‘time’ you will define a prompt such as “What show time would you like to reserve?”. Amazon Lex is capable of eliciting multiple slot values via a multi-turn conversation.
How is an action fulfilled?
Bot Structure
Amazon Lex | Machine Learning
Amazon Lex integrates with AWS Lambda for ‘fulfillment’ of the action or business logic. Alternately, you can configure Amazon Lex to return parsed intent and slot values to the client for action fulfillment.