Note
Before you can take advantage of the generative AI features, you must fulfill the following prerequisites
-
Navigate to the Amazon Bedrock console
and sign up for access to the Anthropic Claude model you intend to use (for more information, see Model access). For information about pricing for using Amazon Bedrock, see Amazon Bedrock pricing . -
Turn on the generative AI capabilities for your bot locale. To do so, follow the steps at Optimize Lex V2 bot creation and performance by using generative AI.
The descriptive bot builder lets you take advantage of Amazon Bedrock's access to large language models to improve the efficiency of the bot creation process. You provide a prompt using natural language that includes the purpose of the bot and the actions that it should perform. Amazon Lex V2 harnesses Amazon Bedrock's capabilities to generate relevant intents and slot types for your bot based on your description. Once you choose the intents and slot types that you want to keep, you can then iterate upon the bot to modify it to your specific use-case. The descriptive bot builder saves you time by letting you avoid having to manually create intents and slot types for the bot.
The descriptive bot builder is available in the English locales (see the locales that begin with en_
in the table in Languages and locales supported by
Amazon Lex V2).
Before you create your bot, do the following.
-
Check that your role has the correct permissions by reviewing the steps at Permissions needed to create a bot with natural language description in Lex V2.
-
Decide on the description to use. You can refer to Example bot descriptions for descriptive bot builder for sample bot descriptions.
Create a bot by using natural language to describe what the bot should be able to do. Amazon Lex V2 invoke Amazon Bedrock models to generate intents and slot types that fit your bot's use case. You can create the bot with either the console or the API.
Create a bot using the descriptive bot builder
-
Sign in to the AWS Management Console and open the Amazon Lex V2 console at https://console.aws.amazon.com/lexv2/home
. -
In the Bots page, select Create bot.
-
For the Creation method, choose Descriptive Bot Builder - GenAI.
-
Give your bot a name and optional description, configure the IAM permissions, and choose whether your bot is subject to COPPA or not. Then select Next.
-
Select a language to create the bot in, a voice for the bot, and a confidence threshold for intent classification (for more information, see Using intent confidence scores to improve intent selection with Lex V2.
-
Under Descriptive Bot Builder - GenAI, provide a description for the bot you want to create. Your description should be both detailed and precise to help generate appropriate and sufficient intents for your bot. Include a list of actions to improve the intent creation process.
-
Select a model provider and model under Select model.
-
To create the bot in another locale, choose Add another language. When you are finished adding languages, select Done. Amazon Lex V2 creates your bot and the descriptive bot builder generates intents and slots for it. When the locale has been generated, the banner turns from blue to green. Select Review to see the generated intents and slot types.
Note
The descriptive bot builder is currently only available in English locales. However, you can copy a bot to a non-English locale after creating it.
Review the generated intents and slot types and add them to your bot
-
If there are enough intents and slot types that are applicable for your bot's use-case, you can review the generated intents.
-
Review the Generated intents.
-
Choose a checkbox next to an intent to remove it from the list of intents to add to the bot.
-
Choose an intent name to view the Sample utterances and Slots generated for the intent.
-
By default, all the utterances and slots are selected. Choose a checkbox to remove that item from the intent. Select Add to selection to keep the checked items in the intent.
-
-
Review the Generated slot types.
-
Choose a checkbox next to a slot type to remove it from the list of intents to add to the bot.
-
You can add values to a slot type after you have added it to the bot
-
-
-
When you're satisfied with your intents and slot types, select Add intents and slot types at the top of the page to add the intents and slot types to your bot.
-
When the resources are finished being added, a green success banner appears. Go to Intents and Slot types to edit the generated ones and to add more values.
-
If the Generated intents and Generated slot types are mostly inapplicable to the bot you want to create, carry out the following steps.
-
Select New generation in the Descriptive bot builder details section.
-
Rewrite the prompt and select Re-generate to generate new intents and slot types. The results differ if you use a different model.
Important
There is no guarantee that the same intents and slots will be generated. You are charged each time you regenerate the intents and slot types.
-