E2E Testing for Chat, Voice, Phone and Video AI Agents

Run Thousands of Test Scenarios against Your Agent and Catch Hallucinations, Bias, and Toxicity Before Users Do.

AISoftware Testing

LLM Observability: A Practical Guide for AI Teams

LLM observability makes an LLM app's behavior visible in production through traces, evaluations, and quality signals. Learn what to monitor and how.

Last Updated on:

An LLM feature ships after passing every offline eval. Two weeks later, answer quality slips, token spend doubles, and a jailbreak reaches a support channel, with no failed test or exception.

LLM observability is how you catch this. Traditional monitoring never does, because nothing crashed; the model started behaving differently. It makes that behavior visible in a running system and explains why it changed.

By the end you will know which signals to track, how to instrument a pipeline, and how to monitor output in production without a ground-truth answer.

TL;DR

LLM observability is the practice of making a running LLM application's behavior visible and explainable through traces, metrics, and continuous evaluation. Because output is non-deterministic and quality is subjective, it goes beyond uptime and latency to score correctness, safety, and drift on live traffic.

  • Output quality vs uptime - An LLM app can return 200 OK and still hallucinate, so LLM observability scores the quality of answers, not only availability and latency.
  • Traces - A trace is the unit of LLM observability: one request recorded end to end, from retrieval to response, with tokens and cost on every span.
  • LLM output monitoring - LLM output monitoring scores live responses without ground truth: deterministic checks on every response, an LLM-as-a-judge on a sample, and user feedback.
  • Drift signals - Rising hallucination and negative-feedback rates, falling eval scores, and creeping token cost are the early signs that an LLM app is degrading.
  • Regression loop - Weak or flagged production traces go back into the test set, so a production failure becomes the next regression case.
  • Ground truth needed - No. Online checks are reference-free, because live traffic has no correct answer to compare against.
  • OpenTelemetry support - Yes. The GenAI semantic conventions cover model calls, token usage, duration, and errors; they define no cost attribute, so cost is derived from token counts.

What Is LLM Observability?

LLM observability makes an LLM application's behavior visible and explainable, combining traces, metrics, and continuous evaluation to show what a model did, why, and whether its output was good.

It borrows from software observability, where traces, metrics, and logs let you question a live system. LLM observability adds a signal classic stacks lack: whether each response was actually correct, safe, and useful.

That extra signal matters because an LLM rarely returns an error. It returns fluent text that can still be wrong, off-policy, or unsafe, so response codes and latency graphs say nothing about quality. Documented LLM hallucination examples show what happens when fluent but wrong text goes out unchecked.

It pairs naturally with prompt-based testing before release and AI agent evaluation for larger agents.

How LLM Observability Differs from Traditional Observability

Classic observability assumes a deterministic system that either works or throws. LLM systems break that assumption, and the worst failures look perfectly healthy on a status page. Here is how the two compare:

AspectTraditional observabilityLLM observability
Failure modeA crash, error, or timeoutA fluent but wrong, unsafe, or off-topic answer
Core signalsMetrics, logs, and tracesTraces plus evaluation scores on the output
AssertionFixed thresholds like p95 latencyRubric scores, similarity, and pass rates
DeterminismSame input, same pathSame input can vary in path and output
Ground truthA known correct resultOften none; judged by rubric or reference
Unit of debugA stack traceA full trace of retrieval, prompt, and generation

The pattern is consistent: traditional tooling watches for failures that never fire in an LLM system.

What Are the Pillars of LLM Observability?

A complete picture rests on five pillars. The first four describe what happened; the fifth judges whether it was good.

  • Traces and spans - the end-to-end record of a request through retrieval, prompt assembly, model calls, and tools.
  • Quality evaluations - rubric or model-graded scores for correctness, relevance, and faithfulness on real output.
  • Safety and policy - checks for prompt injection, jailbreaks, toxicity, and PII leakage on inputs and outputs. Real-time guardrails built on these checks are part of the wider practice of AI observability.
  • Cost and performance - tokens, spend, latency, and time to first token per request and per route.
  • User and feedback signals - thumbs, edits, retries, and escalations that reveal quality the model cannot self-report.

In practice, a handful of signals do most of the work. These are the ones worth a dashboard and an alert:

SignalWhat it revealsHow to check it
Hallucination rateShare of answers with unsupported claimsFaithfulness score below a set bar fails
FaithfulnessWhether answers stick to retrieved contextEvery claim traces back to a source
Latency (p95, TTFT)Responsiveness under real loadStays within the product's budget
Token cost per requestSpend and prompt bloatAlert on a sudden increase
Retrieval qualityWhether the right context was fetchedRelevant chunks appear in the top-k
Negative feedback rateUser-perceived qualityA rising trend signals drift

Read these as trends, not single readings: one bad score is noise, a moving line is drift.

Note

Note: Score correctness, safety, and drift on your live LLM traffic instead of grading by hand. Try TestMu AI Today!

What Are the Best LLM Observability Tools in 2026?

The best LLM observability tools pair request tracing with built-in evaluation. Four open-source platforms you can self-host are listed below, with their ownership and status as checked on 2026-10-19:

  • Langfuse - open-source tracing, prompt management, and evals; self-hostable and OpenTelemetry-friendly. Langfuse has been part of ClickHouse since January 2026. Its license and self-hosting are weighed against Braintrust's in Braintrust vs Langfuse.
  • Arize Phoenix - open-source tracing and evaluation with strong RAG and embedding-drift analysis. Dynatrace announced on October 1, 2026 that it had completed its acquisition of Arize, and Phoenix remains an open-source project.
  • OpenLLMetry - open-source OpenTelemetry instrumentation that ships LLM spans to any OTel backend. Its maker, Traceloop, announced in March 2026 that it is joining ServiceNow and says OpenLLMetry will remain open source.
  • Helicone - open-source proxy that logs requests, tokens, and cost with minimal setup. Helicone joined Mintlify in March 2026, and the service now runs in maintenance mode, which still ships security updates, new model support, and bug fixes.

Pick a tracing-first tool like Langfuse or Phoenix to see what happened, then pair it with evaluation like TestMu AI Agent Testing to judge whether the output was good. The roundup of the best LLM observability tools compares 11 options by tracing model, OpenTelemetry support and self-hosting. For a head-to-head of the first two, Langfuse vs Phoenix weighs license, self-hosting footprint and where evaluation runs.

How to Implement LLM Observability

Implementation has three moves: trace every request, attach evaluations to those traces, and sample deliberately so cost stays sane.

Instrument the Pipeline With Traces

Wrap each model call in a span and record the model and token counts with OpenTelemetry's standard GenAI attributes. Cost is not a standard attribute, so derive it from tokens or use your own namespace. The OpenTelemetry LLM metrics taxonomy lists every GenAI metric name and its status.

from opentelemetry import trace

tracer = trace.get_tracer("llm.app")

def answer(question, context):
    with tracer.start_as_current_span("llm.generate") as span:
        prompt = build_prompt(question, context)
        span.set_attribute("gen_ai.request.model", "gpt-4o")
        span.set_attribute("gen_ai.usage.input_tokens", count_tokens(prompt))

        response = client.chat(model="gpt-4o", messages=prompt)

        span.set_attribute("gen_ai.usage.output_tokens", response.usage.completion_tokens)
        span.set_attribute("app.llm.cost_usd", cost_of(response))  # custom; OTel has no cost attribute
        return response

Attach Evaluations to Traces

Run evaluators asynchronously on sampled traces and write the scores back as span attributes. A faithfulness or safety score sits beside the exact prompt and response that produced it, so a bad answer becomes debuggable. Record the prompt version on the same span, and LLM prompt monitoring can compare those scores between prompt versions.

Sample and Retain Deliberately

Full-payload logging at scale is expensive and risky. Sample a representative slice for heavy evaluation, redact PII before anything is stored, and keep recent traces detailed while older ones are summarized.

How Do You Monitor LLM Output in Production?

LLM output monitoring checks every live response, or a sample of them, for the failures a status page never shows. In production you almost never have the correct answer to compare against, so the checks have to be reference-free. Four techniques cover most cases, and they work best combined.

  • LLM-as-a-judge - a second model scores each answer against a rubric for relevance, faithfulness, and tone; the guide to LLM-as-a-judge covers rubric design and calibration.
  • Guardrail checks - deterministic validators catch schema breaks, banned content, and PII before a response ships.
  • Reference-free heuristics - self-consistency across samples, retrieval overlap, and refusal checks need no labeled answer.
  • Human and user feedback - thumbs, edits, and escalations calibrate the automated scores over time.

Output Checks to Run on Live LLM Traffic

The techniques turn into a short list of checks. Cheap deterministic checks run on every response; model-judged checks cost a model call each, so they run on a sample. The rates and alert rules below are starting points to tune against your own baseline. The guide to AI monitoring shows how to set those thresholds from a baseline.

CheckWhat it catchesMethodSampling rateAlert rule
Schema or format validityBroken JSON, missing fields, or wrong types that break the callerDeterministic: a parser plus schema validation100%Failure rate above the 7-day baseline, or any jump right after a deploy
PII in outputsEmails, phone numbers, ID or card numbers echoed or invented in a replyDeterministic regex and checksum pass; model-judged for names and addresses100% for the regex passAny match on a route that should never return personal data; redact or block before sending
Refusal rateOver-refusal after a prompt or model change, or refusals vanishing on unsafe requestsDeterministic phrase list, plus a model judge for soft refusals100% phrase pass; 1% to 5% judgedRate doubles or halves against the 7-day baseline
Groundedness against retrieved contextClaims the retrieved chunks do not supportModel-judged, claim by claim1% to 10% of RAG traffic, plus every flagged traceDaily mean falls below the bar set on your offline test set
ToxicityAbusive, hateful, or harassing textA classifier on every reply, a model judge on its hits100% classifier; judge only flagged repliesAny high-severity hit, or a rate above baseline
Length and token driftTruncated answers, rambling, prompt bloat, and cost creepDeterministic: token counts already on the span100%p50 or p95 output tokens moves 25% from the 7-day baseline
User feedbackQuality problems the automated checks missHuman signal: thumbs, edits, retries, escalationsEvery signal users sendNegative-feedback rate rises on a 7-day trend

A model judge for groundedness needs the retrieved chunks on the same trace as the answer, which is one more reason to trace retrieval as its own span.

Deterministic Output Check Results on the hh-rlhf Test Splits

A Node script run on 2026-10-19 applied three deterministic checks (a refusal-phrase list, a PII regex pass with a card checksum, and word counts) to the final assistant reply in the test splits of Anthropic's hh-rlhf dataset (MIT license). It printed counts only, never response text. The harmless-base split holds the harmlessness comparisons, each a chosen and a rejected reply to the same conversation:

harmless-base test: 2312 pairs
  chosen: 2312 replies, 4 empty
    refusal phrase: 41 (1.8%)
    any PII pattern: 2 (0.1%)
    email 1, phone 1, ssn 0, card 0
    words p50 21, p95 93
  rejected: 2312 replies, 0 empty
    refusal phrase: 20 (0.9%)
    any PII pattern: 10 (0.4%)
    email 4, phone 5, ssn 1, card 0
    words p50 27, p95 111
  • PII hits are rare and need review - 10 rejected and 2 chosen harmlessness replies matched a PII pattern, and the helpful-base test split had none across its 2,354 pairs. A regex cannot tell a real number from an invented one, so route hits to review.
  • A phrase list mixes refusals with politeness - 41 of 2,312 chosen harmlessness replies (1.8%) matched the phrase list, 23 of them only on "I'm sorry", which also opens apologies, so the count blends declines with sympathy and misses refusals worded freshly. Check the list against a judged sample before you alert on it.
  • Format checks need structured output - the dataset is free text, so the schema check did not apply; on a JSON route it is the cheapest check to run on every response.

Monitoring live output is what separates online evaluation from offline evaluation. Offline runs a fixed dataset before release; online scores real traffic as it happens, the only way to catch drift a frozen test set never sees. The best AI evaluation tools for production run that online scoring on a sample of live traffic.

Automating LLM Evaluation With TestMu AI

Tracing tells you what happened, but the evaluation pillar is the hard part: grading output by hand does not scale past a few flows.

TestMu AI Agent Testing takes the prompt that defines your agent, generates scenarios from it, and scores the outputs, so the evaluation pillar runs continuously instead of by hand:

  • Scenario generation - auto-generate scenarios across happy paths, edge cases, and adversarial inputs from a prompt or spec.
  • Specialized evaluators - dedicated agents score hallucination, bias, completeness, context awareness, and tone on every run.
  • Red-team coverage - an adversarial pass probes prompt injection, jailbreak, and PII leakage and grades the resistance.
  • A go/no-go verdict - results roll up to a green, yellow, or red rating, each backed by the transcript behind it.

The docs on testing your first AI agent walk through connecting an endpoint and running a first evaluation you can wire into your observability loop.

Note

Note: Turn evaluation into a continuous check on your LLM system, not a manual chore. Try TestMu AI Today!

LLM Observability Best Practices

A few habits keep an observability setup useful as traffic and models change:

  • Trace before you optimize - you cannot debug an answer you never captured, so instrument the full request path first. For an agent, the trace also needs its tool calls and their side effects, which AI agent monitoring tracks.
  • Score a sample, not everything - evaluate a representative slice of live traffic to keep cost and latency in check.
  • Alert on trends, not single runs - one bad answer is noise; a rising hallucination rate is the real signal. Hold its denominator steady, because an AI hallucination rate shifts with what it divides by.
  • Redact before you log - strip PII and secrets from stored prompts and completions so traces stay safe to keep.
  • Feed failures back into tests - promote every flagged production trace into your regression and red-team sets.

Everything above watches an LLM system on live traffic, after it ships. For a system that also acts, calling tools, writing files, or hitting APIs, TestMu AI's Agent Assurance covers the pre-production side of the same question: point it at the agent's codebase and it derives the test suite itself, generating functional, non-functional, and adversarial scenarios, then invokes the agent for real and grades each criterion against observed evidence such as tool calls and changed files rather than the model's own account. Anything it could not check is returned as Unable to Verify and counted in an assurance gap beside the pass rate, not folded into it.

Note

Note: Test how your agents actually behave across workflows, tools, and actions. Get started with Agent Assurance

Conclusion

LLM observability treats a running model as something to be understood, not just watched. Trace every request, score the output on live traffic, and alert on the trends that mean quality is slipping.

Start with the two costliest signals in production, hallucination and runaway spend, then automate their evaluation so a silent regression is caught before it reaches users.

Testing an AI agent? TestMu AI's Agent Testing validates chat, voice and IVR agents before your customers talk to them.

To run your first test, start free, or
for a full walkthrough of the product.

Author

...

Salman Khan

Blogs: 136

  • Twitter
  • Linkedin

Salman is a Test Automation Evangelist and Community Contributor at TestMu AI, with over 6 years of hands-on experience in software testing and automation. He has completed his Master of Technology in Computer Science and Engineering, demonstrating strong technical expertise in software development, testing, AI agents and LLMs. He is certified in KaneAI, Automation Testing, Selenium, Cypress, Playwright, and Appium, with deep experience in CI/CD pipelines, cross-browser testing, AI in testing, and mobile automation. Salman works closely with engineering teams to convert complex testing concepts into actionable, developer-first content. Salman has authored 120+ technical tutorials, guides, and documentation on test automation, web development, and related domains, making him a strong voice in the QA and testing community.

Reviewer

...

Srinivasan Sekar

Reviewer

  • Linkedin

Srinivasan Sekar is Director of Engineering at TestMu AI, where he leads engineering and open-source initiatives behind the Selenium and Appium automation grid and owns TestMu AI's MCP Server. A committer to Appium and a contributor to Selenium, WebdriverIO, Taiko, and AppiumTestDistribution, he brings over 15 years of experience in quality engineering and open-source technologies. He is the author of the Apress book 'The MCP Standard: A Developer's Guide to Building Universal AI Tools with the Model Context Protocol,' a Certified Kubernetes and Cloud Native Associate, and an international conference speaker. Before TestMu AI he spent over eight years at Thoughtworks as a Principal Consultant and Quality Architect. Srinivasan holds a B.Tech in Information Technology from Anna University.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

LLM Observability FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests