Optimize Bot using AI-powered Bot Analyzer - Amazon Lex

Optimize Bot using AI-powered Bot Analyzer

Analyze your Amazon Lex V2 bot configuration against AWS best practices using AI-powered recommendations. Bot Analyzer uses Amazon Bedrock's generative AI capabilities to identify configuration issues and provide actionable guidance to improve intent classification and slot resolution performance.

Bot Analyzer automatically evaluates your bot's intent configurations and provides recommendations to:

  • Improve intent separation - Identify and resolve generic intents that group multiple concepts

  • Eliminate intent overlap - Detect similar meanings and phrasings between intents that cause routing errors

  • Optimize slot usage - Recommend proper use of slots to combine similar intents and improve entity extraction

  • Enhance utterance quality - Analyze sample utterance coverage and diversity for better intent classification

Prerequisites

Before using Bot Analyzer, ensure:

  • Your bot locale is built successfully

  • Your bot version for analysis is DRAFT

  • Your bot locale is one of the supported English locales: en_AU, en_GB, en_IN, en_US, en_ZA

You can use Bot Analyzer with either the console or the API.

Console
Start an analysis
  1. Sign in to the AWS Management Console and open the Amazon Lex V2 console at https://console.aws.amazon.com/lexv2/home.

  2. Select your bot and navigate to the bot locale you want to analyze.

  3. In the bot locale editor, click the Analyze dropdown menu.

  4. Select Start to begin the analysis.

Analyze dropdown with Start option

The analysis typically completes within minutes. During analysis, the Start button changes to Stop Analyzing if you need to cancel.

View Recommendations

Once analysis completes, recommendations appear in the Recommendations panel on the right side.

Recommendations panel

Each recommendation includes:

  • Priority - High, Medium, or Low severity

  • Issue Location - The specific intent affected

  • Issue Description - What configuration problem was detected

  • Proposed Fix - Actionable steps to resolve the issue

View analysis history

To see previous analyses:

  1. Click the Analyze dropdown menu.

  2. Select History.

  3. The Analysis History panel displays past analysis requests with their status and timestamps.

Analysis History panel
Delete Recommendations

To remove analysis results:

  1. Click the Analyze dropdown menu.

  2. Select Delete.

  3. Confirm deletion of the current recommendations.

Delete confirmation dialog
API
Start an analysis

Send a StartBotAnalyzer request to initiate analysis for your bot locale. The response returns an HTTP 202 status with a botAnalyzerRequestId. Take note of this ID and you'll need it to check the analysis status and retrieve recommendations.

Check analysis status and retrieve recommendations

Send a DescribeBotAnalyzerRecommendation request using the botAnalyzerRequestId from the previous step. Include the botId in the request path.

If the botAnalyzerStatus in the response is Available, the analysis is complete and the botAnalyzerRecommendationList field will be populated with recommendations. Each recommendation includes:

  • issueLocation - The location where the issue was detected

  • priority - High, Medium, or Low severity

  • issueDescription - Details about the configuration problem

  • proposedFix - Actionable guidance to resolve the issue

Stop an ongoing analysis

If you need to cancel an analysis in progress, send a StopBotAnalyzer request with the botId and botAnalyzerRequestId.

View analysis history

To retrieve a list of previous analyses for a bot locale, send a ListBotAnalyzerHistory request. Specify the botId and localeId to see all past analysis requests with their status and timestamps.

Delete recommendations

To remove analysis results, send a DeleteBotAnalyzerRecommendation request with the botId and botAnalyzerRequestId. This permanently deletes the recommendations associated with that analysis.

Note

Recommendations are automatically deleted after 15 days.

Related Topics