New feature

Amazon Bedrock Advanced Prompt Optimization now supports prompt shortening

Amazon Bedrock Advanced Prompt Optimization now supports prompt shortening, an optional setting that reduces prompt length while maintaining or improving evaluation scores. Optimized prompts are returned only when shorter and score at least as high as the original.

Amazon Bedrock Advanced Prompt Optimization now supports prompt shortening. This optional feature reduces prompt length while maintaining or improving evaluation scores. It optimizes prompts for any Amazon Bedrock model based on user-defined criteria. Previously, optimization focused solely on quality, often resulting in longer prompts that increase input token costs and initial token latency-problematic for large or latency-sensitive applications. Enabling prompt shortening directs the optimizer to shorten prompts, returning only optimized prompts that are shorter than the original and achieve equal or higher scores. Results include a compression ratio and token counts for both original and optimized prompts. For example, a compression ratio of 0.7 means the optimized prompt uses 30% fewer tokens. Prompt shortening works with any evaluation method, including steering criteria, LLM-as-a-judge rubrics, and custom Lambda evaluators, and is available in all AWS regions where Advanced Prompt Optimization is provided. To get started, enable prompt shortening in your input dataset's prompt template and create optimization jobs as usual.

Why it matters

Amazon Bedrock is a service for invoking AI models, and prompt optimization is a key feature for improving model performance. This update reduces prompt costs and latency.

Read the original AWS announcement