Observability, Drift, and Release Management
Observe the system, not just the final text
A useful trace records request ID, model/version, prompt version, retrieval index version, latency per stage, token use, failure category, and tool outcomes. Store sensitive text only when permitted and necessary. A structured event often reveals more than a large unreviewed transcript.
Distinguish retrieval misses, invalid outputs, unsupported claims, transport failures, policy blocks, user cancellations, and budget exhaustion. Combining every failure into “AI error” makes improvements difficult.
Drift comes in several forms
Input distributions can change: new languages, longer tickets, or new product terminology. Relationships between inputs and labels can change: a product release may make old bug descriptions obsolete. The source of truth can also change, such as a refund window moving from 14 to 21 days.
Monitor data characteristics and outcome quality. User feedback is valuable but selective: only some users report problems, and a thumbs-up does not establish factual correctness. Sample outputs for review and maintain targeted regression cases.
flowchart LR
A[Versioned candidate] --> B[Offline evaluations]
B --> C[Limited rollout]
C --> D[Monitor outcomes and slices]
D --> E{Acceptance criteria met?}
E -->|Yes| F[Expand rollout]
E -->|No| G[Rollback and diagnose]
G --> ARelease one coherent artifact
Version model settings, prompts, validators, retrieval configuration, tools, and evidence schemas. Record compatible combinations. A model upgrade can change tool-calling or formatting behavior even when the API shape remains similar.
Use offline regression tests before a canary release. A canary serves a limited share of real traffic; shadow evaluation runs a candidate without letting it take user-visible actions. Shadowing consequential tools requires a read-only or simulated path to avoid duplicate writes.
Incident response
If an answer leaks data, disable the affected capability, preserve authorized diagnostic evidence, identify exposed records, and follow the organization's incident process. A rollback can restore behavior but does not undo an already disclosed secret or completed transaction.
Checkpoint with answers
What must a reproducible regression report contain? A minimal permitted example, artifact versions, relevant evidence IDs, expected behavior, actual behavior, and stage-level failure details.
Exercise: A new prompt passes English tests but fails long Spanish tickets. What should change? Answer: expand representative evaluation slices, investigate context and language handling, and hold or narrow rollout until the affected cases meet requirements.
Does rolling back a model reverse a refund? No. Side effects require their own business recovery process.