Real Studios

Monitoring LLM Performance: Metrics, Tracing and Alerts

Watercolour frame around LLM monitoring title

Monitoring LLM performance means measuring, continuously and in production, how well your model or AI agent answers, how fast it responds, what it costs and whether it stays safe. In practice you track a short set of metrics, trace every request end to end, test outputs against a fixed evaluation set and alert on sustained change. This guide shows what to measure, how to set it up and how to choose observability tooling.

TL;DR

  • Monitoring covers quality, latency, cost, safety and reliability. Observability is the wider layer of metrics, traces and logs that lets you diagnose why something changed.
  • Start with a small metric set: time to first token, 95th-percentile latency, error rate, tokens and cost per completed task, plus a quality score tied to your own use case.
  • Trace the full path: input, retrieved context, model calls, tool calls and final answer. Without traces, RAG and agent failures are guesswork.
  • Evaluate against a frozen dataset, sample live traffic and alert on sustained shifts, not single bad answers.
  • Treat monitoring as a lifecycle control that feeds risk registers and decisions, not a launch check.

Table of Contents

What monitoring LLM performance actually covers

IBM describes LLM performance monitoring as evaluating the behaviour of the model and the application, its outputs, system performance and resource use over time. LLM observability, in IBM's framing, is the broader collection of real-time metrics, traces and logs that makes those behaviours diagnosable and supports root-cause analysis.

The distinction matters in day-to-day work. Monitoring tells you that answer quality dropped on Tuesday or that latency doubled. Observability lets you open a single failed conversation and see which retrieved document, prompt version or tool call caused it.

For UK organisations there is a useful official frame too. GOV.UK's introduction to AI assurance defines measurement as gathering qualitative and quantitative information about how an AI system functions, including its performance, functionality and impacts in different contexts. It also notes that evaluation can mean assessing a system against agreed benchmarks, and that communication can take the form of reports or dashboards. That is a sound brief for any monitoring programme: measure, compare with an agreed benchmark, then report to the people who decide.

Why traditional monitoring is not enough

A conventional application either returns the right record or it does not. An LLM can return a fluent, confident and wrong answer with a 200 status code and a fast response. Uptime and CPU graphs will look healthy while customers receive poor answers. That is why LLM monitoring adds output-quality measurement on top of the usual system metrics.

The metrics worth tracking

Avoid dashboards with forty panels nobody reads. Group metrics into four families and pick two or three from each.

FamilyMetricWhy it matters
System performanceTime to first token, 95th-percentile response time, throughput, error rateShows what users feel and where capacity runs out
Resource and costPrompt plus completion tokens, cost per request, cost per completed taskKeeps spend predictable as usage grows
QualityTask-specific accuracy, groundedness, relevance, format validity, hallucination rateShows whether answers are correct and usable
Safety and fairnessPolicy violations, unsafe content, bias metrics, privacy incidentsProtects customers and your compliance position

System performance

IBM lists latency, throughput and error rate among core system metrics, alongside CPU/GPU and memory use for self-hosted models. Microsoft Research goes into more detail: it recommends measuring time to first token at multiple percentiles, requests per second and streaming tokens per second, and measuring latency for each layer of the LLM workflow rather than only the final response. That per-layer view is what tells you whether slowness comes from retrieval, the model or a downstream tool.

TechTarget's enterprise guide similarly points to time to first token and 95th-percentile response time for latency, and to throughput and concurrency under realistic load for scalability. Averages hide the slow tail, so always look at percentiles.

Utilisation and cost

Microsoft Research treats total prompt plus completion tokens as a primary utilisation measure and suggests monitoring 429 responses, including their 90th or 95th percentile, to understand peak service performance. A rising count of rate-limit responses usually appears before users start complaining.

On cost, TechTarget recommends measuring total cost per completed task rather than token price alone. A cheaper model that needs retries, longer prompts or human correction can cost more per resolved enquiry. Databricks adds tokens and cost per request, error and fallback rate to its operational list.

Output quality

Quality is where most teams under-invest. TechTarget lists task-specific accuracy, response consistency, grounding, hallucination rate, domain or multilingual performance and knowledge freshness as quality measures. Databricks recommends correctness, groundedness, relevance, safety, guideline adherence and format validity, and for agents adds tool-call correctness and efficiency.

You do not need all of these. A customer-service email agent might score groundedness against your policy documents, tone against your guidelines and format validity for structured fields. A voice agent might add first-response delay and successful hand-off rate. Choose measures a manager can connect to a business outcome.

Safety, fairness and compliance

The UK Department for Science, Innovation and Technology's research on LLM bias recommends embedding fairness metrics alongside accuracy and latency, and monitoring live traffic because production use can reveal biases that synthetic tests miss. TechTarget names privacy compliance, auditability, bias and fairness, and vendor transparency as enterprise risk and compliance measures.

Tracing prompts, retrieval and agents

Metrics tell you something is wrong. Traces tell you where. OpenTelemetry's guide to LLM observability recommends tracking request volume, request duration, token consumption and cost, and explains that traces matter especially for RAG because events occur before and after the model call. Its position is that LLM systems need both aggregated metrics for fast operational diagnosis and distributed traces to understand multi-step workflows.

For an agent, LangChain's guidance is to trace the input, retrieved context, model and tool calls, intermediate outputs and final response, so the execution path is preserved for debugging.

What a useful trace contains

  1. The user input and any system prompt or prompt version identifier.
  2. The retrieval step: query, documents returned, ranking and the sources actually used in the answer.
  3. Each model call: model name and version, parameters, tokens in and out, latency.
  4. Each tool call: arguments, result, errors and retries.
  5. The final response, plus any guardrail or validation outcome.
  6. A user signal where available: thumbs, escalation to a human, or a repeated question.

Tag every trace with the prompt version and model version. When quality shifts, the first question is always "what changed?", and versioned traces answer it in minutes.

A worked example: a support agent with RAG

Imagine an email agent that answers customer queries from your help centre. Complaints rise about wrong delivery information. The dashboard shows normal latency and a stable error rate. Opening failed traces shows that the retrieval step is returning an outdated policy page, so the model answers faithfully from the wrong source. The fix is in the index, not the model. Without retrieval-level traces you might have spent a week rewriting prompts.

RAG trace reveals an outdated policy source

Evaluating outputs and catching drift

Online monitoring only works if you know what good looks like. That needs an evaluation set built from your own work.

Build a frozen evaluation set

Databricks' advice is that model comparisons should use a frozen dataset and frozen scorers, and that a model should be switched only when it preserves quality on your own evaluation set while meeting acceptable latency and cost. Collect real queries, including awkward ones, and agree expected answers or scoring rubrics with the people who know the subject.

The UK government's CarefulAI PLIM method shows how rigorous this can be in high-risk sectors. It is designed for safer, fit-for-purpose benchmarking and continuous LLM monitoring, particularly in healthcare, finance, insurance and defence. It requires prompts to be independently validated by at least three subject-matter experts, adds validated synthetic prompts, and states that the need for tens of thousands of interactions can be reduced to between 150 and 750. For most businesses the lesson is practical: a few hundred well-chosen, expert-checked cases beat a huge unchecked pile.

Build a frozen evaluation set

Understand the types of drift

The UK Ministry of Defence's guidance says live AI risks must be monitored after deployment because new or changing issues can emerge. It names data drift, context drift, model drift and changes in users or operators. In an LLM product these look like:

  • Data drift: customers start asking about a new product your knowledge base does not cover.
  • Context drift: your documents, policies or prices change but the index is stale.
  • Model drift: a provider updates the model behind an endpoint and behaviour shifts.
  • User drift: a new customer segment, channel or language changes the mix of requests.

Re-run your evaluation set on a schedule and whenever a model, prompt or index changes. Pin model versions where the provider allows it.

Sample live traffic

Offline tests cannot cover every real-world failure. DSIT's research recommends sampled live-traffic classification and statistical-process-control drift detection. You can score a small percentage of production responses automatically with an evaluator model or rules, then route a smaller slice to human reviewers to keep the automatic scores honest.

For teams that want to test models or evaluation data on isolated hardware before anything touches production, a portable local AI workspace is one way to keep experiments contained and repeatable.

Alerts and incident response

Alert fatigue kills monitoring. Set alerts on conditions that need action.

  • Page someone: error rate or 429 responses above threshold, 95th-percentile latency breaching your service target, a sudden cost spike, a safety or policy-violation spike.
  • Ticket for next working day: gradual decline in groundedness or accuracy scores, rising fallback rate, a sustained shift in topic mix.
  • Weekly review: cost per completed task, user feedback themes, evaluation-set results.

DSIT's research describes differentiated alerts and, for critical applications, automatic rollback to the last known fair model version with incident documentation. Its underlying point is that sustained-shift detection matters more than reacting to every bad answer.

Investigate, record, escalate

The MOD guidance gives a clear governance pattern. It recommends recording emerging risks, updating the risk register, applying mitigations such as retraining, and escalating material risks to the Senior Responsible Officer, noting that significant changes may need development updates, documentation changes and reapproval. You do not need defence-grade process for an internal assistant, but you do need a named owner, a log of incidents and a rule for who can approve a change.

A simple loop works well:

  1. Detect: an alert or a reviewer flags a problem.
  2. Isolate: open traces for affected requests and find the failing step.
  3. Fix: change the prompt, retrieval, model or guardrail.
  4. Verify: re-run the frozen evaluation set and compare with the previous version.
  5. Record: add the failing case to the evaluation set so it cannot return unnoticed.

Choosing LLM observability tools

Tool categories include open-standard instrumentation, platforms bundled with a cloud or data provider, and dedicated LLM observability products. Rather than starting from a vendor list, start from your requirements.

QuestionWhat to look for
Does it capture full traces?Retrieval, model calls, tool calls and versions in one view
Can it score quality?Custom evaluators, human review queues, frozen datasets
How does it handle personal data?UK GDPR alignment, redaction before storage, data location, retention controls
Is it auditable?Exportable logs, access controls, change history
Does it fit your stack?Support for open instrumentation standards, your frameworks and your model providers
What does it cost at scale?Pricing by trace, event or seat, and storage for long retention

TechTarget's inclusion of privacy compliance, auditability and vendor transparency as enterprise measures is a good checklist for procurement. Prompts and responses often contain customer data, so decide what is stored, for how long and who can read it before you switch logging on.

Open instrumentation standards reduce lock-in. If your traces follow a common format, you can change the backend later without re-instrumenting your application.

A sensible starting setup

For a first production deployment, keep it small: trace every request, store versioned prompts, run a frozen set of 150 to 300 cases nightly and on every change, sample a few per cent of live traffic for scoring, and review a dashboard of six to eight metrics weekly. Grow from there once you know which failures actually occur.

Our perspective

Most AI projects we see do not fail at launch. They degrade quietly afterwards: a knowledge base goes stale, a provider updates a model, customers start asking different questions. The team finds out from a complaint.

That is why we build monitoring into the agent from the first working demo, not as an afterthought. When we deliver an AI agent, whether voice, chat, email or RAG, the scope includes the traces, the evaluation set and the alert thresholds that let your team see what the agent is doing and change it safely.

We keep the metric set short and tied to business outcomes: resolved enquiries, accuracy against your own documents, response time and cost per completed task. Our approach is fast turnaround with working demos in days, fixed pricing and full ownership of the solution, so the monitoring setup belongs to you and is not locked inside our tools.

Monitoring also connects to visibility. The same discipline of measuring what AI systems say about you applies to Generative Engine Optimisation: if AI engines describe your business, you should know how and track it over time.

Oded

How we can help

If you are deploying an AI agent or automation and want monitoring designed in from day one, our AI agents, automation and integration services cover build, launch and ongoing support for UK businesses. If you want to prove value quickly first, our Rapid MVPs deliver a working demo that can be measured against your own evaluation set. For connecting agents to your existing systems, see AI integrations and enablement.

FAQ

What is the difference between LLM monitoring and LLM observability?

Monitoring tracks performance, quality and cost over time and tells you when something has changed. Observability is the wider set of metrics, traces and logs that lets you explain why. In practice you need both: monitoring to detect, observability to diagnose.

Which metrics should I track first?

Start with time to first token, 95th-percentile latency, error rate, tokens and cost per completed task, and one quality score based on your own evaluation set, such as groundedness for a RAG assistant. Add safety and fairness checks if the system handles customer decisions. Expand only when a failure shows you what is missing.

How do I detect model drift?

Re-run a frozen evaluation set on a schedule and after every model, prompt or index change, and compare scores with the previous run. Also score a sample of live traffic and alert on sustained shifts rather than single bad answers. Pinning model versions, where your provider allows it, reduces surprise changes.

Do I need to monitor a hosted model differently from a self-hosted one?

The quality, latency and cost measures are the same. With a self-hosted model you also track CPU/GPU and memory use. With a hosted model you watch rate-limit responses, provider outages and silent version updates.

How often should we review LLM monitoring results?

Alerts run continuously, dashboards deserve a short weekly review, and your evaluation set should be refreshed with new real cases regularly. Any significant change to the system should trigger a fresh evaluation and a documented sign-off by a named owner.

Sources

All guides