Comparing Configurations Offline and in Production
This lesson covers methods that combine offline evaluation with production traffic to find the best configuration of model, prompt and parameters, weighing quality against cost and latency.
Learning outcomes
After completing this lesson, you will be able to:
- Run multi-model evaluations on the same dataset.
- Compare configurations with A/B and canary tests.
- Analyze cost against performance.
Multi-model evaluation
Multi-model evaluation runs the same evaluation dataset and metrics against several candidate configurations, which can differ in model, prompt version, inference parameters, retrieval settings or guardrail strength. Changing only one factor at a time while holding everything else constant isolates the effect of that change; if two factors change together, it is impossible to tell which one caused a difference.
Amazon Bedrock evaluation jobs, Prompt Management variants and custom evaluation harnesses orchestrated with Step Functions all support this kind of comparison. The results feed a comparison table that records cost and latency alongside quality for each configuration, because the best-scoring configuration is not always the right choice.
Fair comparisons
A/B and canary testing in production
A/B testing splits live traffic between configurations, for example 50/50 or 90/10, and compares production metrics: user ratings, task completion, escalations, latency and cost. Assignment is usually sticky per user or session for a consistent experience. Canary testing sends a small share of traffic to a new configuration first, watches alarms on errors, latency, guardrail interventions and quality signals, and expands only if they stay healthy, rolling back automatically otherwise. Implementations use AppConfig feature flags, weighted routing in a gateway, Lambda alias traffic shifting or SageMaker AI production variants for self-hosted models.
The following diagram shows the stages of a safe model upgrade.

A/B or canary?
Cost-performance analysis
The best configuration is the one with the best balance of quality, cost and speed for the use case. Token efficiency (tokens per successful task), latency-to-quality ratios and business outcomes (resolution rate, revenue per session, time saved) are computed per configuration. A configuration that is 2% better in quality but 3 times more expensive and slower may be the wrong choice for routine traffic yet right for high-value requests. The following table compares the methods.
| Method | Data | Strength | Risk |
|---|---|---|---|
| Offline multi-model evaluation | Evaluation dataset | Controlled, repeatable, no user impact | May not reflect real traffic |
| A/B test | Split live traffic | Real user outcomes | Needs volume and time |
| Canary | Small share of live traffic | Safe rollout with automatic rollback | Small sample for quality metrics |
| Cost-performance analysis | Evaluation plus cost and latency | Balanced decision | Requires good cost attribution |
Upgrading a model safely
A newer model scores better in offline evaluation. The company wants to confirm it improves real outcomes without risking a bad experience for all users.
The team deploys it as a canary at 5% through an AppConfig flag with alarms on errors, latency and thumbs-down rate, then runs a two-week A/B test at 50% comparing resolution rate and cost per resolved conversation, and adopts it only if both are acceptable.
Why change one factor at a time when comparing configurations?
Show answer
So that any difference in results can be attributed to that factor.
Exam Tips
Remember for the exam
- Compare configurations on the same dataset, changing one factor at a time.
- Canary: small share with alarms and automatic rollback.
- A/B: split traffic and compare real outcomes.
- Decide on quality, cost and latency together.