Skip to content
Tecno Blocks
DevOps9 min read690 words

Observability for features that are sometimes wrong

Traditional monitoring answers whether a request succeeded. A feature that returns a confident, well-formed, incorrect answer succeeds every time — so the signals have to be different.

Tecno Blocks
Mediawiki CRAP index (top10) 2013 - 2015
Mediawiki CRAP index (top10) 2013 - 2015

Short answer

Status codes and latency cannot see a wrong answer, because a wrong answer is a 200. Instrument the outcome instead: whether the user accepted, edited, retried or abandoned the result, plus refusal and fallback rates. Those four proxies detect quality regressions that every conventional dashboard reports as healthy.

On this page
  1. What to log per call
  2. The four proxies for quality
  3. The rates that catch specific failures
  4. Alerting on distributions, not thresholds
  5. Close the loop back to evaluation

A retrieval or generation feature can be completely broken and perfectly green. The request succeeded, the latency was normal, no exception was thrown, and the answer was wrong.

Conventional observability was built for systems that fail loudly. This class fails quietly, and needs signals of its own.

What to log per call

More than you would for an ordinary endpoint, because reproduction is otherwise impossible:

  • The full prompt as sent, including the retrieved context. Not a template reference — the actual text, or you cannot reproduce anything.
  • A prompt version identifier. Every change gets one. Without it you cannot attribute a regression to a deployment.
  • Model and parameters — name, version, temperature. Provider-side model updates are a real source of behaviour change you did not cause.
  • Token counts and cost, in and out.
  • Latency, split into retrieval, generation and post-processing. They move independently and for different reasons.
  • The outcome, which is the part everyone omits.

That log contains user content, so it needs the same retention, access control and deletion path as any other store of user data. Deciding that after you have six months of it is much harder than deciding it now.

The four proxies for quality

You rarely have ground truth in production. You do have behaviour, and it is a good signal:

1. Acceptance. Did the user keep the output, or did they discard it? For a suggestion, whether they applied it. This is the closest thing to a direct quality measure you get for free.

2. Edit distance. When the user modifies the output before using it, how much? A rising edit distance is a quality regression that no error rate will show.

3. Retry and regeneration. A user asking again, rephrasing, or pressing regenerate is telling you the first answer failed. Regeneration rate is one of the most sensitive signals available.

4. Abandonment. They asked and then left without using anything. Ambiguous individually, meaningful in aggregate and over time.

None of these is precise. All of them move before your users start writing in.

The rates that catch specific failures

  • Refusal rate. A model declining to answer. A jump usually means a prompt change or a provider-side update, and it is invisible to error monitoring because a refusal is a successful response.
  • Fallback rate. How often you served the non-model path. A rise means the feature is degrading in a way users may not notice and you should.
  • Schema violation rate, where output is structured. This is the closest thing to a conventional error in this stack.
  • Empty retrieval rate. Queries where the retriever returned nothing relevant. Often the actual cause of a "the model is worse today" report.
  • Truncation rate. Responses cut off at the token limit, which reads to a user as the model being confused rather than the limit being reached.

Alerting on distributions, not thresholds

A single wrong answer is not an incident; a shifted distribution is. Alert on:

  • Week-over-week change in acceptance, regeneration and refusal rates.
  • Percentile latency rather than the mean, because generation latency has a long tail that the mean hides entirely.
  • Cost per request by prompt version, which catches a context change that silently tripled the input.

And treat a provider model update as a deployment: pin versions where you can, and run the evaluation set when a pin moves.

A feature that returns a confident, well-formed, wrong answer is a 200. If your dashboard cannot distinguish that from a correct one, it is not measuring the feature.

Close the loop back to evaluation

Production logs are the best source of evaluation cases you will ever have, because they are real:

  1. Sample the calls with low acceptance or high edit distance.
  2. Have someone label a manageable number of them each week.
  3. Add the clear failures to the evaluation set.
  4. Re-run the set on every prompt change.

That loop is what turns "it feels worse this week" into a number, and it is the only durable way to keep a feature from drifting.

Frequently asked questions

Why is error rate not enough for these features?
Because a wrong answer is a successful response. The request returned 200, the latency was normal and nothing threw, so every conventional signal reports health while the output is useless.
What is the most sensitive quality signal?
Regeneration and retry rate. A user asking again is telling you the first answer failed, and it moves before support tickets or acceptance metrics do.
Should I log the full prompt?
Yes, including the retrieved context, or you cannot reproduce a failure. It contains user data, so give it the same retention, access control and deletion path as any other user data store — decided now rather than after six months of logs.
How do I catch a provider changing the model?
Log the model name and version on every call, pin versions where the provider allows it, and run your evaluation set whenever a pin moves. Treat it as a deployment, because that is what it is.

Sources

  1. OpenTelemetryOpenTelemetry
  2. Site Reliability Engineering: Monitoring Distributed SystemsGoogle SRE

Published by

Tecno Blocks

Engineering insights from Tecno Blocks covering web, mobile, AI, Web3, software architecture, product development, DevOps, and real-world case studies.

About the publication

Related reading

Keep going