AI engineering

Monitoring AI in Production: Evaluation, Tracing and Drift

Monitoring is organised into infrastructure performance, model outputs and business outcomes. The article connects retrieval, model and tool steps through privacy-conscious traces and separates distribution drift from verified quality degradation. A support assistant missing new product documents shows why retraining is not the answer to every alert. Release manifests, targeted human review, service objectives and post-fix regression tests complete the investigation workflow.

On this page

Infrastructure health is not answer quality

A running server, a valid model response and a completed user task are separate outcomes. Request volume, p95 latency and timeouts describe infrastructure; incorrect answers, safe refusal and schema validity describe model behaviour. Human handoffs and the cost of a wrong recommendation appear at the business layer. Combining them into one AI-health score can obscure where a problem began. When labels arrive late, the period represented by a quality metric matters as much as its value.

What event chain should tracing preserve?

A single AI request may traverse retrieval, reranking, generation, tool calls and validation. Connect stages through correlation IDs, versions, duration and outcome. Traces help locate decision failures, not just optimize speed. But retaining raw prompts or customer records in every span creates privacy risk. Define redaction, sampling, retention and access controls from the beginning. Genuine traceability means proving which model action affected which production record—not merely displaying a beautiful waterfall chart.

From requests to quality investigationRequest + traceService metricsData quality signalsFailure analysisFix + regression
Figure 1. Request stages and versions are linked through traces; quality signals are validated and fixes are regression-tested.

Data drift, concept drift and performance degradation

Data drift describes changes in input distributions; concept drift describes changes in the relationship between inputs and targets. Neither is identical to performance loss. A new product line can change category frequencies while the model remains accurate. Conversely, input summaries may stay stable even as target relationships change. Interpret drift signals alongside labeled performance, reference examples and business-process changes. One statistical threshold is not universally appropriate. Intervene based on measured impact and reliable alternatives.

Quality signals for LLM and RAG systems

LLM quality includes correctness, valid schemas, citation support and access controls. RAG adds retrieval recall, index freshness, document versions and grounding. Agents add tool choice, argument validity, denied approvals and side-effect safety. None of these signals alone captures complete user success. Use sampled expert reviews and real feedback for validation. If model judges grade outputs at scale, calibrate their judgments against human labels.

Model versioning and reproducible experiments

Model names alone are insufficient to explain changes. Tokenizer, prompt templates, retrieval indexes, embedding versions, thresholds, tool contracts and runtimes all affect behavior. Record them together in a release manifest. Replaying the context and tool outputs for a failed test accelerates diagnosis. Where raw sensitive data cannot be retained, build de-identified regression cases. Without configuration and dataset versioning, comparisons between old and new releases become unreliable. A unique, traceable release ID is foundational.

Distinctions that matter in designUptime ≠ model qualityDrift ≠ performance lossTrace ≠ safe audit by defaultRetraining ≠ automatic fix
Figure 2. Infrastructure failure, data drift, concept drift and verified quality loss are not the same alert.

Moving from symptoms to root cause

When quality drops, inspect input data, ingestion, retrieval, prompts, model output and tool results in sequence. If reference questions still retrieve correct evidence but answers degrade, generator or prompt changes become stronger hypotheses. If evidence is missing, indexing and permissions come first. A wrong affected record points toward tool arguments and identity binding. Saying “the model failed” without this separation is superficial. Controlled experiments should isolate hypotheses while preserving a timeline of production changes.

When do retraining and reindexing make sense?

Automatically retraining after every drift alert risks teaching a model a broken data pipeline. Verify source quality and target-label maturity first. Missing current documents call for reindexing before generator retraining. New labeled patterns may justify feature updates or fine-tuning. Every intervention needs a cost estimate, expected gain and regression plan. After a fix, ensure not only that the observed failure disappears but also that other critical workflows remain correct.

Alert fatigue and SLO design

Too many low-value alerts exhaust operators. Prioritize by user impact, frequency, reversibility and detection reliability. SLOs translate service quality into explicit time-window targets and may include valid, timely responses rather than uptime alone. Small traffic segments are statistically noisy, so alert thresholds require care. Each incident should have an owner, response policy and rollback criteria. Measure alert precision itself: how many notifications led to useful action?

A support assistant missing new product documents

Illustrative scenario; not a measured project result.

Suppose a technical support assistant becomes less accurate after a new product line launches. API latency and error rates remain healthy, but retrieval no longer returns current manuals. Retraining the generator may not help; indexing lag and source versions deserve attention. A wrong customer record update would instead indicate a tool or identity-binding failure. This illustrates failure classification rather than a measured incident.

Not every quality problem calls for retraining

If the correct new-product document is absent from the index, retraining may not solve the retrieval problem. Access to the wrong customer record likewise concerns permission boundaries before distribution drift. Monitoring is useful when it distinguishes these causes rather than grouping them under one alert. Version information connecting requests, documents, models and tool results supports an explanation of which change affected which response.

Frequently asked questions

Does data drift mean the model is broken?

No. Input distribution can change while decision quality remains stable; labels are needed.

Should traces store all user content?

No. Combine technical traceability with minimization and redaction.

Should every quality drop trigger automatic retraining?

No. Diagnose data, retrieval, prompts and tools before deciding on retraining.

References and further reading

  1. OpenTelemetry — Documentation
  2. OpenAI — Integrations and Observability
  3. Prometheus — Documentation
  4. NIST — AI RMF Generative AI Profile