Chapter CAI MonitoringPage 2 of 8

AI Monitoring

Understand the mechanism

Follow information through the system: explain AI monitoring by connecting a concrete decision to observable evidence.

~13 minMechanism

Before you start

Why this matters

Imagine you own a customer-support assistant and must explain one decision to a teammate who knows basic AI vocabulary but has never operated this feature. Write two sentences: what problem does AI monitoring solve, and what evidence would show it is solving that problem? Do not name a vendor or model yet. This separates the enduring idea from one implementation.

1Learn the idea

Read

The information path

See it

Training time vs chat time

Training

Huge dataHeavy computeWeights

Inference

Your promptFrozen modelReply

Training = long study · Inference = quick answer from what it already learned

Each request should emit a trace joining model and prompt versions, retrieval or tool events, token use, latency, policy decisions, output, user feedback, and business outcome. Online monitors detect shifts quickly; sampled human review and delayed labels determine whether a shift was actually harmful. Read that as a pipeline, not magic. At each arrow, name the representation, owner, and possible loss.

A useful trace is input → preprocessing → model operation → postprocessing → action. Preprocessing may tokenize, parse, retrieve, resize, or filter. The model operation estimates a continuation, score, noise update, or preference. Postprocessing may validate a schema, fuse rankings, enforce policy, or attach provenance. Only then should the product act.

For a customer-support assistant, record identifiers for every changeable stage. If two runs differ, you should be able to ask whether the input, prompt, model weights, retrieved corpus, decoding settings, tool result, or policy changed. Without those identifiers, randomness becomes the default explanation for every bug.

Read

What the mechanism guarantees—and does not

The mechanism guarantees only what its explicit deterministic stages guarantee. Learned components produce estimates based on training and current context. Observability supplies evidence about what happened; evaluation interprets quality against a rubric; monitoring repeats selected evaluations over live traffic; incident response changes the system. None of these is model selection, and a dashboard without an owner and response rule is decoration. Therefore a successful-looking output does not prove that the right evidence was used. Preserve intermediate artifacts when privacy permits: candidate lists, cited spans, memory IDs, judge scores, coordinates, or agent handoffs.

Latency and cost accumulate across the path. If stages take 120 ms, 480 ms, and 900 ms sequentially, the lower-bound latency is 1.5 seconds before network overhead. Parallel stages take approximately the slowest branch, but then require merging and timeout behavior. This arithmetic matters because an elegant pipeline that misses the user’s deadline is not operationally correct.

Read

Mechanism walk-through

A release changes retrieval top-k from 4 to 10. Citation coverage rises from 82% to 91%, but p95 latency moves 1.8→3.1 seconds and Spanish task success falls 78%→62%. A segmented alert fires; traces show long Spanish documents crowding the prompt. Roll back, then test top-k 6 with language-aware reranking. Notice the causal language: an observed input or configuration changed an intermediate artifact, which changed a measured outcome. “The model got worse” is not yet a diagnosis. A diagnosis points to a stage and offers a falsifiable test.

When drawing this mechanism, mark trust boundaries. External documents, user text, images, and agent messages are data, not governing instructions. Tools should receive typed arguments and least privilege. Stored traces and memories need access controls because observability can quietly become a second sensitive database.

Read

Debugging questions

  1. Did the correct input reach preprocessing intact?
  2. Was the intended model, prompt, index, or checkpoint loaded?
  3. Which intermediate artifact first differs from a good run?
  4. Did postprocessing reject, distort, or silently coerce the result?
  5. Did the product action reflect the validated output?

Answer these in order. Jumping directly to prompt edits can mask a parser, permissions, retrieval, or serving defect.

Checking tutor…

Continue learning · glossary & guides