Evals & Observability·Question 45 of 83Advanced

How do you monitor a deployed LLM system for drift? What kinds of drift matter?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Four distinct drift classes, each needing its own detection:

  1. Model drift (upstream): providers re-point aliases, deprecate snapshots, and ship silent serving changes. Defences: pin exact model versions and treat any version change as a deploy that must pass the eval suite; run a scheduled canary eval (a fixed probe set hitting the production config hourly/daily) so behaviour shifts page you even when you changed nothing - the canary is your tripwire for silent upstream changes. Log model version per trace so any metric shift can be joined against version boundaries.
  2. Input/data drift: the traffic changes - new user cohorts, new languages, seasonal topics, a new product surface funnelling different intents, or (for RAG) corpus growth into domains your chunking/embedder handles poorly. Detect by monitoring the input distribution: intent/topic mix via a cheap classifier over sampled traffic, language mix, prompt-length percentiles, embedding-distribution shift on queries. This is the drift your frozen eval set silently stops representing - which is why offline-score vs online-metric divergence is itself a drift alarm.
  3. Behavioural/output drift: outputs shift even with pinned models - because inputs drifted, a prompt-template dependency changed, or context assembly changed. Track output-side distributions: response length, refusal rate, tool-call rate and mix, guardrail-trigger rate, judge-scored quality on a sampled slice. Refusal-rate and length shifts are cheap, sensitive canaries.
  4. Cost/latency drift: the sneaky operational one - prompt token creep as engineers append instructions, growing conversation histories, agent loops taking more steps, cache-hit-rate decay. Track tokens per request, steps per task, TTFT/p95 latency, and cost per session over time, per route. A 30% cost increase from prompt bloat is common and invisible without trend lines.
Full worked answer with diagram

Four distinct drift classes, each needing its own detection:

  1. Model drift (upstream): providers re-point aliases, deprecate snapshots, and ship silent serving changes. Defences: pin exact model versions and treat any version change as a deploy that must pass the eval suite; run a scheduled canary eval (a fixed probe set hitting the production config hourly/daily) so behaviour shifts page you even when you changed nothing - the canary is your tripwire for silent upstream changes. Log model version per trace so any metric shift can be joined against version boundaries.
  2. Input/data drift: the traffic changes - new user cohorts, new languages, seasonal topics, a new product surface funnelling different intents, or (for RAG) corpus growth into domains your chunking/embedder handles poorly. Detect by monitoring the input distribution: intent/topic mix via a cheap classifier over sampled traffic, language mix, prompt-length percentiles, embedding-distribution shift on queries. This is the drift your frozen eval set silently stops representing - which is why offline-score vs online-metric divergence is itself a drift alarm.
  3. Behavioural/output drift: outputs shift even with pinned models - because inputs drifted, a prompt-template dependency changed, or context assembly changed. Track output-side distributions: response length, refusal rate, tool-call rate and mix, guardrail-trigger rate, judge-scored quality on a sampled slice. Refusal-rate and length shifts are cheap, sensitive canaries.
  4. Cost/latency drift: the sneaky operational one - prompt token creep as engineers append instructions, growing conversation histories, agent loops taking more steps, cache-hit-rate decay. Track tokens per request, steps per task, TTFT/p95 latency, and cost per session over time, per route. A 30% cost increase from prompt bloat is common and invisible without trend lines.

Wiring: alerts fire on trend breaks, and the response runbook is always the same - join the shifted metric against version/config boundaries in traces, sample transcripts from before/after, do error analysis, and promote representative shifted cases into the eval set so the drift becomes a regression test.

Worth sketching. Pairing every drift class with its own detector shows you know one dashboard cannot catch all four.

flowchart LR
    D["Drift"] --> M["Model: alias re-pointed<br/>under a pinned name"]
    D --> I["Input: new locales,<br/>intents, longer prompts"]
    D --> B["Output: refusal rate,<br/>length, tool-call mix"]
    D --> C["Cost: prompt bloat,<br/>step creep, cache decay"]
    M --> M2["Scheduled canary eval<br/>on the production config"]
    I --> I2["Topic and language mix<br/>over sampled traffic"]
    B --> B2["Output distributions<br/>plus judge on a slice"]
    C --> C2["Tokens and steps per task,<br/>trended per route"]

What a good answer covers

  • Model drift (upstream): providers re-point aliases, deprecate snapshots, and ship silent serving changes
  • Input/data drift: the traffic changes - new user cohorts, new languages, seasonal topics, a new product…
  • Behavioural/output drift: outputs shift even with pinned models - because inputs drifted, a…
  • Cost/latency drift: the sneaky operational one - prompt token creep as engineers append instructions,…
  • Wiring: alerts fire on trend breaks, and the response runbook is always the same - join the shifted…

Key terms: Model drift (upstream) · pin exact model versions · scheduled canary eval · Input/data drift · Behavioural/output drift · Cost/latency drift

Interviewer follow-ups to expect

  1. Your canary is green but user complaints are rising - what's your canary missing?

  2. How would you detect that a provider quietly changed a model behind a pinned version string?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep