Right this moment, we’re saying Amazon Bedrock Superior Immediate Optimization, a brand new device that you should use to optimize your prompts for any mannequin on Amazon Bedrock, whereas evaluating your authentic prompts to optimized prompts throughout as much as 5 fashions concurrently. With the brand new immediate optimization, you may migrate to a brand new mannequin or enhance efficiency out of your present mannequin. You’ll be able to take a look at them to verify they see no regressions on identified use circumstances and in addition enhance on underperforming duties.

The brand new immediate optimizer takes in your immediate template, instance consumer inputs for the variable values, floor fact solutions, and an analysis metric to make use of as a information. You’ll be able to even use this with multimodal consumer inputs – it helps png, jpg, and pdf as inputs to your immediate templates so you may optimize prompts for duties like doc and picture evaluation.
You may as well present an AWS Lambda perform, LLM-as-a-judge rubric, or a brief pure language description to information the optimization. The immediate optimizer works in a metric-driven suggestions loop to optimize the immediate and ensuing mannequin responses for the analysis metric, and outputs the unique and remaining immediate templates with analysis scores, price estimates, and latency.
Bedrock Superior Immediate Optimization in motion
To get began with the brand new immediate optimization, select Create immediate optimization on the Superior Immediate Optimization web page of Amazon Bedrock console.

Decide as much as 5 inference fashions for which to optimize your prompts. You need to use this in case you are migrating to a brand new mannequin or simply wish to get higher efficiency on their present mannequin. If you happen to’re altering fashions, you may choose your present mannequin as a baseline and as much as 4 different fashions. If you happen to aren’t altering fashions, then simply choose your present mannequin to see earlier than and after optimization.

It is best to put together your immediate templates in JSONL format with instance consumer information, floor fact solutions, and an analysis metric or rewriting steering. For .jsonl information, every JSON object should be on a single line.
{
"model": "bedrock-2026-05-14", // required; Fastened worth
"templateId": "string", // required
"promptTemplate": "string", // required
"steeringCriteria": ["string"], // optionally available
"customEvaluationMetricLabel": "string", // required if customLLMJConfig or evaluationMetricLambdaArn is used
"customLLMJConfig": { // optionally available
"customLLMJPrompt": "string", // required if customLLMJConfig current
"customLLMJModelId": "string" // required if customLLMJConfig current
},
"evaluationMetricLambdaArn": "string", // optionally available
"evaluationSamples": [ // required
{
"inputVariables": [ // required
{
"variableName1": "string",
"variableName2": "string"
}
],
"referenceResponse": "string" // optionally available
"inputVariablesMultimodal": [ // optional
{
"Arbitrary_Name": { // required for your multimodal variable.
"type": "string", // choose from "PDF" or "IMAGE". Acceptable filetypes for IMAGE = png, jpg,
"s3Uri": "string" // input the S3 path of the file
}
]
}
]
}
You’ll be able to add information immediately or import immediate templates from Amazon Easy Storage Service (Amazon S3) and set an S3 output location the place immediate optimization outcomes and analysis information will probably be saved. Then, select Create optimization.
Amazon Bedrock robotically sends your immediate templates and instance information with optionally available floor fact to your inference fashions, evaluates the responses together with your analysis metric, then rewrites the immediate in a suggestions loop to optimize it to your inference fashions. You’ll see analysis outcomes based mostly in your offered metric and your remaining optimized prompts.

As you famous, you may consider immediate high quality in 3 ways: a Lambda perform with your individual Python scoring logic, LLM-as-a-Choose with a customized rubric, or natural-language steering standards. You’ll be able to simply select one per immediate template, however can do a number of immediate templates in a job, to allow them to use a unique technique for every immediate template if they need.
- Lambda perform — When you have a concrete metric (accuracy, F1, execution accuracy, structured-JSON match, and so on.), you may deploy a Lambda perform containing your customized scoring logic and configure
evaluationMetricS3Uriarea of the immediate template. Contained in the Lambda, the core is a compute_score implementation that programmatically compares mannequin outputs in opposition to reference responses. - LLM-as-a-Choose — In case your activity is open-ended (summarization, technology, reasoning explanations) and also you need a rubric-based rating, you may configure the S3 config file within the
customLLMJConfigarea of the immediate template to outline named metrics with structured directions and a ranking scale. A Bedrock choose mannequin evaluates every prompt-response pair and returns a rating with reasoning. The default mannequin is Claude Sonnet 4.6 and you can even choose your individual from an inventory of choose fashions. - Steering standards — If you understand the qualities you need (model voice, format, security constraints) however don’t wish to creator a full choose immediate, you may outline standards within the enter dataset via the
steeringCriteriaarray of the immediate template. As a substitute of structured metrics with ranking scales, you present free-form pure language standards that the LLM choose evaluates holistically. If you happen to use this feature, then a default LLM-as-a-judge immediate will consider the responses and incorporate your steering standards into the choose immediate. The choose mannequin on this case is Anthropic Claude Sonnet 4.6.
To be taught extra about how one can use the superior immediate optimization and migration, go to the superior immediate optimization in Bedrock information and the pattern codes in Github.
Now accessible
Amazon Bedrock Superior Immediate Optimization is offered as we speak in US East (N. Virginia, Ohio), US West (Oregon), Asia Pacific (Mumbai, Seoul, Singapore, Sydney, Tokyo), Canada (Central), Europe (Frankfurt, Eire, London, Zurich), and South America (São Paulo) Areas. You might be charged based mostly on the Bedrock model-inference tokens consumed throughout optimization, on the similar per-token charges as common Bedrock inference. To be taught extra, go to the Amazon Bedrock pricing web page.
Give the superior immediate optimization a strive within the Amazon Bedrock console or with CreateAdvancedPromptOptimizationJob API as we speak and ship suggestions to AWS re:Put up for Amazon Bedrock or via your common AWS Assist contacts.
— Channy

