At present, we’re saying Amazon Bedrock Superior Immediate Optimization, a brand new software that you should utilize 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’ll be able to take a look at them to verify 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 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 possibly can optimize prompts for duties like doc and picture evaluation.
You too can 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 closing 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.

Choose as much as 5 inference fashions for which to optimize your prompts. You should use this in case you are migrating to a brand new mannequin or simply wish to get higher efficiency on their present mannequin. For those who’re altering fashions, you possibly can choose your present mannequin as a baseline and as much as 4 different fashions. For those who 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 steerage. 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 straight 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 shall 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 along with your analysis metric, then rewrites the immediate in a suggestions loop to optimize it in your inference fashions. You’ll see analysis outcomes primarily based in your offered metric and your closing optimized prompts.

As you famous, you possibly can consider immediate high quality in 3 ways: a Lambda perform with your personal Python scoring logic, LLM-as-a-Decide 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 special methodology for every immediate template if they need.
- Lambda perform — If in case you have a concrete metric (accuracy, F1, execution accuracy, structured-JSON match, and so forth.), you possibly can deploy a Lambda perform containing your customized scoring logic and configure
evaluationMetricS3Urisubject 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-Decide — In case your process 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
customLLMJConfigsubject 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 you may also choose your personal from an inventory of choose fashions. - Steering standards — If you already know the qualities you need (model voice, format, security constraints) however don’t wish to creator a full choose immediate, you possibly can outline standards within the enter dataset by way of 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. For those who 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 easy methods to use the superior immediate optimization and migration, go to the superior immediate optimization in Bedrock information and the pattern codes in Github.
Now out there
Amazon Bedrock Superior Immediate Optimization is accessible 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 primarily based on the Bedrock model-inference tokens consumed throughout optimization, on the identical 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 attempt within the Amazon Bedrock console or with CreateAdvancedPromptOptimizationJob API as we speak and ship suggestions to AWS re:Submit for Amazon Bedrock or by way of your traditional AWS Assist contacts.
— Channy
