Lesson 3 of 4 Evaluating FM Outputs

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.

True or false

Fair comparisons

Exam skills 5.1.2

Check three claims about comparing several candidate configurations.

Log in to try this activity Interactive activities are free with an account.

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.

Upgrading a model safely. After a better offline evaluation, the new model runs as a 5% canary through an AppConfig flag with alarms on errors, latency and thumbs-down rate, then in a two-week 50% A/B test comparing resolution rate and cost per resolved conversation, and is adopted only if both improve.
The traffic shares and duration come from the scenario above.
Scenario questions

A/B or canary?

Exam skills 5.1.2

Choose the production testing approach for each goal.

Log in to try this activity Interactive activities are free with an account.

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.

MethodDataStrengthRisk
Offline multi-model evaluationEvaluation datasetControlled, repeatable, no user impactMay not reflect real traffic
A/B testSplit live trafficReal user outcomesNeeds volume and time
CanarySmall share of live trafficSafe rollout with automatic rollbackSmall sample for quality metrics
Cost-performance analysisEvaluation plus cost and latencyBalanced decisionRequires good cost attribution
Worked example

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.

Check yourself

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.