Lesson 2 of 5 Observability for Generative AI and Agents

Monitoring Foundation Model Quality Over Time

This lesson explains ongoing quality monitoring, which evaluates real outputs over time with Bedrock evaluations, since operational metrics do not show whether answers are good.

Learning outcomes

After completing this lesson, you will be able to:

  • Sample production traffic from invocation logs.
  • Schedule evaluations with bring-your-own responses.
  • Track other quality signals such as feedback and guardrail rates.

Sampling production traffic

Foundation model quality can drift even when nothing is deployed, so production outputs are evaluated regularly. With model invocation logging enabled, Amazon Bedrock stores prompts and responses in Amazon S3 or CloudWatch Logs.

A scheduled job samples recent interactions, removes or masks sensitive data, and builds an evaluation dataset from them. For RAG applications, the retrieved context is logged with each answer, so the faithfulness of answers to their sources can be judged later.

Put in order

Monitor quality in production

Exam skills 4.1.6 · 4.1.1

Arrange the steps for monitoring a foundation model's quality in production.

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

Scheduled evaluations

The sampled dataset feeds a Bedrock evaluation job using bring your own inference responses, so the logged answers are scored without regenerating them. LLM-as-a-judge metrics such as correctness, completeness, faithfulness, helpfulness and harmfulness are tracked as time series. Results are published as custom CloudWatch metrics with alarms on drops. A fixed regression set is also rerun whenever the model, prompt or knowledge base changes.

The following diagram shows the steps around a deliberate switch to a newer model version.

Moving to a newer model version deliberately. Model IDs are pinned in configuration; before switching, the regression set runs through both versions with the same judge metrics; and after switching, a weekly evaluation of 500 sampled interactions tracks faithfulness and correctness with an alarm on a 5% drop. The comparison showed better correctness but weaker format adherence, so the prompt was adjusted first.
The scenario is illustrative.

Other quality signals

User feedback (thumbs up or down, edits to drafts), guardrail intervention rates, the share of "I don't know" answers, structured output parse failures and escalation rates to humans all signal quality changes. The following table summarises the methods.

MethodMeasures
Scheduled Bedrock evaluation on sampled logsJudged correctness, faithfulness, harmfulness over time
Regression set on every changeQuality impact of model or prompt updates
User feedback metricsPerceived quality
Guardrail intervention rateSafety pressure and policy violations
Parse failures, fallback ratesFormat reliability
Sort into groups

Quality signal or cost signal?

Exam skills 4.1.6

Decide whether each signal mainly tracks answer quality or cost and capacity.

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

A provider model update

A team uses a model through a cross-Region inference profile and wants to know if quality changes when it moves to a newer model version.

  • Pin explicit model IDs in configuration so changes are deliberate.
  • Before switching, run the regression set through both versions with the same judge metrics.
  • After switching, a weekly evaluation job on 500 sampled logged interactions tracks faithfulness and correctness, with an alarm on a 5% drop.

The new version scores higher on correctness but slightly lower on format adherence, so the prompt is adjusted before rollout, an issue that latency and error metrics would never have shown.

Check yourself

How can logged production responses be scored?

Show answer

With Bedrock evaluations using your own responses (bring your own responses).

Exam Tips

Remember for the exam

  • Enable invocation logging to keep prompts and responses for evaluation.
  • Score logged responses with Bedrock evaluations (bring your own responses).
  • Publish quality scores as CloudWatch metrics with alarms.
  • Rerun a regression set on every model, prompt or knowledge base change.
  • Track guardrail interventions and user feedback as quality signals.