Back to Research
Tutorials
Updated
12 min read

LLM Monitoring: How to Detect Quality Drift in Production, and 8 Tools Compared

DeepRails
DeepRails Engineering Team
DeepRails

To catch a production LLM app getting worse, score a sample of live answers automatically, compare this week's scores with a baseline, re-run a fixed test set after every model or prompt change, and alert when scores drop. Quality drifts for four reasons: the model changes, your prompt changes, your users' questions change, or the documents you retrieve go stale.

Your LLM was performing great last week. Today, users are complaining. What changed? Model updates, prompt modifications, and data distribution shifts can silently degrade AI quality. This guide shows you how to build monitoring systems that detect performance drift before it impacts users, and compares the LLM monitoring tools that can do it for you.

The Silent Degradation Problem

An LLM app rarely crashes when its quality drops. It keeps returning fluent answers without errors, so uptime and error-rate dashboards stay green. Drift shows up only when you score what the answers say, or when users complain.

Sources of Performance Drift

1. Model Updates

The problem: The model behind your app changes in three ways. Alias names move: OpenAI's chat-latest alias is regularly pointed at a new snapshot, and Google swaps each "latest" Gemini alias with every new release. Pinned models retire: OpenAI shut down gpt-4 and gpt-4-turbo on October 23, 2026 (OpenAI deprecations), and Anthropic gives at least 60 days' notice before retiring a model (Anthropic). And even a pinned model can shift a little: Anthropic says the serving infrastructure around a model can change and cause minor differences in behavior (Anthropic).

Detection strategy: Pin a fixed model ID in production rather than an alias, as OpenAI (OpenAI) and Google (Gemini models) both recommend, and watch the providers' deprecation pages. Re-run your golden dataset before switching models. Track model version strings and monitor for sudden changes in output characteristics (length, tone, format) even when version numbers don't change.

2. Prompt Modifications

The problem: Well-intentioned prompt improvements can have unintended side effects on edge cases.

Detection strategy: Run regression tests on a golden dataset before and after prompt changes. Track prompt version alongside quality metrics.

3. Data Distribution Shift

The problem: User queries evolve over time. A model optimized for last quarter's questions may struggle with this quarter's.

Detection strategy: Monitor query characteristics (length, complexity, topics) and correlate with quality metrics. Segment performance by query type.

4. Context Quality Degradation

The problem: In RAG systems, retrieval quality can degrade as document stores grow stale or indexing breaks.

Detection strategy: Monitor context adherence scores. Sudden drops indicate retrieval issues, not model issues.

Key Metrics to Monitor

Quality Metrics

  • Correctness score: Track mean and P95. Alert if mean drops >5% or P95 drops >10%.
  • Completeness score: Partial answers indicate prompt or model issues.
  • Safety violations: Even rare violations are critical. Alert on any increase.
  • Context adherence: For RAG systems, this is your early warning for retrieval problems.

Operational Metrics

  • Latency: P50, P95, P99. Model updates often change latency profiles.
  • Token usage: Sudden increases indicate verbosity changes or infinite loops.
  • Error rate: API errors, timeouts, rate limits.
  • Cost per request: Track total cost and cost per quality point.

User Behavior Metrics

  • Regeneration rate: % of responses where users click "regenerate"
  • Thumbs down rate: Direct user feedback signal
  • Follow-up question rate: High rates suggest incomplete initial answers
  • Session abandonment: Users giving up mid-conversation

Drift Detection Algorithms

Statistical Process Control

Track metrics in control charts. Alert when values exceed control limits:

function detectDrift(currentMetric, historicalData) {
  const mean = calculateMean(historicalData);
  const stdDev = calculateStdDev(historicalData);
  
  // 3-sigma rule: 99.7% of values should be within 3 std devs
  const upperLimit = mean + (3 * stdDev);
  const lowerLimit = mean - (3 * stdDev);
  
  if (currentMetric > upperLimit || currentMetric < lowerLimit) {
    return {
      drift: true,
      severity: Math.abs(currentMetric - mean) / stdDev,
      direction: currentMetric > mean ? 'increase' : 'decrease'
    };
  }
  
  return { drift: false };
}

Sliding Window Comparison

Compare recent performance to a baseline window:

function compareWindows(recentData, baselineData) {
  const recentMean = calculateMean(recentData);
  const baselineMean = calculateMean(baselineData);
  
  const percentChange = ((recentMean - baselineMean) / baselineMean) * 100;
  
  // Alert thresholds
  const WARNING_THRESHOLD = 5;  // 5% change
  const CRITICAL_THRESHOLD = 10; // 10% change
  
  if (Math.abs(percentChange) > CRITICAL_THRESHOLD) {
    return { alert: 'CRITICAL', change: percentChange };
  } else if (Math.abs(percentChange) > WARNING_THRESHOLD) {
    return { alert: 'WARNING', change: percentChange };
  }
  
  return { alert: 'OK', change: percentChange };
}

Golden Dataset Strategy

Maintain a curated set of test cases that represent your application's critical paths:

  • Representative coverage: Include common queries, edge cases, and known failure modes
  • Expert-labeled: Have ground truth answers or quality scores for each case
  • Regularly updated: Add new cases when you discover novel failure patterns
  • Run continuously: Evaluate your model against this dataset daily or after every change

Alert Configuration

P0: Immediate Action

  • • Safety violations increase by any amount
  • • Correctness drops >15%
  • • Error rate >10%
  • • User complaints spike 3x

P1: Investigate Today

  • • Correctness drops 10-15%
  • • Completeness drops >10%
  • • Latency P95 increases >50%
  • • Cost per request increases >30%

P2: Monitor Closely

  • • Correctness drops 5-10%
  • • Regeneration rate increases >20%
  • • Token usage increases >25%
  • • Latency P95 increases 25-50%

P3: Note and Track

  • • Minor metric fluctuations
  • • Single outlier data points
  • • Non-critical format changes
  • • Acceptable cost increases

LLM Monitoring Tools Compared (October 2026)

You don't have to build all of this yourself. Eight tools that score live LLM traffic, from each vendor's own pages on October 23, 2026. The last column is the one that matters for users: most tools tell you an answer was bad after it was sent; few can change it first.

ToolScores live trafficAlerts on quality scoresOpen sourceFree tier and entry priceChanges the answer before the user sees it
DeepRails Monitor and DefendYes (docs)Real-time dashboards of scores and failure ratesNoFree Playground; plans from $49 a month plus usage (pricing)Yes, with Defend: repairs or regenerates, then re-scores
LangSmithYes (docs)Yes, on feedback scores (docs)No; self-hosting on EnterpriseFree: 5k traces a month; Plus $39 per seat a month (pricing)No
LangfuseYes (docs)Yes (docs)Core is MIT, enterprise features are commercially licensed; core self-hosting is freeFree: 50k units a month; Core $29 a month (pricing)No
Arize AXYes (docs)Yes (docs)Arize Phoenix is source-available (Elastic License 2.0), without live evals or alertsFree: 25k spans a month; Pro $50 a month (pricing)Partly: guards can return a default answer or re-ask
Datadog Agent ObservabilityYes (docs)Yes, monitors on evaluation resultsNoFree up to 40K LLM spans a month; Pro from $160 a month, billed annually (pricing)No; Datadog's separate AI Guard (Preview) can block once blocking is turned on
BraintrustYes, after the answer is sent (docs)Yes (docs)No; self-hosting on EnterpriseFree Starter; Pro $249 a month (pricing)No
W&B Weave (CoreWeave)Yes (docs)Yes, through Slack and webhook automationsSDK under Apache 2.0; a self-managed server needs a licenseFree: 1 GB a month; Pro from $60 a month (pricing)Yes, with code changes: guardrails can block or modify answers (docs)
Splunk Agent Observability (formerly Galileo)Yes (docs)Yes (docs)Its Agent Control guardrails are Apache 2.0; the platform isn'tFrom $100 a month per 1.2 million spans, billed annually; free edition (pricing)Blocks, or steers the agent to fix its own answer
  • Want open source you host yourself: Langfuse.
  • Already on LangChain or Datadog: LangSmith or Datadog Agent Observability keep everything in one place.
  • Evaluation-heavy teams: Arize AX and Braintrust are built around turning production traces into test sets.
  • A wrong answer must never reach the user: pair monitoring with a correction layer such as DeepRails Defend.
  • Left out: Helicone, a request gateway, says it doesn't run evaluations itself (docs), so it can't catch quality drift on its own.

DeepRails Monitor

DeepRails Monitor scores every live answer you send it with DeepRails' guardrail metrics (correctness, completeness, instruction, context and ground-truth adherence, and comprehensive safety) and charts request volume, failure rate, latency, tokens and cost in real time. Tag events with a nametag, such as a release name, to compare scores before and after a change. Monitor only watches; DeepRails Defend is the part that fixes a failing answer before it reaches the user.

Explore Monitor

Conclusion

LLM quality doesn't stay constant. Model updates, prompt changes, and data drift are inevitable. The question isn't whether performance will degrade—it's whether you'll detect it before your users do.

Build monitoring systems that track quality metrics continuously, maintain golden datasets for regression testing, and alert intelligently based on statistical drift. Treat LLM monitoring with the same rigor as traditional software monitoring—because that's what it is.


DeepRails scores every AI answer and corrects hallucinations before users see them. If you're deciding how to monitor an LLM app in production, book a free call.

Book a free call
Share this article:
Tutorials