At this time, we’re saying Amazon Bedrock Superior Immediate Optimization, a brand new software 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 possibly can migrate to a brand new mannequin or enhance efficiency out of your present mannequin. You may check them to ensure they see no regressions on recognized use circumstances and in addition enhance on underperforming duties.

The brand new immediate optimizer takes in your immediate template, instance person inputs for the variable values, floor fact solutions, and an analysis metric to make use of as a information. You may even use this with multimodal person inputs – it helps png, jpg, and pdf as inputs to your immediate templates so you possibly can optimize prompts for duties like doc and picture evaluation.
You can even present an AWS Lambda operate, 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 ultimate immediate templates with analysis scores, value 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 should utilize this in case you are migrating to a brand new mannequin or simply need to get higher efficiency on their present mannequin. In the event you’re altering fashions, you possibly can choose your present mannequin as a baseline and as much as 4 different fashions. In the event you aren’t altering fashions, then simply choose your present mannequin to see earlier than and after optimization.

You must put together your immediate templates in JSONL format with instance person knowledge, floor fact solutions, and an analysis metric or rewriting steering. For .jsonl recordsdata, 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 may add recordsdata instantly or import immediate templates from Amazon Easy Storage Service (Amazon S3) and set an S3 output location the place immediate optimization outcomes and analysis knowledge can be saved. Then, select Create optimization.
Amazon Bedrock mechanically sends your immediate templates and instance knowledge with optionally available floor fact to your inference fashions, evaluates the responses along with your analysis metric, then rewrites the immediate in a suggestions loop to optimize it on your inference fashions. You’ll see analysis outcomes based mostly in your supplied metric and your ultimate optimized prompts.

As you famous, you possibly can consider immediate high quality in 3 ways: a Lambda operate with your personal Python scoring logic, LLM-as-a-Choose with a customized rubric, or natural-language steering standards. You may 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 operate — If in case you have a concrete metric (accuracy, F1, execution accuracy, structured-JSON match, and many others.), you possibly can deploy a Lambda operate containing your customized scoring logic and configure
evaluationMetricS3Uridiscipline 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 job is open-ended (summarization, era, reasoning explanations) and also you need a rubric-based rating, you possibly can configure the S3 config file within the
customLLMJConfigdiscipline of the immediate template to outline named metrics with structured directions and a score 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 it’s also possible to choose your personal from a listing of choose fashions. - Steering standards — If you understand the qualities you need (model voice, format, security constraints) however don’t need to writer a full choose immediate, you possibly can outline standards within the enter dataset by the
steeringCriteriaarray of the immediate template. As a substitute of structured metrics with score scales, you present free-form pure language standards that the LLM choose evaluates holistically. In the event you use this selection, 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 study extra about how you can use the superior immediate optimization and migration, go to the superior immediate optimization in Bedrock information and the pattern codes in Github.
Now obtainable
Amazon Bedrock Superior Immediate Optimization is on the market at this time 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 identical per-token charges as common Bedrock inference. To study extra, go to the Amazon Bedrock pricing web page.
Give the superior immediate optimization a attempt within the Amazon Bedrock console or with CreateAdvancedPromptOptimizationJob API at this time and ship suggestions to AWS re:Put up for Amazon Bedrock or by your common AWS Assist contacts.
— Channy

