Evaluation and Observability
A model that tops a public leaderboard can still misbehave in your product. The benchmark measured a generic capability on a fixed dataset. Your app runs a specific prompt over your retrieval context, inside an agent loop, against live user input that drifts week to week. The discipline that closes this gap has two halves, and by mid-2026 they have largely fused into one tooling category. The practical question is how to choose and wire that tooling without confusing public benchmark quality with product behavior.
Where it sits in the stack: Part VII defines the measurement theory. Chapter 47 measures models in the abstract, Chapter 48 decides whether a gap is real, Chapter 49 defines the human label, Chapter 50 covers model judges, Chapter 51 covers groundedness, Chapter 52 covers multi-step trajectories, and Chapter 53 turns all of that into release gates. Here the object is your running system. It consumes the serving layer (Chapter 82) and the model gateway (Chapter 88), and it produces the feedback signal that feeds back into agents (Chapter 85) and fine-tuning (Chapter 84): eval datasets become preference data, and agent traces are where failures actually surface.
This is a dated snapshot (June 2026). Prices, version numbers, acquisitions, and "best for" claims move fast in this category, and 2026 has been a year of heavy consolidation. Treat every specific dollar figure and ranking below as indicative and source-attributed, not timeless, and re-verify current values and roadmaps before committing. Lead with the durable parts: the categories, the trade-offs, and the wiring.
The two halves of the loop
Evaluation asks "is the output good?" against criteria you define. It runs offline, on a curated dataset, in CI, before you ship, and online, sampled from production traffic and scored continuously. The unit of work is a score. Scores come in three flavors that you mix:
- Deterministic assertions: regex, JSON-schema validation, exact match, a latency or cost budget. Cheap, fast, and the first line of defense.
- Reference-based metrics: BLEU and ROUGE and their retrieval cousins like context precision, context recall, and faithfulness.
- LLM-as-judge: a second model grades the first against a rubric. This is the only practical way to score open-ended quality at scale, and the bulk of Chapter 50 is about doing it without fooling yourself.
observability asks "what actually happened?" It captures a trace: the full tree of a request as it moves through your system, every LLM call, retrieval, tool invocation, and nested agent step, with inputs, outputs, timing, token counts, and cost attached to each span. Without it you are debugging a non-deterministic distributed system by reading flat logs.
The two halves connect because you evaluate the traces you observe. A production trace is a ready-made test case. A judge run over sampled spans yields online scores, and a regression first caught on a dashboard gets promoted into the offline suite as a fixture. This loop, observe then score then curate then re-test, is the practical core of "continuously evaluate an LLM app", and it is the figure to keep in mind for the rest of the chapter (Figure 87.2).
The 2026 shakeout
Two acquisitions reshaped the landscape in early 2026, and they tell you the direction of travel: the standalone eval/observability tool is becoming a feature of a larger data or model platform.
- OpenAI acquired Promptfoo (announced March 9, 2026) and is
deprecating its own hosted Evals product (read-only October 31, 2026,
shutdown November 30, 2026), steering users toward Promptfoo and Datasets. The
open-source
openai/evalsrepo persists; the hosted dashboard does not. - ClickHouse acquired Langfuse (January 16, 2026, alongside ClickHouse's $400M Series D). Langfuse states its OSS and self-host commitment continues.
Ownership is the wrong unit of analysis. The churn is real, so favor tools whose data and instrumentation you can carry elsewhere. That is the case for OpenTelemetry below.
Key players
All license, pricing, and acquisition claims below are as of mid-2026 and attributed in Further reading. Pricing is the published list shape at time of writing and changes often, so treat exact dollars as indicative. Judge accuracy and "best for" claims are workload-dependent and not independently benchmarked here.
Eval harnesses and frameworks
| Name | What it is | License / model | Best for |
|---|---|---|---|
| lm-evaluation-harness (EleutherAI) | The de facto academic harness: 60+ standard benchmarks, hundreds of subtasks, reproducible configs, the backend behind many leaderboards | Open source (MIT) | Benchmarking a model's raw capability reproducibly |
| Inspect (UK AISI) | Framework for model and agentic evals: tool use, multi-turn, model-graded scoring; inspect_evals ships 200+ ready evals |
Open source (MIT) | Safety and agentic evaluation, sandboxed tool-use tasks |
| Promptfoo | CLI + config-driven eval and red-teaming: assertions, LLM-as-judge, model comparison, RAG/agent tests, 50+ vuln categories | Open source (MIT) + paid Enterprise; acquired by OpenAI (Mar 2026) | App-level evals and security red-teaming you can drop into CI without notebooks |
| DeepEval (Confident AI) | Pytest-native eval framework: 50+ metrics (LLM-as-judge, RAG, agentic, safety), G-Eval (rubric-guided judging), DAG metrics (checks composed as a dependency graph) | Open source + Confident AI cloud | Teams wanting unit-test-style regression on LLM output |
| RAGAS | Reference-free RAG metrics: faithfulness, answer relevancy, context precision/recall | Open source | Quick RAG-pipeline scoring, often consumed through other frameworks |
| MLflow 3 Evaluate | GenAI eval + tracing inside the MLflow platform | Open source | MLOps shops already standardized on MLflow / Databricks |
Tracing and observability platforms
| Name | What it is | License / model | Best for |
|---|---|---|---|
| Langfuse | OSS LLM engineering platform: tracing, prompt management, evals, datasets | MIT, self-hostable; cloud Hobby free / Core $29 / Pro $199 / Enterprise $2,499 per mo, billed per unit | Teams wanting a fully self-hostable OSS observability + eval stack |
| Opik (Comet) | OSS tracing + evaluation platform: traces, LLM-as-judge metrics, datasets, dashboards | Apache-2.0, self-hostable; Comet cloud | The other independent self-hostable OSS option next to Langfuse and Phoenix |
| LangSmith (LangChain) | Framework-agnostic observability + eval + prompt platform; agent ops | Proprietary SaaS; Developer free / Plus $39/seat/mo / Enterprise custom | Teams in or near the LangChain/LangGraph ecosystem wanting a polished managed platform |
| Arize Phoenix | OSS observability + eval built on OpenTelemetry, instrumented via OpenInference | Open source (ELv2-style); Arize AX is the commercial cloud | Teams wanting OTel-native, vendor-neutral tracing that runs locally with no account |
| Braintrust | Eval-first commercial platform: experiments, scoring, tracing, prompt playground | Proprietary SaaS; Starter free / Pro $249/mo / Enterprise custom | Product teams wanting eval, tracing, and a prompt playground tightly integrated |
| W&B Weave (Weights & Biases) | LLM tracing, evaluation, prompt/version tracking inside the W&B ecosystem | Proprietary SaaS | Teams already on W&B for experiment tracking |
| Confident AI | Cloud platform behind DeepEval: datasets, tracing, monitoring | Proprietary SaaS | DeepEval users wanting a managed collaboration layer |
The substrate
| Name | What it is | License / model | Best for |
|---|---|---|---|
| OpenTelemetry GenAI semantic conventions | Vendor-neutral spec for LLM/agent spans and metrics (gen_ai.* attributes), under CNCF OTel |
Open standard (Apache 2.0) | The wire format that lets you switch backends without re-instrumenting |
| OpenInference (Arize) | OTel-aligned conventions + drop-in auto-instrumentation across providers, agent frameworks, RAG libs | Open source | Practical auto-instrumentation today, ahead of the spec stabilizing |
As of mid-2026 the OTel GenAI spec is still largely experimental ("Development"
stability), though core attributes (gen_ai.system, gen_ai.request.model,
token counts) are stabilizing. You opt into the latest with
OTEL_SEMCONV_STABILITY_OPT_IN. OpenInference runs ahead of the spec and emits
to any OTel backend (Datadog, Grafana, Jaeger), which is why it is the practical
choice today.
How to choose
The first cut is capability eval versus application eval, because they are different jobs done by different tools.
The serving layer dictates the shape of your eval harness. Because you point evals and judges at the model gateway (Chapter 88) rather than at providers, an A/B between two models becomes a routing rule, not a code change, and judge credentials become scoped virtual keys with their own budget rather than raw provider secrets. The gateway you chose in Chapter 82 is what makes continuous online evaluation cheap to operate.
Pick a capability harness when you are measuring a model: comparing checkpoints, validating a fine-tune (Chapter 84), or reproducing a leaderboard number. Use Inspect when the task is agentic, tool-using, or safety-flavored, and lm-evaluation-harness for classic academic benchmarks.
Pick an application eval tool when you are measuring your system: this prompt, this RAG pipeline, this agent, against criteria that matter to your product. Within application eval, four axes decide the tool:
| Axis | Choose this | When |
|---|---|---|
| CI-native vs platform-native | Promptfoo (config/CLI) or DeepEval (pytest) | Evals must live in the repo and gate merges with no external account |
| Braintrust or LangSmith | You want a hosted UI for non-engineers to curate datasets and compare runs visually | |
| Self-host vs managed | Langfuse or Phoenix | Data residency, cost control, or vendor-neutrality matter and you can run infra |
| LangSmith, Braintrust, Confident AI | You would rather not operate it and will pay for polish | |
| OTel-native vs proprietary SDK | Phoenix / OpenInference | You want one instrumentation that targets many backends and avoids lock-in |
| LangSmith, Braintrust | Smoother out of the box, at the cost of coupling your code to one vendor | |
| Red-teaming in scope? | Promptfoo | You need the deepest built-in adversarial scanning (OWASP LLM Top 10, jailbreaks, PII, prompt injection) |
LLM-as-judge: cost versus trust
A judge is roughly 500x to 5000x cheaper than human review and can approach human-to-human agreement, but only when calibrated. An uncalibrated judge will score confidently and be wrong just as confidently, and you will not see it. As of mid-2026 the consensus practice, covered in depth in Chapter 50, is:
- Validate against a human-labeled sample. Report Cohen's kappa (agreement corrected for what chance alone would produce) and target around before you trust the judge to gate anything.
- Control for position bias. Score both A/B and B/A orderings and count only consistent wins.
- Control for verbosity and self-preference bias. Never use the same model family as both generator and judge.
- Use explicit, criterion-separated rubrics (G-Eval style). Split hard rules into a DAG of checks rather than one fuzzy prompt.
Change the human base rate and watch raw agreement stay high while Cohen's kappa collapses, which is why "the judge agrees 90% of the time" proves almost nothing.
import numpy as np
# A lazy judge that says "good" almost always, scored against human labels.
# Raw agreement looks great, but Cohen's kappa corrects for chance and collapses.
def kappa(m):
m = np.array(m, float); n = m.sum()
po = np.trace(m) / n # raw agreement
pe = (m.sum(0) * m.sum(1)).sum() / n**2 # agreement expected by chance
return po, (po - pe) / (1 - pe)
n = 1000
for good_rate in [0.70, 0.80, 0.90, 0.95]:
good = int(n * good_rate); bad = n - good
caught = int(bad * 0.20) # judge flags only 20% of bad answers
miss = int(good * 0.02) # and wrongly flags 2% of good ones
cm = [[caught, miss], [bad - caught, good - miss]]
po, k = kappa(cm)
verdict = "trust" if k >= 0.8 else "do NOT trust"
print(f"human good={good_rate:.0%} agreement={po:.2f} kappa={k:.2f} -> {verdict}")
A sensible default
For a typical team shipping one or two LLM features and wanting a continuous eval loop without standing up a platform team, here is a stack that is OSS-first, self-hostable, OTel-native, and CI-gated, with a clean upgrade path to a managed platform later.
| Job | Default pick | Managed alternative |
|---|---|---|
| Observability / tracing | Langfuse (self-host or free/Core cloud) | LangSmith (Plus) or Braintrust |
| App evals in CI | Promptfoo (assertions, comparison, red-team) + DeepEval (pytest metrics) | Braintrust / LangSmith eval modules |
| Model / capability eval | Inspect (agentic, safety) or lm-evaluation-harness (academic) | hosted leaderboards |
| Instrumentation | OpenTelemetry GenAI via OpenInference auto-instrumentation | proprietary SDK |
Two caveats to this default. First, the churn: Promptfoo is now OpenAI-owned and Langfuse is ClickHouse-owned, so re-confirm roadmap and licensing before you commit long-term. Second, do not add a vendor you do not need. Teams already standardized on Databricks should prefer MLflow 3 Evaluate, and teams on Weights & Biases should prefer Weave, over bolting on a new platform.
Wiring
The loop closes through the model gateway (Chapter 88): the app under test, the evals, and the judge all call it, never providers directly.
Here is a minimal Promptfoo config that points at the gateway and uses an
LLM judge with a deterministic guard in front of it. Save it as
promptfooconfig.yaml and run npx promptfoo@latest eval.
# promptfooconfig.yaml
providers:
- id: openai:chat:gpt-5 # resolved by the gateway, not OpenAI directly
config:
apiBaseUrl: https://gateway.internal/v1
apiKey: ${GATEWAY_VKEY} # scoped virtual key, budget-capped
prompts:
- "Answer using only the context:\n{{context}}\n\nQ: {{question}}"
tests:
- vars: { question: "...", context: "..." }
assert:
- type: is-json # deterministic guard, runs first and free
- type: llm-rubric # LLM-as-judge, calibrated rubric
value: "Answer is faithful to the context and cites it."
provider: openai:chat:gpt-5-mini # judge via gateway, different family
To gate merges, run that one command in CI and fail the job on a regression:
# CI step: fail the build if any eval assertion regresses
npx promptfoo@latest eval -c promptfooconfig.yaml --no-cache --output results.json
# exit code is non-zero when assertions fail, which fails the pipeline
The heartbeat of the whole system is the promotion step. A production trace from
Langfuse or Phoenix that fails an online judge gets promoted into the tests:
set above, so the offline suite hardens against the failures you actually see in
production rather than the ones you imagined at design time. Without that
promotion step you have two disconnected tools. With it you have a loop.
The production evaluation loop
That loop earns its keep only when it changes all three operating axes. Observability makes the system more capable by turning nondeterministic behavior into something you can debug, and evaluation turns "it feels better" into a release gate. The gateway keeps online judging cheap enough to run continuously, while deterministic assertions catch the cheap failures before a judge call is made. Trust rests on calibration and portability: an LLM judge is only as trustworthy as its agreement with humans, and the OTel substrate is what lets you carry traces and scores away from any vendor that changes its terms. The loop is worth building only if all three hold, and in mid-2026 the tooling has finally matured enough that they can.
The unstable choice is how much judgment to automate. LLM judges make continuous evaluation possible, but they also import model bias, drift, prompt sensitivity, and vendor dependence. Human review remains necessary for calibration, yet it is too slow and expensive to sit on every request. The practical answer is layered: deterministic checks first, calibrated model judges second, sampled human review third, and a release gate that records which layer actually carried the decision.
Further reading
- EleutherAI, “lm-evaluation-harness,” n.d.. github.comLM Evaluation Harness is an open-source framework by EleutherAI for standardized few-shot evaluation of language models across many benchmarks.
- UK AI Safety Institute, “Inspect AI,” n.d.. inspect.aisi.org.ukInspect is an open-source framework from AISI for designing and running large language model evaluations.
- UK AI Safety Institute, “Inspect evals suite,” n.d.. ukgovernmentbeis.github.ioInspect Evals is a community-contributed registry of 140 LLM evaluation tasks for the Inspect AI framework, maintained by UK AISI, Arcadia Impact, and the Vector Institute.
- Promptfoo, “Promptfoo documentation,” n.d.. promptfoo.devPromptfoo is an open-source CLI and library for evaluating and red-teaming LLM applications via automated test cases, benchmarks, and vulnerability scanning across 50+ providers.
- Promptfoo, “Promptfoo red-teaming,” n.d.. promptfoo.devPromptfoo is an open-source LLM red-teaming tool that systematically generates adversarial inputs to detect policy violations, prompt injections, jailbreaks, and information leakage before deployment.
- Promptfoo, “Promptfoo blog: OpenAI acquisition” (OpenAI acquisition (Mar 9, 2026)), 2026. promptfoo.devPromptfoo, an open-source LLM evaluation and red-teaming tool, announced it is joining OpenAI through an acquisition while keeping the open-source project active.
- OpenAI, “OpenAI Evals OSS repo,” n.d.. github.comOpenAI Evals is an open-source framework for evaluating LLMs and LLM systems, and a registry of benchmarks.
- OpenAI, “Hosted Evals deprecation timeline,” n.d.. developers.openai.comOpenAI's API deprecations page lists scheduled model retirements (e.g., gpt-5-2025-08-07, o3-2025-04-16) with recommended replacements and the Evals platform shutdown timeline.
- Confident AI, “DeepEval,” n.d.. deepeval.comDeepEval is an open-source LLM evaluation framework that lets you unit-test LLM outputs, run end-to-end evals, generate synthetic datasets, and integrate evals into CI/CD from Python.
- Confident AI, “Confident AI,” n.d.. confident-ai.comConfident AI is a cloud platform for LLM evaluation, observability, and AI quality governance, built on top of the open-source DeepEval framework.
- Confident AI, “RAGAS” (via DeepEval), n.d.. deepeval.comDeepEval's RAGAS metric averages four sub-metrics (answer relevancy, faithfulness, contextual precision, contextual recall) to holistically score a RAG pipeline's generator and retriever.
- MLflow, “MLflow GenAI eval,” n.d.. mlflow.orgMLflow's classic ML evaluation docs cover the mlflow.models.evaluate() API with automated metrics, visualizations, and custom scorers for classification and regression models.
- Langfuse, “Langfuse,” n.d.. langfuse.comLangfuse is an open-source observability and tracing platform for LLM applications, capturing traces, monitoring latency, tracking costs, and debugging issues.
- Langfuse, “Langfuse pricing,” n.d.. langfuse.comLangfuse pricing page describes tiered plans (Hobby, Core, Pro, Enterprise) for its open-source LLM observability platform covering tracing, prompt management, evaluation, and metrics.
- ClickHouse, “ClickHouse acquires Langfuse” (ClickHouse acquisition (Jan 16, 2026)), 2026. clickhouse.comClickHouse acquired Langfuse, the open-source platform for LLM observability, evaluations, and prompt management, to combine it with ClickHouse's analytical database for AI quality monitoring at scale.
- Comet, “Opik” (Apache-2.0 tracing + evaluation platform; self-hostable), n.d.. github.com
- LangChain, “LangSmith,” n.d.. langchain.comLangSmith is a commercial observability platform for LLM applications and agents, providing tracing, real-time monitoring, failure debugging, and cost and latency tracking.
- LangChain, “LangChain pricing,” n.d.. langchain.comThe LangSmith pricing page lists subscription tiers for LangChain's LLM observability and evaluation platform, covering plans for individual developers to enterprises.
- Arize, “Arize Phoenix,” n.d.. arize.comArize Phoenix is an open-source AI observability and evaluation platform built on OpenTelemetry, providing tracing, LLM-based evaluations, prompt management, and experiment tracking for LLM applications.
- Braintrust, “Braintrust,” n.d.. braintrust.devBraintrust is an AI observability platform for tracing production LLM applications, running evals, and catching regressions before they reach users.
- Braintrust, “Braintrust pricing,” n.d.. braintrust.dev
- Weights & Biases, “W&B Weave,” n.d.. wandb.aiW&B Weave is an observability platform for production agents that organizes multi-turn, multi-agent traces into sessions and turns, paired with evaluation and monitoring tools to improve reliability.
- OpenTelemetry, “OpenTelemetry GenAI semantic conventions,” n.d.. github.comOpenTelemetry's official semantic conventions for instrumenting generative AI calls with standardized span attributes covering model, token usage, and request metadata.
- OpenTelemetry, “GenAI observability overview,” 2026. opentelemetry.ioOpenTelemetry Semantic Conventions for Generative AI standardize how LLM operations are recorded, including model name, token counts, prompts, completions, and tool calls.
- Confident AI, “LLM-as-a-judge” (LLM-as-judge practice (2026)), 2026. deepeval.comDeepEval's 2026 guide covers LLM-as-a-Judge evaluation techniques including G-Eval, DAG metrics, and QAG-style metrics for scoring, classifying, or comparing LLM outputs.
- Confident AI, “Why LLM-as-a-judge is the best LLM evaluation method,” 2026. confident-ai.comConfident AI's guide to model-as-judge covers single-output and pairwise scoring, G-Eval, DAG-based evaluation, and prompting techniques for scalable LLM evaluation.
Comments
Log in to comment