LLM Observability: How to See What Your Model Is Doing
LLM observability records every prompt, tool call, token count and cost, so you can see why a model answered as it did and catch failures before users do.
On this page
Short answer
LLM observability is the practice of recording and reviewing everything an LLM application does: the prompt sent, the model used, the tools called, the tokens spent, the time taken and the answer returned. It gives teams a trace for every request, so they can find why an answer was wrong, slow or expensive, and fix the prompt, the retrieval or the model instead of guessing.
What is LLM observability?
LLM observability is the practice of recording what happens inside an LLM application on every request, so a team can see the prompt, the model version, the tools called, the tokens used, the time taken and the answer returned. It turns a black box into a trace that a person can read and debug.
Traditional monitoring watches servers and error rates. That is not enough for a model, because an LLM app can fail without any error: it answers smoothly, in good English, with the wrong facts. Observability fills that gap by keeping the evidence of each decision the model made.
Record at least the following for every request:
| What to record | Why it matters |
|---|---|
| Prompt and system instructions | Shows exactly what the model was asked |
| Model name and version | Links a failure to a specific release |
| Tools called and results | Shows whether bad data caused the answer |
| Tokens in and out | Explains the cost of each request |
| Latency per step | Finds the slow step in a chain |
| User feedback or rating | Marks answers people rejected |
Keep the traces for weeks, not hours. Most model problems only become clear when you compare today's answers with last week's, and that needs history. For teams choosing tooling, LLM observability tools for startups compares the main options.
Why do LLM apps need observability?
LLM apps need observability because their output is not deterministic: the same question can get a different answer on different days, and a small prompt change can fix one case and break three others. Without traces, a team cannot tell which change caused the change.
Three failure modes are hard to catch without it. First, silent wrong answers: the model cites a document that does not support its claim, and no error is raised. Second, cost drift: a prompt grows longer, a chain adds a step, and the token bill climbs a little every week. Third, slow degradation: the model still answers, but quality drops as user questions shift to topics the test set never covered.
Observability also protects the team when users complain. A trace shows whether the prompt was right, whether the retrieved documents were relevant, and whether the model followed its instructions. That turns a blame discussion into a fix: change the retrieval, tighten the prompt, or add a guardrail.
It matters most once the app is live. In a demo, ten hand-picked questions hide the failure modes. In production, real users ask awkward questions, paste long documents and hit edge cases, and only traces show what actually happened.
What should you trace in every request?
You should trace the full path of a request, from the user's input to the final answer, including every model call, tool call and retrieved document in between. A trace is a timeline, not a single log line, and each step records its inputs, outputs, timing and cost.
Start with the request itself: the user message, the system prompt, and any documents or tool results that were added. Then record each model call separately, because an agent may call the model five times for one answer, and the failing call is usually not the last one.
For retrieval apps, record which documents were retrieved and their ranking, so you can tell whether a wrong answer came from bad retrieval or bad reasoning. For agents, record each tool call with its arguments and result, so you can see a wrong tool call before it poisons the answer.
Add scores where you have them: an automatic check result, a model-based grade, or a user rating. A trace without a score tells you what happened; a trace with a score tells you whether it was good. Sampling is fine for high-volume apps: trace every request for a week, then keep a sample plus every failure.
How do you spot a model going wrong?
You spot a model going wrong by watching for changes in its traces: answers getting longer, tool calls failing more often, token use climbing, or users rejecting answers. Set alerts on those signals, and review a sample of traces every week.
Start with simple signals. Track the share of answers that trigger a fallback or a human handoff, the average tokens per request, and the average latency. A sudden move in any of them usually points to a prompt change, a model update or a shift in what users ask.
Next, run regular evaluations on a fixed test set. An evaluation gives you a score you can compare over time, while traces give you the evidence behind the score. When a score drops, open the failing traces and read them: the pattern is usually obvious, such as a retrieval step returning the wrong document or a new instruction being ignored.
Finally, look at what users do after the answer. If they rephrase the same question, ask a human, or abandon the chat, the answer probably failed, even if no error was logged. RAG evaluation explains how to build the test set and read the results.
How do you set up LLM observability?
You set up LLM observability by adding tracing to the code that calls the model, sending the traces to one place, and agreeing who reviews them and how often. The tooling matters less than the habit of looking.
- Instrument the model calls. Wrap each call so it records the prompt, the model, the tokens and the time. Do this in code, not by scraping logs later.
- Give every request an ID. One ID should follow the request through every model call, tool call and retry, so the full path can be rebuilt.
- Store traces in one place. Pick one store and one dashboard, so the team looks in the same place every time something fails.
- Add alerts on the basics. Alert on error rate, token use per request, latency and handoff rate, with thresholds the team agrees in advance.
- Review traces weekly. Read a sample of good and bad traces together, fix the top failure pattern, and re-run the evaluation set before shipping the fix.
Mask personal data before it reaches the trace store: names, emails and account numbers do not belong in a debugging log. If your app handles regulated data, check the retention rules before you turn tracing on.
Start small if the app is already live. Trace one workflow end to end, prove the traces find real problems, then extend the same pattern to the rest. A guide to evaluating an LLM application covers the test set and release gates that sit alongside tracing.
Example (hypothetical): a support chatbot's cost spike
Example (hypothetical): a support chatbot handles 2,000 chats a day. Each chat averages 1,800 tokens in and out, so the app uses about 3.6 million tokens a day. The team notices the token bill climbing by a tenth each week, with no change in chat volume.
The traces show the cause. A retrieval step was returning ten documents per question, and the prompt pasted all ten into the model, even when only two were relevant. The average prompt had grown from 900 tokens to 1,500 tokens, while the answers stayed the same length.
The team caps retrieval at four documents and adds a relevance filter. The average prompt drops to 1,200 tokens, so daily use falls from 3.6 million tokens to about 2.4 million, a saving of a third, with no change in answer quality on the fixed test set.
The fix took one afternoon, but it only happened because the traces recorded the prompt length per request. Without them, the team would have blamed the model or the vendor, and the bill would have kept climbing.
What are the common mistakes?
The most common LLM observability mistakes are tracing nothing, tracing everything with no review, and keeping personal data in the traces.
- No tracing at all. The team ships the app and only finds problems when users complain, with no evidence of what went wrong.
- Traces nobody reads. A dashboard full of charts is useless if nobody has the job of reviewing it each week.
- Logging prompts with personal data. Names, emails and account numbers in traces create a privacy problem that is easy to avoid by masking them first.
- One log line per request. A single line hides which step failed in a chain of five model calls, so the team cannot find the cause.
- Alerts on everything. Too many alerts train the team to ignore them, so the one that matters gets missed.
- Ignoring cost signals. Token use and latency are early warnings, and teams that watch only errors miss the slow drift.
If you are building the app itself, LLM development covers the design and evaluation work that makes tracing useful.
Key takeaways
- LLM observability records the prompt, model, tools, tokens and time for every request
- Models fail silently, so traces are the only way to see a wrong answer and its cause
- One request ID should follow the request through every model call, tool call and retry
- Alerts on token use, latency and handoff rate catch drift before users complain
- Review a sample of traces weekly and fix the top failure pattern first
Frequently asked questions
What is LLM observability?
It is the practice of recording what an LLM application does on each request: the prompt, the model version, the tools called, the tokens used, the time taken and the answer returned. Those traces let a team debug a bad answer instead of guessing what went wrong.
Is LLM observability the same as logging?
No. Logging usually records one line per event, while observability keeps a full trace of the request, with each model call, tool call and retrieved document as a step. A trace shows the path that led to an answer, which a flat log cannot.
What should I trace first?
Start with the prompt, the model name and version, the tokens in and out, and the latency for each model call. Add tool calls and retrieved documents next. Those five fields explain most failures and most of the cost.
Do I need a special tool for LLM observability?
Not at first. A simple wrapper that records each model call into one store is enough for a small app. Dedicated tools help once you have several workflows, need sampling, or want alerts and evaluation in the same place.
How long should I keep traces?
Keep them for a few weeks at least, so you can compare today's answers with last week's and spot slow drift. Keep failures longer than successes, and mask personal data before anything is stored.
Does observability slow the app down?
Barely, if it is done right. Recording a trace is a small write alongside the model call, and the model call itself takes far longer. Sampling high-volume traffic keeps the cost down without losing the failure signal.