Lesson 1 / 31

Why LLM Apps Need Their Own Observability

Explain why LLM features fail in ways normal logs miss, and what questions observability must answer.

By · 15 years in web development

LLM features fail quietly

A normal API either returns the right JSON or throws an error you can see in logs. An LLM feature can return HTTP 200 with a wrong answer: a hallucinated fact, a refusal, an answer in the wrong language, or a response that ignored the retrieved documents. Nothing crashes, so your error dashboard stays green. On top of that, LLM output is non-deterministic: the same input can produce different text on two runs, so a bug report like "it said something weird yesterday" is impossible to reproduce unless you stored exactly what went in and what came out. Modern apps also chain many steps (retrieve documents, call tools, call the model several times), and the failure may sit in any one of them. LLM observability means recording each step's inputs, outputs, timing, token usage and cost, linked together, so you can answer: what exactly happened on this request, and is quality getting better or worse over time?

The observability loop

Observability is a loop, not a one-time setup: you capture what the app did, inspect individual traces, measure quality and cost across many traces, then change prompts or code and watch the effect.

Four connected stages in a row: capture, inspect, evaluate, improve.
Figure 1.1: capture -> inspect -> evaluate -> improve

The cricket ball-by-ball record

A scorecard that only shows the final total cannot explain why a team collapsed. The ball-by-ball commentary can: who bowled, what shot was played, where it went. Plain request logs are the scorecard; LLM traces are the ball-by-ball record of every step inside one request.

Quick check: Why do ordinary error-rate dashboards miss many LLM failures?

  • LLM providers hide error codes from clients
  • A wrong or unhelpful answer usually still arrives as a successful response
  • LLM calls are too fast to be logged
  • Error dashboards cannot count HTTP requests to external APIs
Answer

A wrong or unhelpful answer usually still arrives as a successful response — Hallucinations, refusals and off-topic answers come back as normal successful responses, so you need to look at content and quality, not only status codes.