Getting started with Amazon S3 Multi-Region Access Points
TUTORIAL
Basic bot concepts
Background and concepts
Overview
Amazon Lex enables you to add self-service, natural language chatbots to your applications or devices. You can build bots to perform automated tasks such as scheduling an appointment or to find answers to frequent customer queries such as return policies. Depending on your user base, you can also configure your bot to converse in multiple languages.
In this lab, you learn how to use Amazon Lex V2 to create a simple BankingBot that can handle requests such as checking account balances, making bill payments, and transferring funds.
First we’ll learn about the main concepts for building conversational interfaces.
Time to complete
20 minutes
Intent
An intent represents an action that the user wants to perform. This enables the bot to understand and classify what task a user is trying to accomplish. Your bot can support one or more related intents and are scoped to individual languages. For this tutorial, the BankingBot is configured to understand intents in English and Spanish, such as CheckBalance, allowing your users to check the balance in their accounts, or TransferFunds for paying bills.
Utterance
An utterance is a phrase that is used to trigger your intent. Each intent can be trained by providing a set of sample utterances and based on these, Amazon Lex can identify and invoke an intent based on natural language user input.
Slots
Slots are input data similar to a variable that a bot needs to complete an action or fulfill an intent. For the CheckBalance intent, the bot needs information regarding which account to act on and date of birth to verify the user’s identity. This data is captured as slots, which are then used to fulfill the intents. Amazon Lex has two types of slots:
- Built-in slots – These slots provide a definition of how the data is recognized and handled. For example, Amazon Lex has the built-in slot type for AMAZON.DATE, which recognizes words or phrases that represent a date and converts them into a standard date format (for example, "tomorrow," "the fifth of November," or "22 December").
- Custom slots – These slots allow you to define and manage a custom catalog of items. You can define a custom slot by providing a list of values. Amazon Lex uses these values to train the natural language understanding model used to recognize the slot values. For example, you can define a slot type as accountType with values such as Checking, Savings, and Credit. You can also add synonyms for each value, such as defining Visa as a synonym for your Credit account.
Prompts
Prompts and responses are bot messages that can be used to get information, acknowledge what the user said, or confirm an action before completing a transaction.
Fulfillment
As part of fulfilling the user’s request, you can configure the bot to respond with a closing response. Optionally, you can enable code hooks such as AWS Lambda functions to run business logic.
Conclusion
In this module, you learned the main concepts for building conversational interfaces.
In the next module, you will create a chatbot and add language support for English and Spanish.
Modules
This tutorial is divided into the following short modules. You must complete each module before moving to the next one.
- Create the bot and add Language Support (30m): Create the initial bot and configure support for both languages
- Configure English (US) fulfillment (30m): Extend the bot to fulfill English (US) requests
- Configure Spanish (US) fulfillment (30m): Extend the bot to fulfill Spanish (US) requests
- Test the Bot (15m): Test your configured bot