LLM Error Tracking: How to Catch and Fix Model Failures Fast

LLM Error Tracking: How to Catch and Fix Model Failures Fast

LLM error tracking is the practice of detecting, classifying and resolving failures in language model applications, from provider outages to wrong answers that look correct. It answers the question every team faces once its AI feature reaches real users: how do we find out something went wrong before the users tell us? The short answer is to track two kinds of failure, the loud ones that raise exceptions and the quiet ones that return confident nonsense, and to give each a clear path from detection to fix.

Error tracking matters because language models fail in ways that ordinary error monitoring cannot see. A model that fabricates a citation returns a success status code. Without tracking built for that reality, the first sign of trouble is a user complaint, by which time the damage is done.

Key takeaways

  • LLM errors split into loud failures that raise exceptions and quiet failures that return wrong answers.
  • Classify every error by type, step and cause before trying to fix it.
  • Track error rate, not just error count, so growth in traffic does not hide a real problem.
  • Alert on rates and quality scores, not on single errors.
  • Keep the failing request’s full trace, so the fix can be tested against the real case.

What counts as an LLM error?

An LLM error is any case where the application did not do what the user reasonably expected. That includes the obvious failures: the provider returned an error, the request timed out, the response could not be parsed, or a tool call failed. It also includes the quieter ones: the model answered the wrong question, invented a fact, refused a legitimate request, or produced output in the wrong format. Both kinds cost trust, but only the first kind shows up in a conventional error tracker.

That is why LLM error tracking needs two detection layers. The first is the operational layer: exceptions, HTTP status codes, timeouts and retries, captured by the same tools that watch any other service. The second is the quality layer: scorers, user feedback and human review that catch the failures no exception will ever report. A team that tracks only the first layer is blind to the failures its users actually care about. Our guide to LLM evaluation metrics explains which quality signals work and where each one fails.

Define what an error means for your application before you build the tracking. A chatbot that gives a slightly vague answer is a quality issue; a medical triage assistant that gives a wrong answer is a safety incident. The same failure deserves a different response depending on the stakes, so write the definitions down and agree the severity levels with the team that will answer the alerts.

The five error types to track

Most LLM failures fall into five groups, and sorting them correctly is half the job. Each group has different causes, different fixes and different urgency.

Provider and API errors

These are failures at the model provider: rate limits, authentication problems, service outages and overloaded-model responses. They are usually transient, and the standard response is a retry with backoff, followed by a fallback such as a different model or a queued retry. Track them by provider and error code, because a rate limit and an outage need different responses. Best for: any production LLM application, since provider errors are the most common loud failure.

Timeouts and latency failures

A request that takes too long is an error from the user’s point of view, even if the model eventually answers. Track timeouts separately from other errors, and record where the time went: the model call, the retrieval step, or a slow tool. A timeout caused by a single slow retrieval call has a different fix from a timeout caused by a model generating an enormous response. Our guide to LLM latency monitoring explains which timing figures users actually feel.

Parsing and format failures

When your application asks the model for structured output, such as JSON, the model sometimes returns text that cannot be parsed. Track these as their own category, with the raw output attached, because the fix is usually a prompt change, a stricter output instruction, or a repair step that asks the model to reformat its answer. If parsing failures rise after a model change, the new model may need different instructions.

Tool and retrieval failures

Agents fail when their tools fail: a search returns nothing, a database query errors, or a tool returns data in an unexpected shape. The model then either fails loudly or, worse, invents an answer from nothing. Track tool failures by tool name and error type, and log what the model did next, since the model’s response to a tool failure is itself a quality signal worth watching.

Quality failures

These are the quiet ones: hallucinations, wrong answers, refusals of legitimate requests, biased or unsafe output, and answers that ignore the retrieved context. No exception fires, so detection depends on scorers, user feedback and sampling. Track quality failures by scorer type and prompt version, because a spike after a prompt change points straight at the cause. For the framework that ties this together, see our guide to building an LLM evaluation framework.

How to triage LLM errors

Triage is the process of turning a stream of errors into a prioritised list of fixes. Without it, the loudest errors get the attention and the most harmful ones get ignored. A simple triage routine, run daily while the application is young and weekly once it is stable, is enough.

Start with the error rate, not the count. A hundred errors on a million requests is noise; a hundred errors on a thousand requests is a crisis. Group by error type, then by the step where the failure happened, then by prompt version and model. The grouping usually reveals that most errors come from one or two causes, and fixing those causes clears the majority of the queue.

For each group, decide the fix and its owner. Provider errors may need a retry policy or a fallback model. Parsing failures may need a prompt change. Quality failures may need a retrieval fix or a new evaluation case. Record the decision next to the error group, so the same failure is not re-investigated three times by three people.

Keep the evidence. Every error group should link to example traces, so the fix can be tested against the real failing cases rather than against invented ones. When a fix ships, re-run the failing traces and confirm the error is gone. If it is not, the fix was wrong, and the trace is the proof.

Alerting without alert fatigue

Alerting on every error is the fastest way to teach a team to ignore alerts. LLM applications generate errors constantly, especially quality failures, so alerts must be based on rates and thresholds rather than on single events.

Set alerts on the signals that mean users are affected. A useful starting set is the error rate by type, the timeout rate, the cost per request, and one quality score. Give each alert a threshold that reflects normal variation: a quality score that wobbles by a few points every day should not page anyone, but a sustained drop over an hour should.

Separate paging alerts from informational ones. A provider outage or a sharp error spike should wake someone up. A slow drift in quality scores should land in a daily summary for review. If the team cannot tell which alerts matter, every alert becomes noise, and the one that mattered gets missed. The LLM service level objectives guide shows how to set thresholds that reflect what users actually experience.

Error type How it is detected First response Usual fix
Provider and API errors Status codes, exceptions Retry with backoff, then fallback model Retry policy, quota, fallback
Timeouts Latency thresholds Identify the slow step from the trace Retrieval tuning, output limits
Parsing failures Schema validation Attach the raw output to the error Prompt change, repair step
Tool and retrieval failures Tool error logs Check what the model did next Tool fix, better fallback behaviour
Quality failures Scorers, feedback, sampling Group by prompt version and scorer Prompt, retrieval or eval change
A developer debugging error traces on a laptop screen
Grouping errors by type and step usually shows that most failures come from one or two causes.

Building an error tracking workflow

A good workflow has four stages: capture, classify, fix and verify. Capture means every failure is recorded with its full context: the request ID, the trace, the prompt version, the model, and the inputs the model saw. Classify means each error gets a type and a severity, so the queue can be sorted. Fix means a named owner and a change. Verify means re-running the failing cases to prove the fix worked.

Automate the first two stages as far as possible. Classification rules can sort provider errors, timeouts and parsing failures automatically, leaving human judgement for quality failures where it is actually needed. The goal is a queue where the top items are the most harmful errors, not the most recent ones.

Review the queue on a schedule, not only after incidents. A weekly review catches the slow-burning problems: a quality score drifting down, a tool failing slightly more often, a prompt version that quietly underperforms. These are the errors that never trigger an alert and never get fixed, until a user complains loudly enough.

LLM error tracking checklist

  • Both loud failures and quiet quality failures are tracked.
  • Every error carries a type, a severity, a request ID and a full trace.
  • Error rate is tracked, not just error count, so traffic growth does not hide problems.
  • Errors are grouped by type, step, prompt version and model before fixing.
  • Each error group has a named owner and a recorded decision.
  • Fixes are verified by re-running the real failing traces.
  • Alerts fire on rates and thresholds, not on single errors.
  • Paging alerts and informational alerts are separated.
  • The queue is reviewed weekly, not only after incidents.
  • Error data is retained long enough to spot trends across model changes.

Frequently asked questions

What is the difference between LLM error tracking and ordinary error tracking?

Ordinary error tracking catches exceptions, crashes and failed requests. LLM error tracking adds the quality layer: wrong answers, hallucinations and refusals that return success status codes. Without the quality layer, the failures users actually notice go completely untracked.

Which errors should page someone at night?

Only errors that mean users are affected right now: a provider outage, a sharp error spike, or a service that has stopped answering. Quality drift, slow trends and individual bad answers belong in a daily review, not a midnight page. If everything pages, nothing does.

How do I track errors I cannot detect automatically?

Use sampling and human review. A regular sample of production conversations, reviewed by a person or scored by a judge model, catches the failures that automated checks miss. User feedback helps too: a simple thumbs-down button, with the conversation attached, is one of the cheapest error detectors available.

Should I track errors per prompt version?

Yes. Prompt changes are the most common cause of sudden quality changes, and version-level tracking is what connects a spike in errors to the change that caused it. Without it, you know quality dropped but not why.

How many errors are acceptable?

There is no universal number. What matters is the rate, the trend, and the severity: a low rate of harmless errors is fine, while any rate of harmful errors in a high-stakes application is not. Set your thresholds from your own baseline and your users’ tolerance, then watch the trend rather than chasing zero.

Latest articles

Scroll to Top