Tuning Model Configurations with Offline Comparison and A/B Testing
This lesson covers configuration tuning for specific use cases, choosing model-specific parameters, prompt variants and models with evidence from offline comparisons and A/B tests rather than intuition.
Learning outcomes
After completing this lesson, you will be able to:
- Handle model-specific parameter configurations.
- Choose sampling parameters by requirement.
- Compare configurations offline and with online A/B tests.
Model-specific parameter configurations
Each model family has its own supported parameters, ranges and defaults. Common parameters, namely temperature, top-p, maximum tokens and stop sequences, are passed in inferenceConfig in the Converse API. Parameters specific to one model family, such as top-k, reasoning budgets or response format options, are passed in additionalModelRequestFields.
A configuration that works well for one model may not transfer to another. The same temperature can produce more variety in one model than in another, and default maximum lengths differ. Configurations are therefore tuned separately for each model and stored in configuration, such as AWS AppConfig or Prompt Management, rather than in code, so that switching models also switches to the parameters tuned for that model.
Choosing temperature, top-k and top-p by requirement
The requirement decides the starting point for sampling parameters. Tasks that need consistency and correctness, such as extraction, classification, SQL generation and answers about policies, use a low temperature, so the model reliably chooses its most likely output. Tasks that need variety, such as marketing copy, brainstorming or several alternative suggestions, use a higher temperature or top-p, so repeated requests produce different results.
Lowering top-k or top-p removes improbable tokens from consideration, which reduces odd word choices without making the output fully deterministic, a useful middle ground for conversational assistants. These starting values are then refined by testing variants against the evaluation set and, for user-facing changes, with A/B tests on real traffic.
The following diagram shows the two steps of a product description feature and their inference configurations.

Parameters by requirement
Offline comparison and online A/B testing
Offline comparison runs each configuration on the evaluation set and compares quality scores, consistency across repeated runs, token usage and latency; Bedrock evaluation jobs or Prompt Management variants support this. Online A/B testing splits live traffic between the current and candidate configuration, for example 90/10 with an AppConfig feature flag or weighted routing, and compares production metrics: user ratings, task completion, escalation rate, latency and cost. Enough traffic and time are needed for differences to be meaningful, and guardrails on metrics stop a test early if the candidate is clearly worse.
The following table summarises the approach.
| Step | Method | Tooling |
|---|---|---|
| Set starting values | Requirement-based defaults | Model documentation |
| Offline comparison | Evaluation set across configurations | Bedrock evaluations; Prompt Management variants |
| Online A/B test | Traffic split with production metrics | AppConfig flags; weighted routing; CloudWatch |
| Adopt | Promote the winning configuration | AppConfig deployment or new prompt version |
The following diagram shows live traffic split between two configurations.

Tuning a configuration safely
Product description generator
Marketing complains that generated product descriptions all sound the same, while the legal team requires that specifications be stated exactly.
The task splits into two steps with different configurations: specifications are extracted at temperature 0 into structured fields, and descriptive text is generated at a higher temperature using those fields. An offline comparison of three temperatures followed by a 10% online A/B test on click-through rate selects the final value.
Where do model-specific parameters go in a Converse request?
Show answer
In additionalModelRequestFields.
Exam Tips
Remember for the exam
- Tune parameters per model; model-specific fields go in additionalModelRequestFields.
- Consistency: low temperature. Variety: higher temperature or top-p.
- Compare offline on an evaluation set, then A/B test online.
- Store configurations in AppConfig or Prompt Management, not code.