Course menuAIP-C01

Exams / AIP-C01 / Study guide / Quality gates and validation for model and prompt updates

Quality gates and validation for model and prompt updates: AIP-C01 study notes and practice questions

What to know about Quality gates and validation for model and prompt updates for the AIP-C01 exam, from the Testing, Validation, and Troubleshooting domain (11% of the exam guide), then 1 free question to test it. Part of the AIP-C01 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

Quality gates protect users from changes that pass code tests but make answers worse. Know which checks run before release, which run while traffic shifts, and which run after deploy.

Gates before promotion

Put evaluation in the pipeline. Run the golden regression suite on every prompt or model change, and fail the build when a metric falls below its threshold, such as correctness, faithfulness or a hallucination-rate limit. Compare the candidate with the current version on the same inputs. Block promotion until the gate passes.

Semantic drift and hallucination

Compare old and new outputs for the same questions using embedding similarity to find drift, then read the largest differences by hand. Set a hallucination-rate threshold from grounded checks, such as a contextual grounding check or a faithfulness evaluation, and block promotion when the rate rises above it. Re-run the regression suite when the base model version changes, even if your code did not change.

Gradual rollout with rollback

For a SageMaker AI endpoint, use deployment guardrails. Blue/green deployment with canary or linear traffic shifting moves traffic in steps, and automatic rollback runs when a CloudWatch alarm fires, such as an error-rate, latency or quality alarm. For Bedrock-backed applications, shift a percentage of traffic in your application or through an alias, and watch the same metrics.

Post-deploy synthetic checks

CloudWatch Synthetics canaries run scripted user workflows against the live application on a schedule. A typical canary signs in, asks a question and checks that a cited answer comes back. A failed canary raises an alarm even when no code changed. Pair canaries with the rollback alarms.

How to choose

Scenario wording Choose
Block a prompt change that lowers accuracy Automated quality gate in the pipeline
Confirm a new model gives similar answers Semantic drift check, old versus new
Limit hallucinations before promotion Hallucination-rate threshold with grounding checks
Roll out a new SageMaker AI model safely Blue/green canary with CloudWatch alarm rollback
Detect breakage after deploy Synthetics canary on the user workflow
The base model version changed Re-run the regression suite

Common traps

  • Gating only on unit tests, which do not measure answer quality.
  • Shifting all traffic at once for a model change.
  • Rollback with no alarm, so a bad release stays live.
  • Judging drift by exact string match, which flags harmless rewording.
  • Using SageMaker AI Model Monitor for GenAI quality. It is closed to new customers, so use Bedrock evaluations and CloudWatch alarms.

See also: model evaluation and GenAI monitoring

Try the 1 practice question

A game studio uses a large model to write dialogue for non-player characters. The studio is moving to a newer model version, and it also keeps a separate prompt version for each character's voice. Prompt versions live in Amazon Bedrock Prompt Management, and production reads the version to use from a Parameter Store parameter.

A regression in one category, such as a rude remark slipping into a children's quest, is much more damaging than a small dip in fluency. The studio's evaluation suite scores each reply on five categories: accuracy, fluency, tone, safety and lore consistency. The studio also needs to roll back in seconds if production gets worse.

Which promotion process meets these requirements?

Choose one answer.

  1. A. Compare only the average score across all five categories, and move the production parameter to the new version whenever the average is equal to or higher than the current version's average.
  2. B. Move the production parameter to the new version first, then run the evaluation suite overnight and revert the parameter the next morning if the scores have dropped.
  3. C. Have a designer read a sample of 20 new dialogue lines before each release, then promote the new version by hand in the console if the lines look fine.
  4. D. Run the full suite on the candidate in the pipeline, require every category to meet its own threshold, and move the production parameter only on a pass.
Show the answer and explanation

Answer: D

  • A. Wrong: An average can hide a drop in safety when fluency rises, so a harmful regression could pass the gate. Promotion would be safe on paper but wrong for the most damaging category.
  • B. Wrong: Players would see the regression for hours before a revert, which fails the damage requirement. Scoring after promotion is monitoring, not a quality gate.
  • C. Wrong: Twenty lines cannot show a rare safety regression across thousands of replies. Manual promotion is also slow and error-prone for a studio that updates often.
  • D. Right: Per-category thresholds stop a regression in safety or lore from being averaged away, and the gate blocks the parameter change before players see anything. Keeping the previous version lets the parameter point back in seconds. Learn more: Create and manage prompts with Prompt management (opens in a new tab)

Explanation

Per-category thresholds catch regressions that an overall average would hide, and the pipeline moves the production parameter only after a pass. Keeping the previous prompt version lets the team point the parameter back in seconds. Averages, post-release checks and manual sampling each let a damaging regression reach players or depend on people to catch it.

Study

Want more on Quality gates and validation for model and prompt updates? The 5 full-length practice sets have 5 more Quality gates and validation for model and prompt updates questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Quality gates and validation for model and prompt updates

More Testing, Validation, and Troubleshooting topics