Observability
Seeing what your AI system actually did — traces, metrics, and production evals.
2 minute read
Builds on Model evaluation. Evaluation asks is it good?; observability asks what actually happened in production, and why? Because output is non-deterministic, you can’t debug an AI system you can’t see into.
What to capture
flowchart LR
Req[Request] --> App[App]
App --> M[Model]
App --> R[Retrieval]
App --> T[Tools]
App -. traces .-> Obs[Observability - traces, metrics, evals]
M -. tokens, latency .-> Obs- Traces — the full step-by-step of a request: the prompt, retrieved context, each tool call and result, and the final output. This is what you replay when something goes wrong.
- Metrics — latency, token usage, cost, and error / refusal rates over time.
- Quality signals — user feedback (thumbs up/down), task success, and online evals (scoring a sample of real traffic, often with LLM-as-judge).
Example — a request trace
{
"request_id": "req_123",
"steps": [
{ "type": "retrieval", "query": "refund window", "hits": 3, "ms": 40 },
{ "type": "model", "input_tokens": 1850, "output_tokens": 120, "stop_reason": "end_turn", "ms": 900 }
],
"cost_usd": 0.0074,
"user_feedback": "thumbs_up"
}
When an answer is wrong, the trace shows whether the fault was in retrieval or the model.
Why it matters
- Debugging — a bad answer could come from retrieval, the prompt, a tool, or the model; only a trace tells you which.
- Cost control — tokens are money; you can’t manage what you don’t measure.
- Drift — quality can change when data, prompts, or the model version change; online evals catch it.
- Improvement — traces are also an input, not just a record: they are what a self-improving agent reads to find the failure it keeps repeating.
Offline vs. online
Offline evals (in CI) catch regressions before shipping; observability catches what real users hit after. You need both.