LLM Observability Checklist: Monitor Prompts, Tokens, Latency, and AI Failures
LLM monitoringAI observabilityapplication performanceprompt managementdeveloper tools

LLM Observability Checklist: Monitor Prompts, Tokens, Latency, and AI Failures

TTrainMyAI Editorial Team
2026-12-05
7 min read

A practical LLM observability checklist covering traces, tokens, latency, failures, retrieval, privacy, cost estimates, and release reviews.

LLM observability turns an AI application from a black box into a system you can inspect, improve, and budget. This checklist explains what to record across prompts, tokens, latency, retrieval, tools, failures, privacy, and user feedback, with practical formulas and examples you can adapt to an LLM application, RAG pipeline, or AI agent.

Overview

Monitoring a conventional web service often centres on availability, errors, latency, and resource usage. An LLM application needs those signals too, but they are not enough. A request can return a successful HTTP response while producing an incorrect answer, using an unexpected amount of context, calling the wrong tool, or exposing information that should not have been included.

LLM observability connects technical performance with AI-specific behaviour. A useful trace should help you answer questions such as:

  • Which model, prompt, and application version produced this response?
  • How many input and output tokens did the request use?
  • Was the delay caused by retrieval, model generation, a tool, a retry, or queueing?
  • Did the model refuse, produce malformed output, or fail to complete a tool call?
  • Did retrieved documents support the answer, or were they irrelevant or incomplete?
  • Can an engineer investigate the event without viewing private prompt content?

Start with request-level traces, then add metrics that describe cost, speed, reliability, and answer quality. Do not attempt to measure every possible signal on the first day. The goal is a dependable feedback loop for releases, incidents, prompt testing, and model migrations.

How to estimate

A simple observability estimate begins with the number of requests and the resources used by each request. For a text-generation step, use this basic model:

Estimated input tokens = requests × average input tokens
Estimated output tokens = requests × average output tokens

If a provider charges different rates for input and output, estimate the variable model cost as:

Estimated model cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate)

Keep the rates as configurable inputs rather than placing them in application logic. Provider pricing, model names, caching rules, and token accounting can change. The same principle applies to latency and failure estimates:

  • Average latency: total request duration divided by completed requests.
  • Failure rate: failed or unusable requests divided by all requests, with the failure definition documented.
  • Retry volume: retry attempts divided by original requests.
  • Tool failure rate: failed tool calls divided by attempted tool calls.
  • Refusal rate: refusals divided by requests where a refusal is a possible outcome.

Average values are useful for planning, but they can hide outliers. Track a distribution or selected latency percentiles where your monitoring system supports them. A small number of very slow requests may matter more to users than a comfortable average.

For a multi-step AI workflow, estimate each step separately. A RAG application might include query rewriting, embedding, vector search, reranking, answer generation, and optional citation validation. An AI agent may add several tool calls. Recording only the final request makes it difficult to identify which step consumes tokens, adds delay, or causes failure.

Inputs and assumptions

Use a consistent event schema so that dashboards and incident reviews compare like with like. The following fields are a practical starting point.

CategoryRecommended fieldsWhy it matters
Identitytrace ID, request ID, session ID, tenant or workspace IDConnects related steps while supporting access controls and aggregation.
Versionsapplication version, model identifier, prompt version, workflow versionShows whether a release, model change, or prompt edit altered behaviour.
Usageinput tokens, output tokens, cached tokens if available, context item countSupports cost estimates and context-window investigations.
Timingqueue time, retrieval time, tool time, model time, total durationSeparates bottlenecks instead of treating all latency as model latency.
Outcomesuccess, refusal, timeout, validation failure, policy or safety categoryDistinguishes a transport success from a useful application result.
Toolstool name, argument validation result, duration, permission result, error classHelps investigate agent failures without logging secrets or full arguments.
Retrievalquery ID, result count, scores where meaningful, filter values, citation statusProvides signals for diagnosing irrelevant or missing context.
Feedbackrating, correction event, escalation, task completion indicatorConnects system behaviour with user-perceived usefulness.

Store stable identifiers and classifications by default; treat raw prompts, retrieved passages, tool arguments, and model outputs as sensitive data. Redact or hash personal information, credentials, access tokens, confidential business data, and unnecessary document content. Apply retention limits and restrict observability access according to the data your application handles. For a practical pre-processing checklist, see the AI Data Privacy Checklist.

When debugging, use controlled sampling or a short-lived secure debug mode rather than permanently storing every raw exchange. A redacted prompt fingerprint can often show whether two requests used the same template without revealing the template itself. Keep the redaction rules tested: an observability system that accidentally captures secrets is a separate production risk.

For prompt and context management, record counts and versions even when you do not retain content. This makes it easier to detect a prompt that has grown unexpectedly or a retrieval change that sends far more context to the model. The AI Context Window Management guide provides related design considerations.

Worked examples

Example 1: estimating token usage

Assume a support summariser receives 12,000 requests in a month. For planning only, suppose each request averages 2,400 input tokens and 500 output tokens. The estimate is:

  • Input: 12,000 × 2,400 = 28,800,000 tokens.
  • Output: 12,000 × 500 = 6,000,000 tokens.
  • Total: 34,800,000 tokens.

These are assumptions, not observed results. Replace them with measurements from your trace data after deployment. Report the input and output totals separately because pricing, limits, and optimisation opportunities may differ. If average input tokens rise after a prompt edit, investigate whether conversation history, retrieved passages, or duplicated instructions are responsible.

Example 2: tracing a slow RAG response

Suppose a user reports that answers are slow. A single total-duration metric cannot explain the issue. Break the trace into spans:

  1. Request received: 80 milliseconds before work begins.
  2. Query construction: 120 milliseconds.
  3. Search and reranking: 900 milliseconds.
  4. Answer generation: 2,400 milliseconds.
  5. Citation validation: 300 milliseconds.

The example points to generation as the largest component, but the correct action depends on a wider sample. Compare slow traces with normal traces, then check model version, input-token count, retrieval result count, retries, and streaming behaviour. Do not optimise a single trace without confirming that the pattern is repeatable.

Example 3: triaging an AI agent failure

An agent returns a generic error after attempting to update a record. Inspect the trace in this order:

  1. Confirm the request used the expected application, prompt, and model versions.
  2. Check whether the tool was selected intentionally and whether permission checks passed.
  3. Validate the structured arguments before execution.
  4. Classify the tool response as timeout, authentication error, validation error, or downstream failure.
  5. Confirm whether the agent retried and whether the retry could repeat a side effect.
  6. Record the user-visible outcome separately from the internal error.

Tool permissions, validation, and failure handling should be designed before adding more autonomous behaviour. See the AI Agent Tool Calling guide for related patterns.

Incident triage checklist

When an AI feature degrades, use a consistent sequence rather than starting with prompt edits:

  1. Define the affected time range, route, tenant group, model, and application version.
  2. Check availability, timeout rate, retry rate, and latency before inspecting answer quality.
  3. Compare token usage with a known normal period.
  4. Check provider response categories, rate limits, malformed responses, and transport errors.
  5. Inspect retrieval counts, filters, empty-result rates, and citation validation outcomes.
  6. Review tool selection, argument validation, permission decisions, and downstream errors.
  7. Sample redacted traces and compare them with successful traces.
  8. Record the mitigation, owner, user impact, and follow-up test.

For prompt-related incidents, preserve the prompt version and test case that reproduced the problem. A system prompt should have explicit rules and output contracts; the System Prompt Design Guide can support that review. For RAG and agent risks, also review the Prompt Injection Defense Guide.

When to recalculate

Recalculate cost, capacity, and reliability estimates whenever an underlying input changes. At minimum, revisit the dashboard and assumptions when you:

  • change model, provider, token limits, or response settings;
  • edit a system prompt, add examples, or change conversation history;
  • change chunking, retrieval filters, reranking, or citation logic;
  • add a tool, agent step, retry policy, or fallback model;
  • launch a new user group, workflow, region, or higher-volume integration;
  • receive a provider pricing or usage-accounting update;
  • observe a sustained change in token volume, latency, refusal rate, or user feedback;
  • complete an outage, security review, or data-retention review.

Keep a small release review record with the change, expected impact, measured impact, new assumptions, and rollback decision. Re-run representative prompt tests before and after important changes, then compare traces using the same outcome definitions. A token budget template can help with planning; see AI API Cost Planning.

The practical starting point is modest: instrument one complete user journey, attach version identifiers, capture token and timing fields, classify failures, and protect sensitive content. Once those signals are reliable, add retrieval quality, tool outcomes, and user feedback. Good LLM observability is not a single dashboard; it is a repeatable way to understand what changed, what it cost, and whether the application still helps users.

Related Topics

#LLM monitoring#AI observability#application performance#prompt management#developer tools
T

TrainMyAI Editorial Team

AI Development Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.