- In short
- Anomaly detection sets threshold alerts on the metrics that matter, such as a cost spike exceeding a percentage of the trailing average or a p95 latency crossing the SLA line. Model drift, a gradual change in output distribution on stable inputs over time, is harder to catch with simple threshold alerts and benefits from periodic distribution comparison instead. Change-attribution instrumentation should distinguish model drift, data drift, and model update effects when a monitored metric moves. Threshold alerts work well for sudden shifts; gradual drift needs a different detection method.
Two kinds of change need two kinds of detection
Once metrics are being captured and decomposed, you need something watching them, but not everything worth catching looks the same. Some changes are sudden, a cost spike, a latency jump, and some are gradual, a slow shift in output quality over weeks. The apply-level skill here is matching the detection method to the shape of the change: threshold alerts for sudden shifts, distribution comparison for gradual drift, and using each metric's own baseline rather than one generic rule for all of them.
- Anomaly detection and alerting
- The monitoring layer that catches when a metric moves. Threshold alerts fire when a metric crosses a set line, a cost spike beyond a percentage of the trailing average, a p95 latency past the SLA, each with its own baseline. Model drift, a gradual shift in output distribution on stable inputs, evades sudden thresholds and is caught by periodic distribution comparison instead. Change-attribution instrumentation distinguishes model drift, data drift, and model update effects when the alert fires.
Threshold alerts for sudden shifts
Threshold alerting is the right tool for changes that happen suddenly. You set a line on a metric that matters and fire an alert when the metric crosses it: a cost spike that exceeds, as a worked example, 150% of the trailing 7-day average, or a p95 latency that crosses the SLA threshold. These work well because the failures they target are step changes, a spike or a breach that clearly exceeds the recent baseline, so a threshold catches them promptly. The specific figure is a design choice, but pairing a concrete multiple with a defined trailing window, rather than a bare "watch the cost," is what turns an intention into an alert that actually fires.
The key discipline is that each metric needs its own baseline and its own threshold logic. A cost spike and a latency SLA breach are different phenomena, measured on different scales against different baselines, and a single generic threshold cannot serve both. Cost alerts key off the trailing average; latency alerts key off the SLA line. Setting one blanket threshold for everything either misses real anomalies on one metric or floods you with false alarms on another.
Distribution comparison for gradual drift
Threshold alerts have a blind spot, and it is exactly the failure mode LLM systems are prone to: model drift, a gradual change in the output distribution on stable inputs over time. Because drift is slow, it rarely crosses a sudden threshold in a single step, it creeps below the alert line, day after day, never triggering, until the cumulative shift is large. A threshold tuned to catch spikes simply will not fire on a slow creep.
Catching drift needs a different method: periodic distribution comparison. Rather than waiting for a line to be crossed, you compare the output distribution now against the distribution from an earlier period, and a gradual shift shows up as a growing difference between the two even though no single day tripped a threshold. So the two methods are complementary, thresholds for sudden shifts, distribution comparison for gradual drift, and a monitoring design that uses only thresholds is blind to drift by construction.
Alerts point to attribution
Detecting that a metric moved is only the first half; the second half is knowing why. Change-attribution instrumentation should be able to distinguish the three causes a metric can move for, model drift (gradual behaviour change on stable inputs), data drift (the input distribution changed), and model update effects (the version changed), because each demands a different mitigation. An alert that fires without the instrumentation to attribute the cause leaves the team guessing, and guessing defaults to the wrong fix. Good alerting is wired to the change-attribution evidence that turns "something moved" into "here is what moved and why."
What the exam trips candidates on
The first trap is relying only on hard threshold alerts to catch model drift, when drift is gradual and rarely crosses a sudden threshold. A scenario will show a team expecting a threshold to catch a slow quality decline; the credited reading explains that drift creeps below the alert line and must be caught by periodic distribution comparison instead.
The second trap is setting a single generic alert threshold for both cost spikes and latency SLA breaches, when each requires its own baseline and threshold logic. A scenario will apply one blanket rule to different metrics; the correct answer separates them, keying cost off the trailing average and latency off the SLA, each with its own threshold.
Worked example
A team sets one anomaly rule, 'alert if any metric moves more than 20% from yesterday', to cover cost, latency, and output quality. Over two months, cost spikes and latency breaches are caught, but output quality slowly degrades without ever firing an alert. Diagnose the monitoring design and fix it.
The design has two distinct flaws, and the quality miss is the more instructive one.
First, the single generic 20%-from-yesterday rule is the wrong shape for the metrics it covers. Cost and latency are different phenomena on different scales with different baselines: a cost spike is best measured against a trailing average, and a latency problem is best measured against the SLA line, not against yesterday. A blanket day-over-day rule will misfire on both, too sensitive on a naturally variable metric, too blunt on another, because it ignores each metric's own baseline. The fix is to give cost and latency their own threshold logic: a cost alert on a spike beyond a set percentage of the trailing average, and a latency alert when p95 crosses the SLA.
Second, and this is why the quality decline slipped through, threshold alerting is the wrong method for drift entirely. Output quality degraded gradually, a slow creep over two months, and by construction a threshold rule fires only when a metric jumps across a line in a step. A gradual shift never makes that jump; each day's change is under 20%, so the alert never fires while the cumulative shift becomes large. This is model drift, and it is invisible to thresholds. The fix is to add periodic distribution comparison for output quality: compare the current output distribution against an earlier baseline on a schedule, so the growing difference surfaces even though no single day tripped a threshold.
The redesigned monitoring uses per-metric threshold alerts (cost off the trailing average, latency off the SLA) for the sudden shifts, and distribution comparison for the gradual quality drift, and it wires alerts to change-attribution instrumentation so that when something does move, the team can tell whether it is drift, a data shift, or a version update. One generic threshold could never do all of that, which is why the quality decline ran unnoticed for two months.
Common misreadings to avoid
Misconception
A threshold alert will catch model drift if you set it sensitively enough.
What's actually true
Misconception
One alert threshold can cover cost, latency, and quality together.
What's actually true
How this shows up on the exam
Domain 4 questions on this knowledge point present a threshold expected to catch drift, or one generic threshold across different metrics. The reliable moves are to use threshold alerts with per-metric baselines for sudden shifts, add distribution comparison for gradual drift, and wire alerts to change-attribution so a firing alert points toward the right cause.
This builds on request-level tracing and aggregate metrics, which supply the metrics being watched, and on the four logging categories beneath them. The drift-versus-sudden distinction is the detection side of change attribution, latency alerting targets the p95 design target, and it complements discernment, which catches quality problems no metric alert can express.
A team uses one rule, 'alert if a metric moves 20% from yesterday', for cost, latency, and quality. Cost and latency anomalies fire, but a slow two-month quality decline never alerts. What is the correct fix?
People also ask
How do you set alert thresholds for a Claude system?
Why do threshold alerts miss model drift?
How do you detect gradual model drift?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
No videos curated for this concept yet
We are still curating the best official and community videos for this topic.
Official prep for this domain
Anthropic's own free prep module for this part of the syllabus, on the official prep course. Free with an Anthropic Academy sign-in.
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.