Lesson 1 of 3 Quality Assurance and Deployment Validation

Running Continuous Evaluation and Regression Tests

This lesson covers regression tests that run on every change and evaluations that run continuously, with gates that enforce standards, since quality can change without any deployment.

Learning outcomes

After completing this lesson, you will be able to:

  • Build a regression suite for model outputs.
  • Run continuous evaluation workflows.
  • Enforce standards with automated quality gates.

Regression testing for model outputs

A regression suite is a fixed set of inputs with expected properties or reference answers, run whenever anything that affects outputs changes: prompt templates, model or model version, inference parameters, retrieval configuration, guardrails or tool definitions. Results are compared with the current production baseline per metric and per category, so a change that improves average quality but breaks one category is caught. Deterministic checks (format, required elements, refusals where expected) are combined with judge-based quality scores.

The following diagram shows how a model change made by a provider, with no deployment, was detected and fixed.

Catching a provider-side model change. With no deployment, the nightly benchmark showed format validity falling from 100% to 96% for one feature. Gateway logs showed the route used a third-party provider's latest alias, which had moved to a new model version; pinning a specific version fixes it.
Pinned versions change only when the team chooses.

Continuous evaluation workflows

Quality can change even when the team deploys nothing: a model provider may update a model, the documents in a knowledge base change, and users begin asking new kinds of questions. Continuous evaluation therefore runs on a schedule, independently of deployments, for example running the golden dataset nightly and scoring a daily sample of production interactions with LLM judges and rules.

A Step Functions workflow started by EventBridge Scheduler can sample model invocation logs, run judge evaluations or start Bedrock evaluation jobs, aggregate the scores and publish them to Amazon CloudWatch, where alarms detect drops. This catches provider-side model updates, drift in the data and slow erosion of quality that no single change caused.

Select all that apply

Why evaluate on a schedule?

Exam skills 5.1.4

Quality can change even when the team deploys nothing. Choose the causes that scheduled evaluation catches.

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

Automated quality gates

Quality gates turn evaluation into enforcement in CI/CD. A gate defines pass criteria: absolute thresholds (faithfulness at least 0.90, format validity 100%), relative criteria (no metric more than 2 points below baseline, no category regression), safety criteria (red-team attack success below 1%) and budgets (p90 latency and tokens per request within limits). CodePipeline stages or Step Functions run the suites and fail the deployment if any criterion fails, attaching a report. The following table summarises the QA components.

ComponentRunsPurpose
Regression suiteOn every changeCatch regressions before release
Golden dataset benchmarkNightlyDetect drift and provider updates
Production sampling with judgesDaily or continuouslyMeasure real-world quality
Quality gateIn the pipelineBlock releases that fail criteria
CloudWatch alarms on scoresContinuouslyAlert on drops between releases

The following diagram shows the criteria a candidate must meet.

An automated quality gate in CI/CD. The candidate passes only if absolute thresholds, relative criteria against the baseline, safety criteria and latency and token budgets are all met; otherwise the release is blocked with a report.
The thresholds are examples; each team sets its own.
Scenario questions

Applying a quality gate

Exam skills 5.1.4

The gate requires faithfulness of at least 0.90, 100% format validity and no metric more than 2 points below baseline. Decide each release.

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

A provider update

No deployment happened, but the nightly golden dataset benchmark shows format validity dropping from 100% to 96% for one feature.

The alarm leads the team to the GenAI gateway's logs: the feature's route was configured with a third-party provider's "latest" model alias, which the provider had moved to a new model version with a different output style. Pinning a specific model version (on Bedrock, a versioned model ID or inference profile) in configuration, adjusting the prompt and passing the regression gate restores validity, and future model upgrades go through the gate.

Check yourself

Which changes should trigger the regression suite?

Show answer

Any change to prompts, models, retrieval or guardrails.

Exam Tips

Remember for the exam

  • Run the regression suite on any change to prompts, models, retrieval or guardrails.
  • Continuous evaluation catches drift and provider updates between releases.
  • Quality gates combine thresholds, baseline comparisons, safety and budgets.
  • Publish evaluation scores to CloudWatch with alarms.