All insights

Platform & reliability

AI observability in production: what to measure before it breaks

Peak AI EngineeringJuly 13, 20267 min read

Logs tell you that a request failed. AI observability should tell you why quality, latency, or cost changed, across models, retrieval, tools, and the full user journey.


Traditional application monitoring answers familiar questions: Is the service up? How long did the request take? Which dependency failed? Those signals still matter for AI systems, but they are not enough.

An AI feature can return HTTP 200, stay within its latency budget, and still give a poor answer. It can retrieve the wrong evidence, choose an inappropriate tool, drift after a model update, or quietly become too expensive to operate. Production AI observability has to make those failures visible before users become the monitoring system.

Logs are necessary, but they are not observability

A list of prompts and responses is useful during development. In production, it quickly becomes an expensive pile of text that is difficult to search and risky to retain.

Useful observability starts with structured events. For each run, capture the identifiers and decisions needed to reconstruct what happened:

  • feature, tenant, user journey, and release version;
  • model, prompt, parameters, and routing decision;
  • retrieval query, selected documents, ranks, and citations;
  • tool calls, validated inputs, outputs, retries, and failures;
  • token usage, latency, and estimated cost at each step;
  • evaluation, guardrail, and human-review outcomes.

The goal is not to store everything forever. It is to preserve enough context, with appropriate redaction and retention, to explain a result and compare it with previous behavior.

Trace the whole run, not isolated model calls

Most production AI features are pipelines. A user request may pass through intent classification, retrieval, re-ranking, generation, tool execution, and post-processing. Looking only at the final model call hides where quality was actually lost.

A trace should connect every step under one run identifier. When a response is slow, you can see whether retrieval, a tool, or the model caused it. When an answer is wrong, you can determine whether the model ignored good evidence or received bad evidence in the first place.

This distinction changes the fix. Prompt tuning will not repair a retrieval index that consistently returns the wrong documents.

Measure quality as an operating signal

Uptime and error rate are straightforward. AI quality is not, but treating it as unmeasurable is a choice.

Start with a small evaluation set built from representative and high-risk requests. Run it on every meaningful prompt, model, retrieval, or orchestration change. Track dimensions that match the feature: groundedness, completeness, task success, citation accuracy, tool-selection correctness, or safe refusal behavior.

Then connect offline evaluation to production signals:

  • sampled automated evaluations on real, redacted traffic;
  • explicit user feedback tied to the trace that produced the output;
  • task completion or downstream correction rates;
  • human review for high-impact or uncertain cases;
  • distribution shifts in inputs, retrieval results, and model responses.

No single metric proves quality. A useful dashboard combines several weak signals into a trend your team can investigate.

Put latency and cost at the right level

An average cost per request hides the decisions that created it. Instrument cost and latency by feature, tenant, model, route, and pipeline step.

That makes operational questions answerable. Did a new prompt increase context size? Is one tenant producing unusually expensive retrieval requests? Did a fallback route become the default after a provider change? Is the premium model improving quality enough to justify its cost?

Percentiles matter too. A reasonable average can hide a painful p95 caused by long context, repeated tool calls, or retry loops.

Retrieval needs its own telemetry

For RAG systems, retrieval is not an implementation detail. It is a product surface and should be observed independently from generation.

Track the query issued to retrieval, filters applied, candidate counts, selected chunks, scores, re-ranking changes, and the evidence cited in the final answer. Add evaluation cases for known-answer questions and monitor whether the expected sources remain retrievable after indexing changes.

When retrieval quality drops, you want to know whether the cause was ingestion, chunking, metadata, filtering, ranking, or stale content, not simply that “the chatbot got worse.”

Alerts should point to an owner and an action

Alerting on every model refusal or low score creates noise. Alerts should represent a material change and lead to a response someone can take.

Examples include a regression against a release baseline, a sustained cost increase, a rise in tool failures, missing citations for a grounded workflow, or a new cluster of unsafe outputs. Each alert needs an owner, a severity, and a first diagnostic view containing the relevant traces.

If an alert cannot change a decision, it probably belongs on a dashboard instead.

A practical minimum

You do not need a perfect observability platform before launch. A credible minimum is:

  1. structured traces across the complete AI workflow;
  2. latency and cost by step, model, and feature;
  3. a versioned evaluation set with regression checks;
  4. retrieval and tool-call telemetry where applicable;
  5. redaction, access controls, and retention rules;
  6. a small set of actionable alerts with named owners.

Build this before broad rollout, not after the first incident. Observability is what lets you change models, prompts, tools, and data without turning every release into a guess.

The production question is not whether an AI system will behave unexpectedly. It is whether your team will be able to see why, limit the impact, and improve it deliberately.

Working on something like this?

We help teams take AI from a promising prototype to a system that ships and holds up.

Book a Discovery Call
Let’s talk

Have an AI system that needs to work in production?

Tell us what you’re shipping. We’ll give you an honest read on the right next step.