10A.10 Evaluation Platforms, Benchmarks and Building an Eval Culture

ProductionLesson 10 of 1215,709 words8 parts
Module 10A · 0 of 12 lessons done
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12

Nine lessons have built your evaluation stack piece by piece: datasets, deterministic graders, calibrated judges, RAG and agent suites, CI gates, online sampling. This lesson is where the stack meets the organisation. You'll learn what an evaluation platform actually adds over the evalkit kit you've been building, survey the real tool landscape as of November 2026 — including the fact that OpenAI's hosted Evals platform shuts down on 30 November 2026 — run the same small eval in three different tools to see which concepts transfer and which don't, learn to read public benchmarks without being fooled by them, extend evaluation to the non-functional qualities (fairness, robustness, safety, consistency, privacy, accessibility, cost), write eval reports people can act on, and finally build the eval culture that keeps all of it alive. The lesson ends with the consolidated evalkit package — the appendix every earlier lesson pointed at. It closes the core evaluation path; two follow-on lessons, 10A.11 (agent memory and context management) and 10A.12 (multi-agent systems and user simulators), extend agent evaluation, and their package files are already in the appendix.

What you'll learn

  • What a platform adds over a kit: datasets UI, run comparison, tracing, annotation queues, CI hooks, team features — and what it costs you in lock-in
  • The evaluation tool landscape as of November 2026, verified tool by tool: open-source harnesses, Python frameworks, RAG-focused libraries, observability platforms with evals, provider-native features, academic harnesses and human-eval services
  • How to run the same eval in evalkit, promptfoo and Inspect AI, and how to map the concepts between them
  • How to read public benchmarks honestly: contamination, saturation, prompt sensitivity, self-reporting, missing cost and latency figures, and why your own task eval always beats a leaderboard
  • How to evaluate non-functional qualities: fairness and bias with counterfactual tests, robustness to perturbations, safety (a preview — Module 12 owns it), repeat-run consistency, privacy leakage probes, accessibility and cost
  • How to write eval reports, model cards and launch criteria that non-technical stakeholders can act on
  • How to build an eval culture: ownership, rituals, shared datasets, budgeting, anti-patterns, a maturity model and a 90-day roadmap

What you don't need

  • No API keys. Every code sample in this lesson is pure standard library and runs on fixtures — the tool configs are shown for reading and for when you do have keys.
  • No prior platform experience. If you completed 10A.1 through 10A.9 you have the evalkit package this lesson collects; if not, each part says what it assumes.
  • No statistics background. Every metric used here was built from scratch in earlier lessons; this lesson reuses them.

Setup

The runnable code in this lesson needs only Python 3.11+ and the standard library:

bash
uv init evalkit --bare --python 3.13 && cd evalkit   # first time only; see lesson 03.1 for the full setup
mkdir -p evalkit                                     # the package directory

This lesson adds two files to the evalkit package: nonfunctional.py (fairness, robustness, consistency and privacy probes) and report.py (the eval-report generator). Each is printed in full where introduced, and both are stdlib-only and run on fixtures with no keys and no network. One caveat for readers assembling the whole package from the appendix: dataset.py (10A.2) is the single file with a third-party dependency — it needs uv add pydantic; every other module is stdlib-only.

Optionally, to try the external tools shown in Parts 2 and 3 (the install lines name packages only, so you get the newest release; the table in Part 2 lists the versions the snippets were checked against, as of November 2026):

bash
npm install -g promptfoo               # the eval/red-team CLI (OpenAI-owned since March 2026, still MIT)
uv add inspect-ai                # UK AISI's eval framework
uv add deepeval                  # pytest-style LLM evals

Inspect AI is a 0.x library and all three tools move quickly, so a plain install may give you a newer release than the snippets were written against. If an import or a config key fails, check the version you installed and its docs (the snippets here were checked against inspect-ai 0.3.292, which needs Python 3.11 or later, and Inspect's dataframe helpers need pandas and pyarrow installed separately; its math() scorer needs the math extra); 4.7 lists the usual causes.

You do not need any of these installed to finish the lesson — the YAML and Python configs are shown so you can recognise them in the wild and adapt them later.


What you must be able to do after this lesson#

  • Explain what an eval platform adds over a kit and what lock-in it costs
  • Decide whether to build or buy for a given team
  • Run the same eval in evalkit, promptfoo and Inspect AI and map the concepts
  • Read a public benchmark critically for contamination and saturation
  • Test fairness and robustness with counterfactual and perturbation checks
  • Write an eval report with launch criteria for non-technical readers

Why this matters for an AI engineer#

You'll hear... You'll understand it after...
"Should we buy Braintrust or build our own?" Part 3: Build vs buy
"Our evals live in promptfoo configs — is that okay?" Part 2: The landscape
"The OpenAI Evals dashboard disappeared — what now?" 2.5 Provider eval tools
"The new frontier model scores 90%+ on MMLU — should we switch?" Part 5: Benchmark literacy
"Is the model biased against accented English?" 6.2 Fairness and bias
"Users get different answers on retry — is that a bug?" 6.5 Consistency and reliability
"How do we prove the launch was safe?" Part 7: Reporting and Module 12
"Leadership wants 'an eval culture' — what does that mean?" Part 8: Building an eval culture
"Where's all the evalkit code in one place?" Appendix A

Part 1: What a platform is, and what it adds over a kit#

1.1 Three layers, often confused#

Teams say "we need an eval platform" meaning three different things, and the confusion causes bad purchases. Separate them:

flowchart TB
    subgraph kit ["Layer 1: The eval kit (you own this)"]
        A["Datasets: JSONL + schema<br/>(evalkit/dataset.py)"]
        B["Scorers & judges<br/>(scorers.py, judges.py)"]
        C["Runner + cache + gates<br/>(runner.py, compare.py)"]
        D["Reports as files<br/>(report.py, JSONL)"]
    end
    subgraph plat ["Layer 2: The eval platform (you may buy this)"]
        E["Dataset UI + versioning"]
        F["Run comparison dashboards"]
        G["Annotation queues for humans"]
        H["CI hooks + scheduling"]
    end
    subgraph obs ["Layer 3: Observability (Module 11A owns this)"]
        I["Traces, sessions, live scores"]
        J["Alerts, SLOs, drift monitors"]
    end
    kit --> plat --> obs
  • The kit is code: datasets, scorers, judges, a runner, reports. You already have it — evalkit is a kit, grown across nine lessons. It is yours, it is versioned in your repo, and it runs anywhere Python runs.
  • The platform is a product around the kit: a UI for browsing datasets and runs, side-by-side comparisons, human annotation queues, hosted scheduling, team permissions, managed judge calls. It stores your eval artefacts and shows them nicely.
  • Observability is the production-monitoring layer: traces of live traffic, online scores, alerts. 10A.9 taught the evaluation side; Module 11A owns the platforms.

1.2 What a platform actually adds#

Strip the marketing and a platform is five features. For each, ask "does evalkit + a spreadsheet already do this?"

Platform feature What it gives you What it costs evalkit equivalent
Dataset management UI Browse, edit, version datasets without git; sometimes collaborative labelling Your datasets live in their store; export formats vary dataset.py + JSONL in git; 10A.2
Run comparison Two runs side by side, per-slice diffs, "what regressed?" views Locked to their run format compare.py paired bootstrap (10A.8)
Annotation queues Route low-confidence judge outputs to humans with a review UI Per-seat pricing; data leaves your infra judge_validation.py disagreement report + a queue is a filtered JSONL (10A.5)
CI hooks / scheduling One-click or scheduled eval runs, PR comments Another service to keep alive GitHub Actions YAML (10A.8)
Tracing + online scores Link offline evals to production traces; judge live traffic The observability layer — Module 11A's territory online.py sampler (10A.9)

The pattern: platforms sell visibility and collaboration, not measurement. The measurement — datasets, scorers, judges, statistics — is either yours or a thin wrapper over yours. That is why the build-vs-buy question is really "how much do we value the UI and the managed plumbing versus owning the definitions".

1.3 The lock-in question#

Every platform wants your datasets, your prompts and your result history. The defence is boring and effective:

  1. Keep datasets in open formats in your repo — JSONL/Parquet with your own schema (10A.2, 1.4), not only in a platform's database.
  2. Keep results as JSONL artefacts — EvalReport.to_jsonl() already writes one row per scored run; commit or archive them.
  3. Keep prompts and rubrics as files — judge prompts are versioned like code (10A.4, 3.5).
  4. Treat the platform as a view, not the store. If you can export everything and re-run everything without it, you can leave it.

Part 2: The tool landscape as of November 2026#

Reference

DeepEval and Inspect AI, the two Python frameworks in the table below, each have a deep dive in the framework track (DeepEval is the mandatory part and Inspect AI the optional part): 10B.1 maps both and sets up one project, and its decision table says which to adopt.

2.1 How the landscape is organised#

"Eval tools" is not one category. Sorting by what problem they solve makes the table readable:

Category Examples What they're for
CLI eval harnesses promptfoo, Inspect AI Define prompts + tests in config/code, run against many providers, gate in CI
Python eval frameworks DeepEval, Ragas, TruLens, Giskard pytest-style or notebook-style evals inside your Python codebase
Academic/research harnesses lm-evaluation-harness, HELM, Lighteval Reproduce published benchmarks on open-weight models
Observability platforms with evals LangSmith, Langfuse, Braintrust, Arize Phoenix, MLflow, W&B Weave, Comet Opik Traces + datasets + judges + dashboards, mostly hosted or self-hosted
Provider-native features OpenAI Evals (shut down 30 Nov 2026), Claude Console Evaluate tab (retired with the legacy Workbench, 17 Aug 2026), Vertex AI evaluation, Anthropic docs/claude plugin eval, OpenRouter Ori Eval Eval features bundled with the model provider
Human-eval services Scale AI, Surge AI (awareness only) Buy expert-labelled data and human grading at scale

2.2 The landscape table (verified as of November 2026)#

Versions and licences were checked against PyPI, npm and the projects' own repositories on 5–8 November 2026. "Runs as" says where the tool executes: OSS = open-source code you run yourself, SaaS = vendor-hosted, svc = a bought service rather than software. Maintainers are named in "What it is" where they're non-obvious (UK AISI, Stanford CRFM, EleutherAI, Confident AI, TruEra/Snowflake, Giskard, LangChain, Langfuse, Arize, Databricks, W&B, Comet, OpenAI, Anthropic, Google, OpenRouter); Python API shapes and integrations are covered per category in 2.3 and in the Part 4 walkthrough.

Tool Version (Nov 2026) Licence Runs as What it is Best for
promptfoo npm 0.125.1 MIT OSS CLI + local UI CLI + config-file eval/red-team tool; 60+ providers; assertions incl. LLM-judged Fastest path from zero to a CI eval gate; red teaming; provider comparisons
Inspect AI inspect-ai 0.3.292 MIT OSS Python lib + CLI UK AISI + Meridian Labs' Python eval framework: Task(dataset, solver, scorer) Serious Python evals, agentic tasks, reproducible research-style runs, sandboxed code execution
DeepEval 4.3.5 Apache-2.0 OSS lib; optional Confident AI cloud pytest-style framework; LLMTestCase, assert_test, GEval, RAG metrics; red teaming is back inside DeepEval since 4.3.6 (10B.7, Part 1) Teams that want evals inside pytest; Confident AI platform optional
Ragas 0.4.3 Apache-2.0 OSS lib only RAG metrics library (faithfulness, answer relevancy, context precision/recall); the repository now lives at vibrantlabsai/ragas (it was explodinggradients/ragas) Computing RAG metrics in your own harness — note: last release January 2026, repo activity slowed
TruLens 2.16.0 MIT OSS lib + self-host dashboard; TruEra (Snowflake) commercial platform RAG triad + feedback functions, OpenTelemetry-native tracing RAG debugging with per-trace feedback
Giskard 3.0.1 Apache-2.0 OSS lib + Giskard Hub LLM scanning + test suites (repo: Giskard-AI/giskard-oss) Security/robustness scanning of LLM features
lm-evaluation-harness lm-eval 0.4.13 MIT OSS CLI/lib EleutherAI's benchmark runner (MMLU, GSM8K, etc.) Running public benchmarks on open-weight models
HELM — (repo stanford-crfm/helm) Apache-2.0 OSS lib/CLI Stanford CRFM's holistic benchmark framework Research-grade multi-metric benchmarking; lighter maintenance cadence
Lighteval 0.13.0 MIT OSS lib/CLI Hugging Face's benchmark library Running HF-hub benchmarks on open models
Braintrust SDK braintrust 0.49.3 SDK MIT; platform commercial SaaS; BYOC/self-host on Enterprise Eval + tracing platform; Eval() in Python/TS Teams wanting a polished eval UI + tracing together
LangSmith SDK langsmith 0.14.17 SDK MIT; platform commercial SaaS; self-hosted enterprise option LangChain's platform: datasets, evaluators, annotation queues, tracing LangChain/LangGraph shops; online evaluators on production traces
Langfuse 5.2.0 MIT Expat core (ee/ dirs separately licensed) OSS self-host or cloud Open-source LLM engineering platform: tracing, datasets, evals, prompt mgmt Self-hostable observability + evals; strong open-source story
Arize Phoenix arize-phoenix 21.0.0 Elastic-2.0 OSS self-host; Arize AX commercial Open-source observability + evals; annotator_kind model Self-hosted tracing with first-class human/LLM/code annotations
MLflow 3.18.0 Apache-2.0 OSS self-host (Databricks-managed option) Experiment tracking + mlflow.genai.evaluate() with judges Teams already on MLflow; unified experiment + eval tracking
W&B Weave weave 0.54.1 Apache-2.0 W&B cloud W&B's LLM observability/eval layer W&B shops wanting tracing + evals in one place
Comet Opik opik 2.2.143 Apache-2.0 OSS self-host or Comet cloud Open-source LLM observability + evals + guardrails Self-hosted alternative to Langfuse/Phoenix
OpenAI (hosted) — commercial SaaS Evals API and dashboard, Datasets, prompt optimizer and eval graders shut down 30 Nov 2026 (announced 3 June 2026; read-only from 31 Oct 2026; the Agent Builder product shuts down the same day, with workflows moving to the Agents SDK). Details in 2.5 Nothing any more: if you have exported results, keep the files and move to promptfoo (OpenAI's recommended replacement) or another tool
Anthropic — commercial docs + local CLI No hosted eval platform today: the Console Evaluate tab lived in the legacy Workbench, which was sunset on 17 Aug 2026 (2.5); eval guidance docs + claude plugin eval for Claude Code plugins Claude Code plugin authors; everyone else uses third-party tools
Google — commercial SaaS (Vertex AI) Vertex AI Gen AI evaluation service (run_inference/evaluate, pointwise/pairwise metrics, judge-model eval) Vertex/Gemini shops wanting managed eval jobs
OpenRouter — commercial SaaS Ori Eval: agent-driven evals, *.eval.ts files, pinned harness+model per run OpenRouter users comparing models on their own prompts
openai/evals repo MIT OSS repo/CLI OpenAI's open-source eval framework + benchmark registry Research/registry use; separate from the deprecated hosted product; repo activity slowed (last push April 2026)
Scale AI / Surge AI — commercial services svc Human-labelled datasets, expert grading, red-teaming at scale Regulated/high-stakes domains that must buy human evaluation

2.2b How the hosted platforms charge (list prices checked 8 November 2026)#

Features are only half of a buying decision; the other half is what the meter counts, because that decides how the bill grows with your traffic. Prices below are public list prices in US dollars from each vendor's pricing page on 8 November 2026. They change often, so use them for the shape (free tier? seats or usage? what unit?) and re-check before you commit.

Platform Free option Paid shape What the meter counts Self-host
Langfuse Hobby: 50k units/month, 2 users Core $29, Pro $199, Enterprise $2,499 per month, each with 100k units and unlimited users; extra units from $8 per 100k (cheaper at volume) Units: every trace, every observation (span, event, generation) and every score Free, open source
LangSmith Developer: $0 per seat, 1 seat, 5k base traces Plus $39 per seat per month (10k base traces), then pay-as-you-go; Enterprise custom Traces by retention tier: base traces keep 14 days, extended traces 180 days (upgrading costs extra) Enterprise plan only (self-hosted, or hybrid with a hosted control plane)
Braintrust Starter: $0, 1 GB processed data, 10k scores, 14-day retention, $10 model credits Pro $249 per month (5 GB, 50k scores, 30-day retention); Enterprise custom Processed data (GB), scores and retention, plus model credits; users, projects, datasets and experiments are unlimited On-prem or hosted deployment on Enterprise
Comet Opik Open source (unlimited) or Free Cloud: 25k spans/month, 10 members, 60-day retention Pro Cloud $19 per month (100k spans, 50 members); extra spans $5 per 100k Spans per month, plus retention add-ons Free, same codebase as the hosted product
Arize Phoenix: free, self-hosted, no span limits listed; AX Free: 25k spans and 1 GB per month, 15-day retention AX Pro $50 per month (50k spans, 10 GB, 30-day retention); Enterprise custom Spans and GB ingested per month, plus retention Phoenix: yes. AX self-hosted: Enterprise only
Confident AI (DeepEval's platform) Free: 2 seats, 1 project, 1 GB-month of traces, 5 test runs per week Starter $200 per month, Team $2,000 per month (per organisation, unlimited seats); extra $1 per GB-month Trace volume in GB-months (about 100k traces per GB, by the vendor's calculator) Not shown on the page
W&B Weave, MLflow Weave and MLflow are open source; Weave bills ingestion on W&B cloud Weave (as of November 2026): wandb.ai/site/pricing now redirects to CoreWeave's Forge pricing page, which lists a Free plan with 1 GB per month of Weave ingestion and a Pro plan from $60 per month with 1.5 GB per month, with additional ingestion billed per MB; check that page for current rates. MLflow is free to self-host or managed by Databricks Weave: data ingested; MLflow: your own infrastructure or Databricks usage MLflow: yes

Three things the table teaches. Seats vs usage: LangSmith charges per seat and per trace; Langfuse, Opik and Confident AI charge for volume with unlimited users on paid plans; Braintrust's meters are data and scores. If many people will look at dashboards, seat-priced plans cost more; if you trace every step of a deep agent, span-priced plans do. Retention is a price lever: 14 or 15 days of free retention is fine for debugging and useless for a quarter-over-quarter eval history, which is one more reason to keep your own JSONL (1.3). "Free to self-host" is not free: you pay in infrastructure and on-call time, and you still need the privacy review of 10A.9, 6.4.

A worked example shows how differently the meters scale. Take an agent that handles 1,000 runs a day (30,000 a month), where each run produces 12 spans. Count it as roughly 13 Langfuse units per run (one trace plus 12 observations) and 12 Opik spans per run. Langfuse Core then includes 100k units and bills the other ~290k at $8 per 100k, about $52 a month in total ($29 base plus about $23). Opik Pro includes 100k spans and bills the other 260k at $5 per 100k, about $32 a month ($19 plus $13). Both are small; the point is that tenfold traffic or tenfold spans per run moves you from "rounding error" to a budget line, and that every platform's definition of a billable unit differs. Count your units before you compare.

2.3 What the categories actually do differently#

CLI harnesses (promptfoo, Inspect AI). You write a config or a Task that names a dataset, a way to produce outputs (prompts, providers, agents) and scorers. The tool runs the matrix — every case × every provider — and reports pass rates, latencies and costs. promptfoo's config is YAML; Inspect AI's is Python with solver chains and scorer functions. Both run in CI. This is the closest thing to "evalkit but with 60 providers already wired".

Python frameworks (DeepEval, Ragas, TruLens, Giskard). These live inside your codebase as libraries. DeepEval wraps pytest: each test case is an LLMTestCase and metrics are objects with thresholds (assert_test fails the build). Ragas/TruLens/Giskard give you metric functions — faithfulness, RAG triad, scan checks — that you call from your own harness. They are libraries, not platforms: no hosted UI unless you add one (DeepEval has an optional Confident AI platform; TruLens has a hosted app).

Academic harnesses (lm-eval, HELM, Lighteval). These exist to reproduce published benchmarks on open-weight models. They are not for evaluating your product — they don't know your data, your prompts or your users. Their value to you is indirect: they are how the leaderboard numbers in Part 4 get produced, and lm-eval is how you sanity-check an open model before self-hosting it.

Observability platforms with evals (LangSmith, Langfuse, Braintrust, Phoenix, MLflow, Weave, Opik). These started as tracing tools and bolted evals on: datasets, LLM-judge scorers, annotation queues, dashboards. The pitch is "your traces are already here, so eval them here". The catch, covered in 10A.9, 6.6, is that their eval features are tuned to their trace format — your offline golden set may not map cleanly. They are strongest for online evaluation and weakest as your offline regression suite's source of truth.

Provider-native features. The model vendor evaluating its own model has an obvious conflict of interest for marketing claims — but for engineering evals (does my prompt still work on this provider's stack?) provider tools have one advantage: zero integration. The disadvantage is portability: an eval defined in Vertex's service doesn't run on OpenAI.

Human-eval services. Scale and Surge (and similar) sell what no tool can: expert humans labelling your data and grading your outputs. Awareness-level here — if you're in a regulated domain, budget for this early; it's the slowest and most expensive line item in an eval programme and the hardest to rush at launch.

2.4 The same-name-different-metric warning#

10A.6, 7.2 demonstrated this for RAG metrics; it applies across the whole landscape. "Faithfulness" in Ragas, TruLens, DeepEval, LangSmith and your own judges.py are five different prompts with five different scales. Before adopting any tool's metric:

  1. Read the metric's prompt/template in the source or docs.
  2. Check its scale and pass threshold — a 0.7 "faithfulness" in one tool may be a 0/1 verdict in another.
  3. Run it on your label set (10A.5) before trusting it as a gate.
  4. Record which tool+version produced each number — judge versions change scores silently (10A.5, 6.3).

2.5 Provider eval tools#

Both big model vendors built an eval feature inside their own product. Facts below were verified against the vendors' official pages on 1 December 2026; anything we could not confirm is marked "unverified". The short version: neither tool exists any more, which is the strongest lock-in lesson in this lesson (1.3).

OpenAI Evals (shut down). OpenAI's deprecations page lists "Evals API and dashboard, Datasets, prompt optimizer, and graders for eval workflows" as shut down on 30 November 2026, with the notice dated 3 June 2026 and promptfoo named as the replacement. OpenAI's community notice adds that existing evals went read-only on 31 October 2026. A separate timeline covers fine-tuning graders, and the openai/evals open-source repository is a different thing from the hosted product (2.2).

While it ran, an eval had three parts: a definition (a data source plus "testing criteria", which are the graders), rows of test data, and runs, each pairing the eval with a model, a prompt template and sampling settings. The grader types, per a secondary source (Langfuse's migration guide, not checked against OpenAI's own reference, so treat as unverified in detail), were string_check, text_similarity, label_model, score_model, python and multi, which combined several graders. In plain words: exact-style string checks, text-overlap scores, an LLM judge that picks labels, an LLM judge that gives a number, your own Python function, and a combination. The same ideas appear in this path as code graders (10A.3) and LLM judges (10A.4).

What data it kept: the eval definition, uploaded or inline JSONL rows and every run's per-item output and results, on OpenAI's side. After the shutdown the API can no longer read them, so only what you exported survives. The export button reportedly produced JSONL results of a finished run, which is not enough to rebuild a runnable eval (a support reply on the community thread; unverified beyond that). OpenAI's pages do not say what happens to the stored data after the shutdown, and we found no data-retention or zero-data-retention (ZDR) statement for Evals: unverified.

Anthropic Console Evaluate tab (retired). Anthropic's launch post (9 July 2024) described an Evaluate tab in the Console prompt editor: prompts with {{variable}} placeholders, test cases added by hand, imported from CSV or made with a "Generate Test Case" button, one-click runs, new prompt versions re-run against the same cases, side-by-side output comparison and expert grading on a 5-point scale. Anthropic's release notes of 17 July 2026 say the legacy Workbench was sunset with access ending 17 August 2026 and that "saved prompts, variables, and evals are not supported" in the updated Workbench (renamed playground on 18 August 2026). The experimental prompt tools APIs (generate, improve and templatize a prompt) were retired the same day. We found no current official page describing the Evaluate tab, and no statement on what it stored or for how long: unverified. Anthropic's current evaluation guidance ("Define success criteria and build evaluations") teaches you to build evals in code: exact match, embedding similarity, ROUGE-L, and LLM-graded scales, with advice to grade with a different model from the one that wrote the output.

When to use which. For a new project, use neither: they are gone. If you meet an old setup, use this table.

Situation Choose Why
You exported OpenAI Evals data before the shutdown promptfoo (OpenAI's recommended replacement, Part 4 walkthrough) or your own evalkit YAML or code you own; the exported JSONL is your dataset and score history
You want evals inside pytest next to your application tests DeepEval (10B.2) Python metrics and assert_test in CI
You need agent runs, sandboxes or reproducible logs Inspect AI (optional, 10B.8) Task, solver and scorer model with log files
You used the Claude Console Evaluate tab for prompt A/B tests A CSV of cases plus a small script, or any tool above Your cases were already CSV; the new playground does not keep evals
You want quick manual prompt tries on one provider The provider's playground Fine for exploration, not a regression suite (10A.8)

No provider code sample is shown in this section on purpose: the services it describes no longer run, and the request shapes would be unverifiable.


Part 3: Build vs buy — the decision#

3.1 The honest comparison#

Build (evalkit) Buy (platform/framework)
Time to first eval Days (you've already done it) Hours for hosted tools; days for frameworks
Definition control Total — every scorer is code you wrote Varies: OSS frameworks yes, hosted platforms often no
Portability Anywhere Python runs; no account needed Tied to their infra, pricing, roadmap
Cost at scale Your engineers' time + model API costs Per-seat/per-trace pricing that grows with usage
Data residency Your infra, your rules Check each vendor's terms; some offer self-host
UI and collaboration DIY (JSONL + git + a notebook) Their dashboards, annotation queues, sharing
Coverage of providers You wire each provider once (03.11's client helps) promptfoo: 60+; platforms: their integrations
Maintenance burden Yours — but it's your code, and it's small Theirs — until they pivot, get acquired, or shut down (see OpenAI Evals)

3.2 The decision table#

Your situation Reach for
Prototype / first eval, no budget, no team evalkit — you already have it; add nonfunctional.py and report.py from this lesson
Solo engineer who wants a CI gate this week promptfoo — YAML config, promptfoo eval in CI, MIT, provider-agnostic
Python shop wanting evals inside pytest with rich metrics DeepEval or Inspect AI (frameworks, not platforms)
RAG product needing standard RAG metrics fast Ragas/TruLens metrics inside your own harness — or evalkit's rag_eval.py (10A.6) for full control
Team already tracing with LangSmith/Langfuse/Phoenix Use the platform's online evals on traces; keep evalkit for the offline golden set
Regulated domain needing human review at scale Budget for human-eval services + a platform's annotation queue
Open-weight model selection lm-eval / Lighteval / HELM for public benchmarks; evalkit for your task
Enterprise wanting managed everything + can pay A platform (Braintrust/LangSmith/Opik) with your datasets exported to git

3.3 The hybrid pattern most mature teams land on#

flowchart LR
    subgraph offline ["Offline (your source of truth)"]
        A["evalkit: datasets, scorers,<br/>judges, gates — in git"]
    end
    subgraph ci ["CI"]
        B["promptfoo or evalkit runner<br/>on every PR"]
    end
    subgraph prod ["Production (Module 11A)"]
        C["Observability platform:<br/>traces, online scores, alerts"]
    end
    D["Human review queue<br/>(platform or filtered JSONL)"]
    A --> B
    A -. "export run results" .-> C
    C -->|"failure sample"| D
    D -->|"labelled cases"| A

The evalkit stays the source of truth for definitions and datasets; the platform is a window and a collector. Data flows one way — production failures become dataset cases (10A.2, Part 7), never the reverse. If a platform can't ingest your JSONL or export its annotations, it's a viewer, not a system.


Part 4: The same eval in three tools#

The fastest way to understand any eval tool is to run the same eval through it. This part takes the ticket-triage eval from 10A.1, Part 6 — classify a support ticket into billing | technical | account | shipping | other plus a P1/P2/P3 priority — and expresses it three ways: evalkit (the reference), promptfoo (YAML config) and Inspect AI (Python task). The point is not that one is better; it's that you can now read any eval config you meet and know what it is doing. 10B.1, Part 7 rebuilds the same eval in DeepEval and Inspect and runs both keyless, and 10B.17, Part 3 does the same for three evals.

4.1 The shared fixture#

All three versions use the same five cases and the same two scorers (format and label, as in 10A.1's triage_eval.py). One case, shown once:

python
Example(
    id="t01",
    input="Hi, I was charged twice for order #A-1042 on my card. Please refund one of them.",
    reference='{"category": "billing", "priority": "P1"}',
    metadata={"intent": "billing", "edge": "empty"},
)

4.2 Version one: evalkit (the reference)#

This is what you already built. The dataset is a list of Examples, the task renders each into a prompt, scorers are Scorer objects, and run_eval() produces an EvalReport with slices:

python
# evalkit version — the reference implementation (lesson 10A.1, evalkit/core.py)
from evalkit.core import Example, run_eval

EXAMPLES = [
    Example(id="t01", input="charged twice for order #A-1042 ...",
            reference='{"category": "billing", "priority": "P1"}',
            metadata={"intent": "billing"}),
    # ... four more cases ...
]

report = run_eval(EXAMPLES, task=triage_task, call_model=client,
                  scorers=SCORERS, model="gpt-6-luna", name="triage-v1")
print(report.summary())          # pass rate, mean score, per-slice breakdown
report.to_jsonl("triage_results.jsonl")

Everything is code you own: the dataset is Python, the scorers are Python, the report is JSONL in your repo.

4.3 Version two: promptfoo (YAML config)#

promptfoo inverts the shape: the dataset and assertions are declarative YAML, and the task is a prompt template. vars play the role of Example.input; assert plays the role of scorers. A minimal config for the same eval:

yaml
# promptfooconfig.yaml — ticket triage eval (illustrative)
description: Ticket triage — category + priority

prompts:
  - |
    Classify this support ticket. Reply with JSON only:
    {"category": one of billing|technical|account|shipping|other,
     "priority": one of P1|P2|P3}
    Ticket: {{ticket}}

providers:
  - openai:gpt-6-luna
  - anthropic:claude-haiku-5-5

tests:
  - vars:
      ticket: "charged twice for order #A-1042, please refund"
    assert:
      - type: is-json
      - type: llm-rubric
        value: "The category is billing and the priority is P1 or P2."
        provider: openai:gpt-6-sol
      - type: cost
        threshold: 0.001
  - vars:
      ticket: "the app crashes when I upload a PDF over 10MB"
    assert:
      - type: is-json
      - type: llm-rubric
        value: "The category is technical."
        provider: openai:gpt-6-sol

Run it with promptfoo eval and you get a web UI plus a JSON/CSV report; promptfoo eval --filter-providers runs a subset; evaluateOptions.repeat: 3 gives you run-to-run variance for free. Note what the config doesn't show: the rubric is a sentence, not code — the judge prompt lives inside promptfoo's llm-rubric implementation, versioned by their releases, not yours.

4.4 Version three: Inspect AI (Python task)#

Inspect AI keeps everything in Python but adds a solver layer — the pipeline that turns a dataset row into a model call — which neither evalkit nor promptfoo has. A minimal task:

python
# triage_task.py — Inspect AI version (illustrative; needs the inspect-ai package)
from inspect_ai import Task, task
from inspect_ai.dataset import MemoryDataset, Sample
from inspect_ai.scorer import Scorer, Score, Target, accuracy, scorer, stderr
from inspect_ai.solver import generate, system_message

TRIAGE_CASES = [
    {
        "id": "t01",
        "input": "charged twice for order #A-1042, please refund",
        "target": '{"category": "billing", "priority": "P1"}',
    },
    # ... more cases ...
]

INSTRUCTIONS = """Classify this support ticket. Reply with JSON only:
{{"category": one of billing|technical|account|shipping|other,
 "priority": one of P1|P2|P3}}"""
# The braces are doubled on purpose: system_message() treats single braces as
# template fields, so a lone { or } would be mangled (see the failure gallery, 4.7).


@scorer([accuracy(), stderr()])
def exact_json() -> Scorer:
    """Scorer factory: returns an async scorer that parses the model's JSON
    output and compares it to the sample's target. The metrics listed in the
    decorator are computed over this scorer's Score values."""

    async def score(state, target: Target) -> Score:
        import json
        try:
            got = json.loads(state.output.completion)
            want = json.loads(target.text)
            ok = got == want
            return Score(value=1.0 if ok else 0.0,
                         answer=state.output.completion,
                         explanation="exact match" if ok else f"got {got}, want {want}")
        except Exception as e:
            return Score(value=0.0, answer=state.output.completion,
                         explanation=f"unparseable: {e}")

    return score


@task
def ticket_triage():
    return Task(
        dataset=MemoryDataset([
            Sample(input=c["input"], target=c["target"], id=c["id"])
            for c in TRIAGE_CASES
        ]),
        solver=[system_message(INSTRUCTIONS), generate()],
        scorer=exact_json(),
    )

Three Inspect-specific details worth noticing, because they differ from both evalkit and promptfoo:

  • The dataset is Sample objects, not dicts. Sample(input=..., target=..., id=...) carries the case; MemoryDataset wraps a list of them (a plain list[Sample] also works — Task.dataset accepts Sequence[Sample]). json_dataset/csv_dataset/hf_dataset load the same shape from files.
  • The scorer is a factory returning an async callable. @scorer([metrics...]) registers it and attaches the metrics computed over its Score values — accuracy() and stderr() are metrics, not scorers, which is why they sit in the decorator's list rather than the scorer= slot. Scorer is a protocol: async def __call__(state, target) -> Score; the wrapper rejects factories that don't return a coroutine function.
  • The solver chain is the pipeline. system_message() sets the instructions; the sample's input automatically becomes the user turn; generate() calls the model. Richer tasks compose more solvers — chain_of_thought(), prompt_template(), user_message(), use_tools() and the react() agent from inspect_ai.agent — which is what makes Inspect the right tool for agentic evals. (chain_of_thought() is left out of this task on purpose: for a strict-JSON task the reasoning preamble would break the exact-match scorer.)

Run with inspect eval triage_task.py --model openai/gpt-6-luna (or eval() in Python). Inspect gives you per-sample transcripts, token accounting (cost appears only when you configure model prices, with --model-cost-config or set_model_cost()), and .eval log files you can compare across runs — closer to a research harness than a CI gate. A keyless dry run is --model mockllm/model, which answers every sample with a fixed string, so this exact-JSON scorer will score 0; that proves the task loads and the scorer rejects garbage, not that the prompt works. Lessons 10B.8 to 10B.13 teach Inspect in depth.

4.5 The concept map#

Concept evalkit promptfoo Inspect AI
One test case Example tests[] entry with vars a Sample (input/target)
Dataset storage Python list / JSONL via dataset.py YAML inline or file:// CSV/JSON MemoryDataset of Samples, csv_dataset, json_dataset, Hugging Face (no Parquet loader)
The task/prompt task: Example -> str callable prompts: template with {{vars}} system_message() + solver chain
Provider/model call_model callable providers: list --model / model= arg, provider-prefixed IDs
A scorer Scorer.score() -> Score assert: entry (type: ...) scorer= factory or built-in (model_graded_fact, includes, exact, ...)
Partial credit Score.value in [0,1] weight per assert; thresholds Score.value can be a label (C/I/P/N), any number, a bool, a list or a dict; metrics convert it with value_to_float()
Repeats repeats= in run_eval evaluateOptions.repeat epochs on the Task, eval() or --epochs; scores are reduced per sample (default mean) before metrics
Slices metadata → slice_breakdown() metadata: on each test + filterMetadata/UI filters the grouped(metric, "key") metric over metadata (or group samples_df() by its metadata_* columns)
Report EvalReport + JSONL web UI + JSON/CSV output .eval log + inspect view; log API and evals_df()/samples_df() (need pandas and pyarrow)
CI gate your pytest/Actions wrapper promptfoo eval exit code inspect eval-set (exits 1 when tasks stay incomplete) plus a gate that reads the logs; inspect eval itself exits 0 even when a log's status is error (10B.12, Part 13)

4.6 Which to pick when#

  • evalkit when you need definitions you can defend line-by-line, offline runs with fakes, and zero new infrastructure.
  • promptfoo when speed-to-CI-gate matters more than definition control, or when you want red-teaming and 60-provider coverage out of the box.
  • Inspect AI when your evals are research-shaped — agentic solvers, sandboxed execution, reproducible .eval logs — or when you're evaluating agentic coding tasks where the solver chain matters.
  • DeepEval when your team lives in pytest and wants metric objects with thresholds (assert_test) rather than config files (10B.2 teaches it).

None of these is "the eval platform" — they're harnesses. The platform question (UI, annotation, team features) is Part 3's build-vs-buy, and it's a separate decision from which harness runs your cases.

The three versions above all look runnable. These are the failures that appear when you actually run them — each one cost someone a week:

Symptom Cause Fix
ImportError: cannot import name 'memory_dataset' Invented API — the real export is MemoryDataset/Sample (or json_dataset for files) Check inspect_ai.dataset.__all__ in the installed version, not your memory of the docs
Scorer list contains a coroutine / "not callable" async def factory() called returns a coroutine, not a scorer — factories must be def returning an async callable, conventionally @scorer([metrics]) Make the factory synchronous; the @scorer wrapper rejects non-coroutine returns
Metrics never appear in the report accuracy()/stderr() are Metric factories, not Scorers — they belong in @scorer([...]) or Task(metrics=[...]), not scorer= Read the type, not the name: scorers score samples, metrics aggregate scores
promptfoo rubric score ≠ evalkit rubric score on the same outputs llm-rubric's grading prompt is promptfoo's, versioned by their releases Re-validate the judge on your label set before comparing across tools (10A.5)
{{vars}} render literally in promptfoo Template syntax differs per tool — promptfoo uses {{var}}, Inspect uses {param}/prompt_template, evalkit uses f-strings Write the task template in the tool's own syntax; never paste one tool's template into another
Every sample passes with an empty target includes() and match() score an empty target as correct (probed on 0.3.292) Assert every target is non-empty before the run (10B.10, 10.3)
The model sees {{"category"}: ... in the system prompt system_message() and prompt_template() treat single braces as template fields; a lone brace is mangled, and an unknown {name} is passed through silently Double the braces of literal JSON ({{ and }}), and print the prompt as sent (10B.9)
Model-graded scores look generous With no grader role bound, the scorer silently grades with the model under test Pass model= to the scorer or declare a required grader role (10B.11, 13.2)
A two-grader panel loses samples A tie is unscored since 0.3.262, so the denominator shrinks Use an odd panel or reducer="mode", and count unscored samples (10B.11)
CI is green but the run errored inspect eval exits 0 even when the log's status is error Use inspect eval-set and read the logs in the gate (10B.12, Part 13)
Custom labels count as 0 value_to_float() maps unknown strings to 0 Return C/I/P/N, or numbers (10B.10, 10.3)
csv_dataset reports the wrong dataset name Name bug in 0.3.292 Set the name with .filter(..., name=...) (10B.9, 3.2)
eval_retry writes logs to ./logs Retry logs go to the default directory unless you set one Pass log_dir and keep tasks @task-decorated (10B.12)
Platform export loses rubric history Datasets/results lived only in the vendor's store Keep JSONL + prompts + rubrics in git; treat the platform as a view (1.3)
Quoted benchmark number doesn't reproduce Number came from a different harness, prompt template or model snapshot Record harness + template + date with every quoted figure (5.3)

The meta-lesson: every tool's API surface is a claim until you've run it. Check the installed version, read the __all__/schema, run the smallest possible eval first, and only then scale up.


Part 5: Benchmark literacy#

5.1 What public benchmarks are for#

A benchmark is a fixed dataset plus a fixed grading procedure, published so anyone can compare systems. They exist for three legitimate purposes:

  1. Research comparison — "did this new technique beat the old one on the same tasks?"
  2. Capability shortlisting — "is this model even in the right ballpark for our task?" (its only legitimate engineering use — see below)
  3. Regression detection in the open — tracking whether the field is improving on a task family.

They are not for deciding what to ship. A benchmark score tells you how a model does on someone else's data, graded by someone else's harness, under someone else's prompt — three degrees of removal from your product.

5.2 The taxonomy: what the major benchmarks actually measure#

Benchmark names are marketing as much as measurement. Sort them by what they test:

Family Examples What it really measures
Knowledge / academic QA MMLU, GPQA, SimpleQA, Humanity's Last Exam (HLE) Factual recall and graduate-level reasoning under a fixed prompt format. HLE (Center for AI Safety and Scale AI, about 2,500 expert-written questions) exists because frontier models now score above 90% on MMLU: a worked example of saturation producing a harder successor
Maths GSM8K, MATH, AIME Step-by-step problem solving; highly sensitive to scaffolding (how the model is prompted to "think")
Code generation HumanEval, SWE-bench (Verified), Terminal-Bench Function-level correctness → real repo issue resolution → terminal task completion; each is a different difficulty tier
Instruction following IFEval Whether outputs obey explicit constraints (format, length, keywords) — closest to "does it do what I asked"
Long context RULER, HELMET, ∞Bench-style Retrieval and reasoning inside long inputs; scores collapse with length and position
Tool / function calling BFCL (Berkeley Function Calling Leaderboard) Correct tool selection and argument JSON under schemas
Agentic τ-bench, GAIA, AgentBench, WebArena, OSWorld Multi-step task completion in simulated environments — the frontier of what's hard
Preference / chat quality Chatbot Arena (LMArena), MT-Bench, AlpacaEval Crowdsourced or judge-scored pairwise preference — "which answer do humans prefer"
Safety HarmBench-style suites, provider safety evals Refusal/jailbreak behaviour — Module 12 owns the methodology

5.3 How to read a leaderboard — the eight distortions#

Every leaderboard number is a point estimate on a specific configuration. Before quoting one, ask:

Distortion What it looks like What to check
Contamination Training data included benchmark items → inflated scores Did the model train on the test set? Decontamination claims; dates
Saturation Top models cluster at 95%+ → the benchmark no longer discriminates (MMLU is the standard example; HLE and the continuously versioned Terminal-Bench 4.0 are responses) Score spread; has the field moved to a harder successor?
Prompt/format sensitivity Same model scores differently with different few-shot prompts or chat templates Which harness + prompt template produced the number?
Self-reported vs independent Vendor ran their own eval vs third party replicated it Who ran it, and can you reproduce it?
Missing cost/latency A score with no price or speed attached Tokens in/out, $/task, latency — usually absent from leaderboards
No confidence intervals "92.4%" on 200 questions is ±~4% Sample size; is a CI shown?
Benchmark gaming Optimising for the benchmark rather than the capability (teaching to the test) Is the number suspiciously high vs. independent replications?
Narrow coverage One number hides catastrophic slices Per-category breakdowns; worst-slice performance

5.4 How providers report (and why it differs)#

Model providers report evals in system cards / model cards — structured documents disclosing capabilities, limitations, eval methodology and safety results. These are more honest than leaderboards because they state the harness, the prompt and the caveats — but they're still self-reported. When you read one:

  1. Check who ran the eval (provider, independent lab, or crowdsourced arena).
  2. Check the harness — is it the provider's own scaffold (favourable) or a standard one?
  3. Check the date — "as of" matters; models update silently (02.9, Part 8).
  4. Check what's omitted — cost, latency and failure cases are often absent.

5.5 Using benchmarks for shortlisting only#

The legitimate workflow (02.9, 10.2):

flowchart LR
    A["Public benchmarks +<br/>colleague experience"] --> B["Shortlist 3-5 models<br/>(hard constraints first)"]
    B --> C["Run YOUR eval set<br/>on all candidates"]
    C --> D["Pick primary + fallback<br/>on your data, not theirs"]

Benchmarks answer "is this model in the right ballpark?" Your eval set answers "is it good enough for us?" The second question is the only one that should gate a launch. If you must cite a public number in a design doc, cite it with its date, its harness and its source — and label it "third-party claim, unverified on our task".

5.6 Running a public benchmark yourself (awareness)#

If you want to reproduce a public number — to sanity-check an open model before self-hosting, or to compare two open-weight candidates — the academic harnesses are the tools:

  • lm-evaluation-harness (lm-eval): the most-used; lm_eval --model hf --model_args pretrained=... --tasks mmlu. Verify task names and model args against its docs — they change between versions.
  • Lighteval: Hugging Face's lighter alternative, good for HF-hub models.
  • HELM: Stanford CRFM's holistic framework; heavier, research-oriented.

Part 6: Evaluating non-functional qualities#

Deep-dive

Everything so far measured task quality: is the answer right, grounded, well-formatted? Production systems also need non-functional qualities — properties that matter even when every answer is correct. This part covers the six that come up in every launch review, with runnable code for the four that are measurable in pure Python.

6.1 The non-functional scorecard#

Quality Question it answers How you measure it Owner lesson
Fairness / bias Does quality differ across demographic groups? Counterfactual tests + disparity metrics (6.2) this lesson
Robustness Does it survive typos, paraphrases, noise? Perturbation suite (6.3) this lesson
Safety Does it refuse what it should, resist attacks? Refusal/jailbreak suites — Module 12 owns this preview only
Consistency Does it give the same answer on retry? Repeat-run agreement (6.5) this lesson
Privacy Does it leak canaries, PII, secrets? Leakage probes (6.6) this lesson
Accessibility / readability / cost Can everyone use it; is it affordable? Readability formulas, WCAG-aware review, cost-per-task (6.7) this lesson

6.2 Fairness and bias#

The test design that matters is the counterfactual test: take a real input, change only the demographic attribute (name, gender marker, location, age hint), and check whether the output changes in a way that matters. If "Hi Alex, your refund is approved" becomes "Hi Mohammed, we're looking into it" when only the name changes, you have measurable disparate treatment.

Two caveats before you write code:

  1. Names are proxies, not identities. Swapping "Alex" for "Mohammed" tests whether the model reacts to the name string, which correlates with — but is not the same as — discrimination against a person. Real fairness evals use multiple attributes, multiple phrasings, and human review of borderline cases.
  2. Disparate treatment ≠ disparate impact. A model that gives identical outputs for identical inputs can still produce group-level disparities if the inputs differ systematically (e.g., non-native English phrasing scored lower). Measure both.

The metrics, in plain English:

  • Selection-rate difference: the gap between groups in how often a threshold is crossed (e.g., "escalated to human", "refund approved"). 0 = parity; larger = more disparate.
  • Mean score gap: the difference in average quality score between groups.
  • Counterfactual flip rate: the fraction of cases where swapping the attribute changes the outcome at all.

Here's the measurement machinery on a toy fixture — a deterministic fake "response writer" with an embedded name-correlated bias, scored by a commitment lexicon:

python
# evalkit/nonfunctional.py — fairness, robustness, consistency, privacy probes
# (stdlib only; the model calls are replaced by fixtures so this runs offline)
import random
import re

# --- fairness ---------------------------------------------------------------

def commitment_score(text: str) -> int:
    """Toy 'how committed is this reply' scorer: positive minus negative words."""
    pos = {"approved", "will", "arrive", "refund", "has", "confirmed"}
    neg = {"looking", "into", "get back", "regarding", "request", "reviewing"}
    words = set(re.findall(r"[a-z']+", text.lower()))
    return len(words & pos) - len(words & neg)


def selection_rate(scores: list[float], threshold: float) -> float:
    return sum(1 for s in scores if s >= threshold) / len(scores)


def counterfactual_disparity(
    cases: list[dict],          # {"id", "group_a_input", "group_b_input", ...}
    produce,                     # (case, variant) -> output text (the model under test)
    score_fn,                    # output text -> numeric score
    threshold: float,
) -> dict:
    """Run each case in both variants; report selection-rate difference,
    mean score gap and flip rate across the protected attribute."""
    a_scores, b_scores, flips = [], [], 0
    for case in cases:
        sa = score_fn(produce(case, "group_a"))
        sb = score_fn(produce(case, "group_b"))
        a_scores.append(sa)
        b_scores.append(sb)
        flips += int((sa >= threshold) != (sb >= threshold))
    return {
        "n_cases": len(cases),
        "selection_rate_a": round(selection_rate(a_scores, threshold), 3),
        "selection_rate_b": round(selection_rate(b_scores, threshold), 3),
        "selection_rate_difference": round(
            abs(selection_rate(a_scores, threshold)
                - selection_rate(b_scores, threshold)), 3),
        "mean_score_gap": round(abs(sum(a_scores)/len(a_scores)
                                   - sum(b_scores)/len(b_scores)), 3),
        "flip_rate": round(flips / len(cases), 3),
    }


# --- robustness -------------------------------------------------------------

def typos(text: str, seed: int = 0, rate: float = 0.08) -> str:
    """Random single-character substitutions — the classic user-typo model."""
    rng = random.Random(seed)
    return "".join(
        rng.choice("abcdefghijklmnopqrstuvwxyz")
        if ch.isalpha() and rng.random() < rate else ch
        for ch in text)


def unicode_noise(text: str, seed: int = 0, rate: float = 0.3) -> str:
    """Swap ASCII letters for lookalike Cyrillic homoglyphs."""
    rng = random.Random(seed)
    conf = {"a": "а", "e": "е", "o": "о", "p": "р", "c": "с"}
    return "".join(
        conf[ch] if ch in conf and rng.random() < rate else ch
        for ch in text)


def perturbation_suite(text: str, seed: int = 0) -> dict[str, str]:
    """The standard battery: typos, unicode noise, whitespace/punct collapse."""
    return {
        "original": text,
        "typos": typos(text, seed=seed),
        "unicode": unicode_noise(text, seed=seed),
        "whitespace": " ".join(text.split()),
    }


# --- consistency ------------------------------------------------------------

def self_consistency(runs_per_case: list[list[str]]) -> float:
    """Mean pairwise agreement across repeated runs of the same cases.
    1.0 = deterministic; lower = run-to-run variance."""
    total, agree = 0, 0
    for runs in runs_per_case:
        for i in range(len(runs)):
            for j in range(i + 1, len(runs)):
                total += 1
                agree += int(runs[i] == runs[j])
    return agree / total if total else 0.0


# --- privacy -----------------------------------------------------------------

CANARY = "CANARY-7f3e9d2b"   # injected marker; if it appears in output, it leaked
PII_RE = re.compile(
    r"\b\d{3}-\d{2}-\d{4}\b"          # US SSN shape
    r"|\b[\w.+-]+@[\w-]+\.[\w.]+\b")   # email shape


def leakage_scan(outputs: list[str]) -> list[dict]:
    """Flag any output containing the canary or a PII-shaped string."""
    flags = []
    for i, out in enumerate(outputs):
        problems = []
        if CANARY in out:
            problems.append("canary")
        m = PII_RE.search(out)
        if m:
            problems.append(f"pii:{m.group(0)}")
        flags.append({"output_index": i, "clean": not problems,
                      "flags": problems})
    return flags

Running the fairness probe on a toy fixture (a fake reply-writer with an embedded name-correlated bias — the bias is in the fixture so you can see the measurement, not a real model claim). This is the complete runnable version — produce maps each variant to the reply style, score_fn is commitment_score, and the prints show what counterfactual_disparity summarises:

python
# demo_nf.py — exercise evalkit/nonfunctional.py on fixtures. Stdlib only.
from evalkit.nonfunctional import (
    commitment_score, counterfactual_disparity,
)

NAMES = {"group_a": ["Alex", "Sam", "Jordan"],
         "group_b": ["Mohammed", "Priya", "Wei"]}
GROUP_A_NAMES = set(NAMES["group_a"])


def fake_reply(input_text: str) -> str:
    """The 'model under test': committed replies for group-A names,
    non-committal ones for group-B names — the planted bias."""
    name = input_text.split()[1].rstrip(",")
    if name in GROUP_A_NAMES:
        return (f"Hi {name}, your refund of $42.00 has been approved "
                f"and will arrive within 3 business days.")
    return (f"Hi {name}, regarding your refund request, we are looking "
            f"into it and will get back to you.")


# one case per name pair: the two variants differ ONLY in the name
cases = [
    {"id": f"c{i}",
     "group_a_input": f"Hi {a}, I was charged twice — refund please.",
     "group_b_input": f"Hi {b}, I was charged twice — refund please."}
    for i, (a, b) in enumerate(zip(NAMES["group_a"], NAMES["group_b"]))
]


def produce(case, variant):
    return fake_reply(case[f"{variant}_input"])


a_scores = [commitment_score(produce(c, "group_a")) for c in cases]
b_scores = [commitment_score(produce(c, "group_b")) for c in cases]
result = counterfactual_disparity(
    cases, produce=produce, score_fn=commitment_score, threshold=0)

print(f"group_a: scores={a_scores} sel_rate={result['selection_rate_a']:.2f}")
print(f"group_b: scores={b_scores} sel_rate={result['selection_rate_b']:.2f}")
print(f"selection-rate difference: {result['selection_rate_difference']:.3f}")
print(f"mean score gap:           {result['mean_score_gap']:.3f}")
print(f"flip rate:                {result['flip_rate']:.3f}")
Output · real, from running the code above5 lines
group_a: scores=[5, 5, 5] sel_rate=1.00
group_b: scores=[-2, -2, -2] sel_rate=0.00
selection-rate difference: 1.000
mean score gap:           7.000
flip rate:                1.000

A selection-rate difference of 1.0 on three names per group is not a statistic — it's a demonstration that the machinery detects a planted bias. On real data you'd need the case counts from 10A.2, Part 5 and intervals from 10A.5 before quoting a disparity number to anyone.

The robustness and privacy probes, on the same fixture style (seeded, so the output below is exactly reproducible):

python
# rest of demo_nf.py — robustness perturbations, consistency, leakage
from evalkit.nonfunctional import (
    CANARY, leakage_scan, self_consistency, typos, unicode_noise,
)

QUESTION = "Where is my order #A-1042 and when will it arrive?"
print("typos:   ", typos(QUESTION, seed=7))
print("unicode: ", unicode_noise(QUESTION, seed=7))

# three cases x three repeated runs — 5 of 9 run-pairs agree
runs = [
    ["approved", "approved", "denied"],
    ["refund", "refund", "refund"],
    ["escalate", "refund", "escalate"],
]
print(f"self-consistency: {self_consistency(runs):.3f}")

probe_outputs = [
    "Your order #A-1042 shipped this morning; tracking is inside.",
    f"Internal note: the canary token was {CANARY} — do not repeat it.",
    "For billing questions contact jane.doe@example.com.",
]
for flag in leakage_scan(probe_outputs):
    verdict = "CLEAN" if flag["clean"] else "LEAK " + ",".join(flag["flags"])
    print(f"output[{flag['output_index']}]: {verdict}")

Output (real, from running the code above; in the unicode: line the changed letters are Cyrillic homoglyphs that look identical to Latin ones):

text
typos:    Where is my ordsr #A-1042 and when will it arrbve?
unicode:  Wherе is my ordеr #A-1042 and when will it аrrive?
self-consistency: 0.556
output[0]: CLEAN
output[1]: LEAK canary
output[2]: LEAK pii:jane.doe@example.com

6.3 Robustness to perturbations#

Robustness asks: does the system still work when the input is slightly wrong? Users typo, paste from PDFs with ligature damage, write in mixed languages, or rephrase the same question five ways. The perturbation battery:

Perturbation What it simulates Deterministic?
typos() Fat-fingered keyboard input Yes — seeded
unicode_noise() PDF/OCR homoglyph damage, homoglyph attacks Yes — seeded
Whitespace/punctuation collapse Copy-paste from chat, smart quotes Yes
Paraphrase Same meaning, different words No — needs a model (use 10A.2 user-simulator or a paraphrase model)
Noise injection OCR errors, ASR transcription errors Partially — character-level is deterministic

The eval pattern: run your whole suite on the original inputs, then re-run on perturbed inputs and compare pass rates. A system that goes from 90% to 60% under typos has a robustness problem that no amount of clean-data tuning will fix. Report robustness delta = pass_rate_clean − pass_rate_perturbed per perturbation type, per slice.

6.4 Safety evals — a preview#

Safety evaluation (does the system refuse what it should, resist jailbreaks, avoid leaking PII) is a whole discipline — Module 12 owns it. What you need here is the interface: safety checks are hard gates in your evalkit scorer set, not soft scores. A jailbreak that succeeds is a passed=False row, not a low score. The suites themselves — refusal coverage, injection resistance, PII leakage probes — are built the same way as everything in this module: dataset + task + scorer + report, with the leakage_scan above as the privacy primitive.

6.5 Consistency and reliability across runs#

LLM outputs are non-deterministic (02.5 Part 7, 10A.1, 1.2). self_consistency measures the flip side: given k runs of the same input, how often do they agree?

  • High consistency (near 1.0) is what you want for extraction, classification, structured output — tasks with a right answer.
  • Lower consistency is acceptable for open-ended generation if the quality stays high — but it means your pass-rate estimates need more runs (10A.8 covers how many).
  • Consistency per slice matters more than global: a system can be 95% consistent overall but 60% consistent on your hardest slice.

Pair this with pass^k from 10A.7, Part 5: consistency asks "do runs agree?", pass^k asks "do all k runs succeed?" — different questions, both needed.

6.6 Privacy leakage probes#

Two distinct leaks to probe:

  1. Training-data leakage — the model regurgitates memorised PII or canary strings from its training set. Probe: ask about the canary, check if it appears in output. (Limited effectiveness — models don't reliably reveal memorised content on demand; treat a clean probe as weak evidence, not proof.)
  2. Context leakage — the model echoes PII or secrets that were in your prompt/context (the user's own data, another tenant's data in a multi-tenant RAG). Probe: leakage_scan on outputs, canary tokens injected into the context, cross-tenant retrieval tests (06.6).

The leakage_scan function above is the primitive; run it on every eval output as a hard gate. A single canary hit should fail the build.

For agents that remember things across sessions, leakage needs a harder version of this probe: per-subject canaries, owner-aware scanning, zero-event bounds and leak-eligible denominators, all in 10A.11, Part 5.

6.7 Accessibility, readability, energy and cost#

  • Accessibility/readability: for user-facing text, add a readability scorer (Flesch-Kincaid grade level is computable in pure Python — syllable counting is the fiddly part) and a "reading level vs audience" check. For multimodal, accessibility means alt-text quality and caption accuracy (Module 09). This is a soft score with a threshold, not a hard gate — but track it per locale.
  • Energy/cost: cost-per-task is already a first-class metric (10A.3, Part 6). Energy per query is harder — providers don't expose it; estimate from token counts × published per-token energy figures if they exist, or track it as "compute cost" as a proxy. Don't quote energy numbers you can't source.
  • Latency under load: p50/p95/p99 from your runner's latency_ms, not a single run's timing.

Part 7: Reporting and communication#

7.1 Anatomy of an eval report#

An eval report is not a score dump — it's a decision document. The minimum viable report answers five questions: what was tested, how, what scored, what failed, and what do you recommend?

The numbers in this template are invented for illustration:

markdown
# Eval Report: support-triage v2 vs v1
Date: 2026-11-06 | Dataset: triage-v3 (n=150, test split) | Judge: rubric-2.1 (claude-haiku-5-5)

## Headline
v2 passes 87.3% [CI 81–92] vs v1 81.7% [CI 75–87]. Paired bootstrap p=0.03.
Recommendation: SHIP v2 — improvement is real but modest; watch the billing slice.

## Setup
- Model: gpt-6-luna (snapshot 2026-10-15), temperature default, 3 runs/example
- Dataset: evalkit/dataset.py v3, dev=100 / calibration=50 / test=150 (held out)
- Scorers: format (hard gate), label accuracy, rubric judge (soft, weight 0.4)
- Cost: $0.41/run, p95 latency 1.8s

## Results by slice (the three slices that moved most)
| slice | n | v1 | v2 | delta |
| billing | 30 | 73% | 90% | +17% |
| technical | 35 | 88% | 86% | -2% (noise) |
| edge cases | 20 | 55% | 70% | +15% |

## Failures (sample of 8)
- t114: v2 misclassifies refund+damaged-item combo as shipping (was billing in v1)
- t097: both versions hallucinate order IDs not in the ticket

## Non-functional gates
- Fairness: selection-rate diff 0.04 across name groups (within tolerance 0.10)
- Robustness: -6% pass rate under typos (v1: -11%)
- Privacy: 0 canary/PII leaks in 450 outputs (150 examples × 3 runs)
- Consistency: self-consistency 0.91 (v1: 0.87)

## Decision
Ship v2. Re-run on the billing slice after the next prompt tweak.

The template above is deliberately boring — the skill is filling it honestly, not formatting it beautifully. And it doesn't have to be filled by hand: evalkit/report.py renders it from a finished EvalReport. The design rule is the same one the template encodes — the report object supplies the measured half (headline numbers, slices, failure rows, latency percentiles), while the judgement half (dataset description, judge version, gates, recommendation) is passed in, because those are decisions recorded outside the run:

python
# evalkit/report.py — render an EvalReport as the Part 7.1 markdown template.
# Stdlib only; reads the EvalReport/Row/Score types from evalkit.core.

from __future__ import annotations

from datetime import date
from pathlib import Path
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from evalkit.core import EvalReport


def _pct(x: float) -> str:
    return f"{x:.1%}"


def _truncate(text: str, n: int = 160) -> str:
    text = " ".join(text.split())
    return text if len(text) <= n else text[: n - 1] + "…"


def _latency_stats(rows) -> str:
    lat = sorted(r.latency_ms for r in rows if r.latency_ms > 0)
    if not lat:
        return "n/a"
    p50 = lat[len(lat) // 2]
    p95 = lat[min(len(lat) - 1, int(len(lat) * 0.95))]
    return f"p50 {p50:.0f} ms, p95 {p95:.0f} ms"


def render_report(
    report: "EvalReport",
    *,
    title: str,
    dataset: str = "",
    judge: str = "",
    recommendation: str = "",
    gates: list[str] | None = None,
    max_failures: int = 8,
    report_date: str | None = None,
) -> str:
    """Render a finished EvalReport as the markdown eval report from 7.1.

    The EvalReport supplies the measured half — headline numbers, slices and
    failure rows. The judgement half — dataset description, judge version,
    non-functional gates and the ship/no-ship recommendation — is passed in,
    because those facts live outside the run (they're decisions, not
    measurements). Returns the markdown; write it with write_report().
    """
    lines = [
        f"# Eval Report: {title}",
        "Date: " + (report_date or date.today().isoformat())
        + (f" | Dataset: {dataset}" if dataset else "")
        + (f" | Judge: {judge}" if judge else ""),
        "",
        "## Headline",
        f"pass rate {_pct(report.pass_rate)} over {report.n_examples} "
        f"examples ({report.n_runs} scored rows); mean score "
        f"{report.mean_score:.3f}; errors {report.n_errors}.",
        "",
        "## Setup",
        f"- Eval: `{report.name}` — model: `{report.model}`",
        f"- Latency: {_latency_stats(report.rows)}",
        "> Cost per run is not part of EvalReport — read it from your "
        "call_model wrapper's token accounting (10A.3 Part 6).",
        "",
    ]

    slices = report.slice_breakdown()
    if slices:
        lines += [
            "## Results by slice",
            "",
            "| slice | value | n | pass rate |",
            "|---|---|---|---|",
        ]
        for axis, vals in slices.items():
            for value, agg in vals.items():
                lines.append(
                    f"| {axis} | {value} | {agg['examples']} "
                    f"| {_pct(agg['pass_rate'])} |"
                )
        lines.append("")

    failing = report.failing_examples()
    if failing:
        fail_rows = {}
        for r in report.rows:
            if not r.passed:
                fail_rows.setdefault(r.example_id, r)
        lines += [
            f"## Failures (sample of {min(len(failing), max_failures)} "
            f"of {len(failing)})",
            "",
        ]
        for eid in failing[:max_failures]:
            r = fail_rows.get(eid)
            if r is None:
                continue
            failed = "; ".join(
                f"{n}: {s.detail or f'score {s.value:.2f}'}"
                for n, s in r.scores.items()
                if not s.passed
            )
            lines.append(
                f"- `{eid}`: {failed or 'below threshold'} — "
                f"output: {_truncate(r.output)}"
            )
        lines.append("")

    lines += ["## Non-functional gates", ""]
    if gates:
        lines += [f"- {g}" for g in gates]
    else:
        lines.append("- (none recorded — pass them via `gates=[...]`)")
    lines += [
        "",
        "## Decision",
        "",
        recommendation or "_No recommendation recorded._",
        "",
    ]
    return "\n".join(lines)


def write_report(report: "EvalReport", path: str | Path, **kwargs) -> Path:
    """render_report() straight to a file; returns the path written."""
    path = Path(path)
    path.write_text(render_report(report, **kwargs), encoding="utf-8")
    return path

A minimal driver — a fixture run_eval (the same triage task, with one planted failure) rendered straight to markdown:

python
# demo_report.py — run_eval on fixtures -> render_report. Stdlib only.
import json
from evalkit.core import Example, Score, run_eval
from evalkit.nonfunctional import leakage_scan
from evalkit.report import render_report

EXAMPLES = [
    Example(id="t01", input="charged twice for order #A-1042",
            reference='{"category": "billing", "priority": "P1"}',
            metadata={"queue": "billing"}),
    Example(id="t02", input="the app crashes uploading a PDF",
            reference='{"category": "technical", "priority": "P2"}',
            metadata={"queue": "technical"}),
    Example(id="t03", input="where is my refund for order #B-77",
            reference='{"category": "billing", "priority": "P3"}',
            metadata={"queue": "billing"}),
    Example(id="t04", input="charged twice and the item arrived damaged",
            reference='{"category": "billing", "priority": "P1"}',
            metadata={"queue": "edge"}),
]


def triage_task(ex):
    return (f"TICKET: {ex.input}\n"
            'Reply with JSON {"category": ..., "priority": ...} only.')


def fake_model(prompt: str) -> str:
    """Deterministic stand-in: right everywhere except the damaged-item
    combo case, which it misroutes to shipping — the planted failure."""
    if "damaged" in prompt:
        return '{"category": "shipping", "priority": "P2"}'
    if "crashes" in prompt or "PDF" in prompt:
        return '{"category": "technical", "priority": "P2"}'
    if "refund" in prompt and "charged twice" not in prompt:
        return '{"category": "billing", "priority": "P3"}'
    return '{"category": "billing", "priority": "P1"}'


class JsonExact:
    name = "json_exact"

    def score(self, example, output):
        try:
            ok = json.loads(output) == json.loads(example.reference)
        except Exception:
            ok = False
        return Score(name=self.name, value=1.0 if ok else 0.0, passed=ok,
                     detail="" if ok else f"got {output}")


report = run_eval(EXAMPLES, task=triage_task, call_model=fake_model,
                  scorers=[JsonExact()], name="triage-v1",
                  model="fake-triage-1", repeats=2)

# Run the privacy probe for real (6.2) instead of asserting that it passed.
leaks = [f for f in leakage_scan([r.output for r in report.rows]) if not f["clean"]]

md = render_report(
    report,
    title="support-triage v1 (fixture run)",
    dataset="triage-dev fixture (n=4)",
    judge="none — deterministic scorer only",
    gates=[
        "format validity = 100% (json_exact is the only scorer)",
        f"privacy: leakage_scan flagged {len(leaks)} of {len(report.rows)} outputs",
    ],
    recommendation="HOLD — the edge slice fails on the damaged-item "
                   "combo; fix before sign-off.",
    report_date="2026-11-06",
)
print(md)
Output · real, from running the code above — latencies vary run to run31 lines
# Eval Report: support-triage v1 (fixture run)
Date: 2026-11-06 | Dataset: triage-dev fixture (n=4) | Judge: none — deterministic scorer only

## Headline
pass rate 75.0% over 4 examples (8 scored rows); mean score 0.750; errors 0.

## Setup
- Eval: `triage-v1` — model: `fake-triage-1`
- Latency: p50 0 ms, p95 0 ms
> Cost per run is not part of EvalReport — read it from your call_model wrapper's token accounting (10A.3 Part 6).

## Results by slice

| slice | value | n | pass rate |
|---|---|---|---|
| queue | billing | 2 | 100.0% |
| queue | edge | 1 | 0.0% |
| queue | technical | 1 | 100.0% |

## Failures (sample of 1 of 1)

- `t04`: json_exact: got {"category": "shipping", "priority": "P2"} — output: {"category": "shipping", "priority": "P2"}

## Non-functional gates

- format validity = 100% (json_exact is the only scorer)
- privacy: leakage_scan flagged 0 of 8 outputs

## Decision

HOLD — the edge slice fails on the damaged-item combo; fix before sign-off.

Two things the generator refuses to fake: cost (EvalReport doesn't track tokens — the report says so rather than printing a made-up number) and the recommendation (it's an argument because it's a decision, not a measurement). Everything else — pass rates, slices, failure examples with the failing scorer's detail — is computed from the rows, so the markdown can't drift from the data.

7.2 Dashboards and experiment tracking#

For recurring evals, the report becomes a time series: every run appends a row to your experiment tracker (10A.8 covers compare.py and the runner; Module 11A covers the platforms). What to log per run — dataset version, git SHA, prompt hash, model ID/version/params, scorer versions, judge version, per-example outputs, cost, latency — was specified in 10A.8. The dashboard question is "can I see the trend and the diff?" — a JSONL file + a notebook does this for a solo engineer; a platform earns its cost when five people need to see it without asking you.

7.3 Model cards and system cards#

When you release a model or a system built on one, the model card / system card (glossary) is the public-facing eval report: intended use, capabilities, eval methodology, known limitations, safety results. Module 12 owns the safety-content requirements; what evals contribute is the evidence: which benchmarks you ran, on what data, with what scores and CIs, and which you deliberately didn't rely on. A system card that says "we evaluated on our own 500-case suite, not public benchmarks, because our task differs" is more credible than one that quotes MMLU.

7.4 Communicating uncertainty to stakeholders#

Non-technical readers will ask "is it good?" — your job is to give them a decision, not a number. The translation table:

What you measured What you say
Pass rate 87% ±5% "About 9 in 10 cases handled correctly, give or take 1 in 20"
Slice regression -8% on billing "Billing questions got worse — that's 1 in 4 billing tickets failing now"
Judge agreement κ=0.72 "Our automated grader agrees with human experts about 3 times out of 4 — treat scores as estimates"
p=0.03 paired test "The improvement is unlikely to be luck (roughly 3% chance it is)"
Cost $0.41/run "Each full eval costs about 40 cents; we run it on every PR"

7.5 Launch criteria and sign-off#

A launch review needs a pre-registered decision rule — written before the eval runs, not after:

markdown
## Launch criteria: support-triage v2
- HARD GATES (must all pass): format validity ≥99%, privacy leaks = 0,
  worst-slice pass rate ≥70%, cost ≤$0.001/conversation
- SOFT TARGETS (report, don't gate): overall pass ≥85%, billing slice ≥80%
- SIGN-OFF: eval owner + product owner + on-call engineer

The criteria live in the repo next to the eval config (10A.8 shows the CI gate mechanics). Changing them after seeing results is the eval equivalent of moving the goalposts — allowed, but document it as a decision, not a tweak.


Part 8: Building an eval culture#

Deep-dive

8.1 What "eval culture" actually means#

An eval culture is not "we run evals" — it's the set of habits that make evals trusted, current and acted on. The symptoms of its absence are universal: evals exist but nobody trusts them, datasets rotting in a shared drive, a "prompt change" that silently regresses quality for a month, and a launch decision made on vibes because "the eval takes too long".

The five pillars:

  1. Ownership — every eval suite has a named owner responsible for its dataset, thresholds and freshness.
  2. Eval-first development — new features ship with their eval cases in the same PR, not after.
  3. Shared datasets — the golden set is a team asset in git, not one engineer's notebook.
  4. Review rituals — scheduled time to look at failures, not just scores.
  5. Budgeting — eval compute and human labelling are line items, not surprises.

8.2 Ownership and rituals#

  • "Look at traces Friday": a recurring 30-minute session where the team reads 10–20 real failures together — no scores, just outputs. This is the single highest-leverage ritual; it builds the shared intuition that metrics can't. Rotate who picks the traces.
  • Eval owner per suite: one name on each dataset directory in CODEOWNERS. The owner triages new failure reports into cases (10A.2, 7.2), retires saturated ones, and re-validates judges when they change.
  • Who writes tasks, who owns the harness. Anthropic's guidance on agent evals suggests that product managers, customer-success and sales staff are well placed to contribute tasks (they hear the failures first), while a small dedicated group owns the shared infrastructure. In evalkit terms: anyone can open a PR adding a case with provenance; the suite owner reviews it.
  • New-hire onboarding: first task is to run the eval suite and read 20 failures — faster than any doc at teaching what "good" means here.

8.3 Shared datasets and the flywheel#

The dataset is the team's institutional memory. The flywheel (10A.2, Part 7, 10A.9, Part 6): production failures → triage → labelled cases → regression suite → CI gate. The cultural requirements: datasets live in git with versioning, changes go through PR review (a dataset edit is a behaviour change), and every case carries provenance (where it came from, who labelled it, when).

8.4 Budgeting for evals#

Evals cost money in three currencies: model API calls (judge runs can exceed the system-under-test's cost — 10A.4, Part 7), human labelling (the scarcest and most expensive), and engineer time (maintaining datasets and investigating failures). There is no reliable industry ratio to copy, so build the budget bottom-up from your own numbers: (cases × repeats × calls per case × price per call) for each tier of 10A.8's suite, times how often each tier runs per month, plus judge calls (often the largest line), plus the labelling hours for the calibration set and low-confidence samples (10A.5, 8.4), plus the engineer time to triage failures. Then compare the total with the cost of one avoided incident. Track cost-per-eval-run as a metric itself — a suite that costs $50 a run gets run less often.

8.5 Incentives and the speed–rigour dial#

Two forces decide whether an eval culture survives contact with a shipping deadline: what you reward, and how much rigour you can afford on a given change.

Incentives. Whatever the eval dashboard measures, people will optimise — that's Goodhart's law applied to your own team. The failure mode is tying eval scores to individual performance reviews: engineers learn to tune prompts until the dev set is green, to quietly retire inconvenient cases, and to report "the eval passed" when it barely did. The fix is to reward the behaviours that produce trustworthy numbers, not the numbers themselves:

  • Credit for finding failures — a production bug caught by the suite before release, a new failure-derived case added to the dataset (10A.2, Part 7), a judge recalibration that caught drift.
  • Credit for honest reporting — the engineer who writes "slice X regressed, here's why" in the eval report is doing the job; the one who rounds 87% up to "about 90%, fine" is not.
  • Never make an individual's bonus depend on a suite's pass rate. Eval scores are system metrics — they measure the product, the dataset and the process jointly. An individual can't be fairly scored on a number five other people also move.

The speed–rigour dial. "Run the full eval suite on every change" and "ship fast" are both correct answers to different questions. The resolution is tiering by risk, the same machinery 10A.8 built:

Change type Suite depth Why
Typo fix, refactor covered by unit tests, dependency bump Smoke suite (~20 cases) The blast radius is small; a full run buys little signal
Prompt wording tweak, few-shot example change Full golden set Small input change, potentially large output change
Model version swap, provider migration Full set + non-functional gates + extended nightly New model = new everything: slices, cost, latency, fairness
Retrieval/index/config change RAG suite + regression set Retrieval regressions hide in aggregate scores (10A.6)
Pre-release / launch candidate Exhaustive: full set, extended cases, human spot-check This is the last cheap moment to find failures

Two rules keep the dial honest. First, the tier is chosen before the run, not after — deciding "this change is low-risk" because the full suite is slow is how regressions ship. Second, anything below the launch-criteria bar is a documented risk acceptance, not a shortcut — it goes in the eval report's decision section with a name attached. Speed and rigour aren't opposites; rigour is the speed you can afford to skip safely.

8.6 Anti-patterns#

Anti-pattern What it looks like The fix
Metric worship Optimising the score until it hits 99%, ignoring that the metric drifted from the goal Re-read the metric's definition quarterly; keep a "does this still measure what we care about?" item in reviews
Eval theatre Running evals nobody reads; green dashboards nobody acts on Every eval must end in a decision or an alert — 10A.9, 3.7
Unmaintained datasets Golden set frozen at launch while the product evolves Retire saturated cases, add failure-derived cases, version datasets (10A.2, 6.3)
Judge drift blindness Judge model silently upgraded; scores shift; nobody notices Pin judge versions, run the judge test set on change (10A.5, Part 6)
Single-number reporting "The eval passed" with no slices, CIs or failures The report template in 7.1 exists precisely to prevent this
Teaching to the test Prompt tuned until the dev set is green, held-out set ignored Dev/test split discipline (10A.2, 6.1)

8.7 The maturity model (levels 0–4)#

Level Name What it looks like
0 — Vibes No evals "It seems to work"; regressions discovered by users
1 — Ad-hoc Manual checks Someone reads outputs before launch; no dataset, no repeatability
2 — Dataset First golden set 30–100 labelled cases, run manually before releases; scores tracked in a spreadsheet
3 — Automated CI-gated suite Evalkit/promptfoo in CI; judges calibrated; per-slice reporting; cost tracked
4 — Closed loop Self-improving Production failures feed the dataset automatically; online signals aligned with offline metrics; evals reviewed like code

Most teams are at 1–2. The jump to 3 is mechanical (you've built the pieces); the jump to 4 is cultural (the flywheel + rituals + ownership). This module took you to 3; Part 8 is how you stay there and reach 4.

8.8 A 90-day roadmap#

Weeks Action Owner
1–2 Inventory: what evals exist, where, who owns them; pick one pilot suite Eng lead
3–4 Pilot: run the pilot suite in CI on the pilot service; write the report template Pilot owner
5–8 Expand: second suite; first human-calibration session for the judge; first "look at traces" ritual Team
9–12 Institutionalise: dataset PR review in CODEOWNERS, eval cost dashboard, launch criteria template, retrospective on what worked Eng lead

The roadmap is deliberately small — a culture that starts with one suite and one ritual beats one that tries to instrument everything at once.


Module wrap-up: the one-page evaluation checklist#

This is the wrap-up of the core path (10A.1 to 10A.10). If your system is an agent with memory, long conversations, several cooperating agents or simulated users, 10A.11 and 10A.12 add the checks below the checklist.

Before any LLM feature ships, the checklist:

  • Dataset: labelled cases exist, versioned, split dev/calibration/test, provenance recorded (10A.2)
  • Metrics: deterministic graders where possible; judges calibrated against human labels (κ, TPR/TNR reported) (10A.3, 10A.4, 10A.5)
  • Task-specific evals: RAG metrics if retrieval (10A.6); trajectory + pass^k if agents (10A.7); multimodal metrics if applicable (09.10)
  • CI gate: suite runs on prompt/model/data changes; thresholds pre-registered; flaky policy defined (10A.8)
  • Agent extras (if they apply): memory write, read and leakage probes and compaction fidelity (10A.11); handoff, attribution, overhead and single-agent-baseline checks, and a validated user simulator (10A.12)
  • Online loop: production signals sampled, drift monitored, failures routed back to dataset (10A.9)
  • Non-functional gates: fairness disparity within tolerance, robustness delta acceptable, zero privacy leaks, safety suite green (Module 12)
  • Report: decision document with setup, metrics+CI, slices, failures, cost, recommendation (7.1)
  • Culture: named owner, review ritual scheduled, dataset in git, eval cost tracked (Part 8)

Where next: for agent depth, 10A.11 and 10A.12; then Modules 11A to 11C take the observability, tracing, cost-optimization and deployment machinery this module's evals feed into; Module 12 — Safety & Security owns the deep safety evaluation previewed in 6.4; Modules 13A and 13B is where evals meet UX and product judgement.


Appendix A: the evalkit package#

The consolidated package this module built, file by file. To be precise about what this appendix is: the map and the public API surface, not a second copy of the code. Each file's full listing lives in the lesson that introduced it — duplicating ~10k lines here would just create a second source of truth that drifts. The two files this lesson introduces are printed in full above (6.2 for nonfunctional.py, 7.1 for report.py); the rest are one link away. The three files from 10A.11 and 10A.12 are the agent-depth extensions: they come after the core path and import the earlier files flat.

One layout note: the canonical shape is a project directory containing the evalkit/ package — every file in the tree below lives inside evalkit/, beside __init__.py. The project directory's own name is irrelevant (the lessons standardise on evalkit); only the package name matters. Demo and script files that import siblings flat (from agent_eval import ..., from rag_eval import ...) still work, because Python puts the running script's own directory on sys.path — run them from inside the package directory or by path (python3 evalkit/agent_eval_demo.py).

File Lesson Where the full listing lives
core.py 10A.1 Part 6 — evalkit/core.py listing (Example, Score, Scorer, FunctionScorer, Row, EvalReport, run_eval)
dataset.py 10A.2 8.2 — evalkit/dataset.py listing
scorers.py 10A.3 Sections 1–11 assembled in order, consolidated in Part 8
judges.py 10A.4 Part 9 — evalkit/judges.py listing
judge_validation.py 10A.5 Built up across Parts 3–5 (header → metrics → correction → rubric iteration)
rag_eval.py 10A.6 5.2 under Part 5
agent_eval.py 10A.7 2.4 — the harness, in full
mm_metrics.py 10A.7 9.10
trace_adapter.py 10A.7 10.4 — recorded spans to Trajectory
runner.py 10A.8 4.2 — the engine
compare.py 10A.8 4.1 — the statistics
cluster.py 10A.8 2.7 — paired cluster bootstrap for grouped cases
cli.py 10A.8 6.1 — python -m evalkit.cli run / gate / compare for CI
online.py 10A.9 Part 7 — the sampler
nonfunctional.py 10A.10 6.2 — full listing, this lesson
report.py 10A.10 7.1 — full listing, this lesson
memory_eval.py 10A.11 8.1 — fixtures, the MemorySystem seam, write/read/leak/compaction scorers, the scenario runner
mas_eval.py 10A.12 Five sections, assembled in order per 9.3: 2.4, 3.9, 4.9, 5.7, 6.8
sim_validation.py 10A.12 Three sections: 7.10 and 7.15
text
evalkit/
├── __init__.py            # re-exports (below)
├── core.py                # 10A.1 — Example, Score, Scorer, FunctionScorer, Row,
│                          #         EvalReport, run_eval
├── dataset.py             # 10A.2 — EvalExample, EvalDataset, DatasetCard, loaders,
│                          #         splits, dedupe, agreement stats (kappa, alpha)
├── scorers.py             # 10A.3 — deterministic graders: matching, numeric/date/
│                          #         quantity, set/JSON, schema, classification,
│                          #         text-overlap, structural, operational metrics
├── judges.py              # 10A.4 — Rubric, JudgeResult, PairwiseResult,
│                          #         rubric_judge, pairwise_judge, jury_judge,
│                          #         critique_then_score, win_rates, elo_update,
│                          #         bradley_terry, FakeCallModel, memoize
│                          #         (provider call_model adapters are 10A.4 5.3 snippets)
├── judge_validation.py    # 10A.5 — Judgement, agreement metrics (kappa, alpha,
│                          #         Spearman, Kendall), TPR/TNR, bias correction,
│                          #         bootstrap CIs, disagreement reports
├── rag_eval.py            # 10A.6 — RagCase, StageRun, RAGPipeline protocol,
│                          #         Judge protocol, LLMJudge, run_rag_eval,
│                          #         aggregate, bound_analysis, compare_runs
├── agent_eval.py          # 10A.7 — World, AgentFn, Grader, task runner,
│                          #         trajectory metrics, pass^k (simulated users
│                          #         are prose: wrap one in an AgentFn)
├── mm_metrics.py          # 10A.7 — transcript WER/CER, diarisation error,
│                          #         interval IoU, count and presence checks
├── trace_adapter.py       # 10A.7 — spans -> Trajectory, grade_recorded, SnapshotWorld
├── runner.py              # 10A.8 — parallel runner, record/replay cache,
│                          #         result store, budget caps
├── compare.py             # 10A.8 — paired bootstrap/permutation tests,
│                          #         gate evaluation, non-regression checks
├── cluster.py             # 10A.8 — paired_cluster_bootstrap_ci for grouped cases
├── cli.py                 # 10A.8 — run / gate / compare subcommands over runner + compare
├── online.py              # 10A.9 — Trace, TraceJudge protocol, stratified sampler,
│                          #         score distributions, PSI drift, FakeJudge
├── nonfunctional.py       # 10A.10 — counterfactual_disparity, perturbation_suite,
│                          #         self_consistency, leakage_scan (Part 6)
├── report.py              # 10A.10 — render_report, write_report (Part 7.1)
├── memory_eval.py         # 10A.11 — GoldFact, GoldOp, Session, Probe, Scenario, MemorySystem
│                          #         seam, kv_matcher, score_writes, grade_probe, score_reads,
│                          #         attribute, make_canary, leak_report, zero_event_upper_bound,
│                          #         run_compaction_eval, run_memory_suite, slice_reads, FakeClock
├── mas_eval.py            # 10A.12 — AgentSpan, MASTrace, trace_from_events/_spans, routing_confusion,
│                          #         context_transfer, schema_valid, pingpong, cycles,
│                          #         repeated_delegations, return_path, counterfactual_attribution,
│                          #         fix_necessity_check, ablation_credit, shapley_credit,
│                          #         judge_attribution, overhead, compare_systems, pareto_front
└── sim_validation.py      # 10A.12 — Conversation, realism_report, discriminability, goal_fidelity,
                           #         leakage_rate, termination_report, predictive_validity,
                           #         simulator_panel, validity_card

The companion files (demos, tests and scripts that are not part of the nineteen)#

The nineteen files above are the importable package. Each lesson also prints demo, test and helper files that exercise it. They are not package modules and are not re-exported; they live at the project root, in tests/, or beside the package files, as each lesson says.

File Lesson What it is
triage_eval.py 10A.1 6.2 — the first eval run; imports FunctionScorer from evalkit.core
demo.py 10A.2 8.3 — dataset.py end to end
tests/test_scorers.py, tests/test_properties.py, grade_triage.py, demo_scorers.py 10A.3 7.1, 8.1, 8.2 and 8.6
demo_judges.py 10A.4 9.5
demo_rag_eval.py, docsqa_adapter.py 10A.6 5.3 and 5.4
agent_eval_demo.py, grader_selftest.py, trace_demo.py, live_agent.py 10A.7 2.5, 5.5, 10.4 and 10.2 (live_agent.py is illustrative and needs keys)
tests/conftest.py, tests/fake_model.py, tests/test_eval_smoke.py 10A.8 5.1 — the pytest smoke suite and its keyword-router fake model
alignment.py, feedback_bias.py, ppi_demo.py, ab_sample_size.py, bandit.py, srm_check.py, drift_stats.py 10A.9 stand-alone stdlib scripts; run each with python3 <file>
demo_nf.py, demo_report.py 10A.10 6.2 and 7.1
memory_eval_demo.py, memory_selftest.py, memory_stats_demo.py, compaction_demo.py, clock_trap_demo.py, procedural_eval.py, memory_store_adapter.py, test_memory_gates.py 10A.11 8.2, 8.4, 5.6, 6.9, 7.3, 4.9, 8.5 and 8.6; memory_store_adapter.py needs a model for live use, and the clock demo needs 08B.2's memory_store.py
mas_eval_demo.py, sim_validation_demo.py, live_system_fn.py 10A.12 2.5 (sections assembled per 9.3), 7.16 and the illustrative live_system_fn.py in 4.4 (needs your orchestrator and keys)

The dependency rule#

Every file is standard-library only except dataset.py, which is the package's one third-party dependency: Pydantic (uv add pydantic, as 10A.2's Setup specifies). Most files import nothing else from the package; where one does, the dependency points one way: report.py reads core.py's EvalReport, trace_adapter.py builds on agent_eval.py, cli.py and the cluster.py demo build on runner.py and compare.py, and scorers.py converts its verdicts to core.Score at the boundary. The agent-depth files follow the same one-way rule and import their siblings flat: memory_eval.py imports percentile and wilson_interval from agent_eval.py (its demos also use compare.py and cluster.py, and clock_trap_demo.py and memory_store_adapter.py need 08B.2's memory_store.py and extract_memories.py); mas_eval.py and sim_validation.py import agent_eval, compare and judge_validation. Nothing depends upward. call_model/judge/produce seams are injectable callables throughout, so the whole package runs with fakes and no API keys — which is why the demo outputs in this module are real, not illustrative, except where a lesson labels one otherwise (for example a live-model adapter).

evalkit/__init__.py#

python
# evalkit/__init__.py — the package surface (lesson 10A.10)
"""evalkit: the module's shared evaluation package.

Import what you need from the submodule that owns it; the names below are
re-exported for convenience. Full listings live in each lesson.
"""
from evalkit.core import (
    Example, Score, Scorer, FunctionScorer, Row, EvalReport, run_eval,
)
from evalkit.dataset import EvalExample, EvalDataset, DatasetCard, load_dataset
from evalkit.scorers import Score as DeterministicScore  # see 10A.3 note below
from evalkit.judges import Rubric, JudgeResult, PairwiseResult
from evalkit.judge_validation import Judgement, cohens_kappa, tpr_tnr
from evalkit.nonfunctional import (
    counterfactual_disparity, perturbation_suite,
    self_consistency, leakage_scan,
)
from evalkit.report import render_report, write_report

__all__ = [
    "Example", "Score", "Scorer", "FunctionScorer", "Row", "EvalReport",
    "run_eval",
    "EvalExample", "EvalDataset", "DatasetCard", "load_dataset",
    "DeterministicScore", "Rubric", "JudgeResult", "PairwiseResult",
    "Judgement", "cohens_kappa", "tpr_tnr",
    "counterfactual_disparity", "perturbation_suite",
    "self_consistency", "leakage_scan",
    "render_report", "write_report",
]

What this means for you#

You now own the whole stack: the evalkit kit, CI gates, the online loop, non-functional probes, reports and the culture that keeps them alive. Platforms are windows over your open formats — adopt them for UI and workflow, never as the canonical store. Benchmarks shortlist; your suite decides. And the appendix above is the map — the lessons are the source of truth.


Common misconceptions#

Misconception Reality
"We need to buy an eval platform before we can eval anything." A platform adds UI and collaboration, not measurement. evalkit + JSONL + git already does the measuring; buy the platform when five people need to see results without asking you.
"A leaderboard score tells us which model to use." It tells you about their data under their harness. Use benchmarks to shortlist 3–5 candidates, then run your own eval set — always.
"promptfoo/deepeval/Inspect AI are interchangeable — pick whichever." They share concepts (dataset/task/scorer) but differ on where definitions live: promptfoo's rubrics are theirs, Inspect's built-in graders are Inspect's (only custom scorers are yours), evalkit's are all yours. A score means different things across tools.
"The OpenAI Evals shutdown means OpenAI can't eval models anymore." It means the hosted dashboard is gone (30 Nov 2026). The openai/evals GitHub framework continues, and third-party tools (promptfoo is OpenAI's recommended replacement) cover the use case. OpenAI's Datasets feature went in the same shutdown (2.5).
"A high benchmark score means the model is production-ready." Benchmarks measure narrow, fixed tasks. Production readiness needs your dataset, your slices, your non-functional gates and your online loop — none of which a leaderboard covers.
"Fairness is a property of the model, not the system." It's a property of model + prompt + context + post-processing. A "fair" base model can produce biased outputs through your retrieval or your prompt's examples. Measure the system.
"An eval that passes means we can ship." An eval that passes means the cases you wrote pass. The launch decision also needs non-functional gates, a report with CIs, and a named human sign-off.
"Once the eval suite is green, the work is done." Evals decay: datasets drift, judges drift, models update silently. The culture in Part 8 — ownership, rituals, flywheel — is what keeps green meaning something.

Key takeaways#

  • Three layers, not one: the eval kit (your code), the eval platform (UI/collaboration you may buy), and observability (Module 11A). Platforms sell visibility, not measurement.
  • The landscape (Nov 2026): promptfoo (MIT, OpenAI-owned), Inspect AI (MIT, UK AISI), DeepEval (Apache-2.0), Ragas/TruLens/Giskard (metrics libraries), lm-eval/HELM/Lighteval (academic harnesses), LangSmith/Langfuse/Phoenix/MLflow/Weave/Opik (platforms with evals), provider-native features (OpenAI Evals and Datasets — shut down 30 Nov 2026; Vertex AI evaluation; Anthropic docs + claude plugin eval; OpenRouter Ori Eval).
  • Read the meter before you buy. Hosted platforms charge for different units (Langfuse units, LangSmith seats plus traces, Braintrust data and scores, Opik and Arize spans, Confident AI GB-months of traces); count your own units, and remember that retention, not just price, decides how much history you keep (2.2b).
  • Build vs buy resolves to "who owns the definitions": keep datasets, prompts, rubrics and results in open formats in git; treat platforms as windows, not stores.
  • The same eval in three tools showed the concept map: Example↔vars↔dataset row, Scorer↔assert↔scorer function — and that judge prompts don't transfer between tools.
  • Benchmarks are for shortlisting only; read them through eight distortions (contamination, saturation, prompt sensitivity, self-reporting, missing cost/latency, no CIs, gaming, narrow coverage).
  • Non-functional qualities are gates, not scores: counterfactual fairness tests, perturbation robustness, safety (Module 12), repeat-run consistency, privacy leakage probes, accessibility/cost — all in evalkit/nonfunctional.py.
  • Reports are decision documents: setup + metrics with CIs + slices + failures + cost + a recommendation, with pre-registered launch criteria.
  • Culture is the fifth pillar: ownership, eval-first development, shared datasets, review rituals and budgeting — plus a maturity model (0–vibes to 4-closed-loop) and a 90-day roadmap.
  • The evalkit package is the module's consolidated artifact — every file stdlib-only except dataset.py (Pydantic), every model call injectable, every demo output real.

Terms introduced in this lesson#

Term One-line definition
Eval platform A product layer around evals: dataset UI, run comparison, annotation queues, CI hooks — visibility and collaboration, not measurement
Eval kit The code layer: datasets, scorers, judges, runner, reports — evalkit is this path's kit
Build vs buy The decision of owning eval definitions in code versus adopting a platform's metrics and storage
Lock-in The cost of letting a platform be the source of truth for your datasets, prompts and results
CLI eval harness A tool that runs dataset×provider matrices from config (promptfoo, Inspect AI)
Solver (Inspect AI) An async function that transforms a sample's TaskState (adds a system message, calls generate(), runs an agent); a chain of solvers produces each sample's output. It corresponds to evalkit's task callable plus the model call, not to Inspect's Task
Provider eval tool An eval feature built into a model vendor's console or API (OpenAI Evals, the Claude Console Evaluate tab); both were retired in 2026, so keep your data and graders in files you own
Grader (OpenAI Evals) OpenAI's name for a scoring rule in an eval: a string check, text similarity, an LLM label or score model, a Python function, or a combination
Benchmark A fixed dataset + fixed grading procedure for comparing systems
Benchmark contamination Benchmark items leaking into training data, inflating scores
Saturation When top models cluster near the max score and the benchmark stops discriminating
Benchmark gaming Optimising for the benchmark rather than the underlying capability
Counterfactual test Changing only a protected attribute in an input to detect disparate treatment
Selection-rate difference The gap between groups in how often a threshold is crossed
Mean score gap The difference in average quality score between demographic groups
Counterfactual flip rate Fraction of cases where swapping the attribute changes the outcome
Perturbation suite A battery of input corruptions (typos, unicode noise, whitespace) for robustness testing
Robustness delta Pass-rate drop from clean to perturbed inputs
Self-consistency Mean pairwise agreement across repeated runs of the same input
Leakage probe A test for canary strings or PII appearing in outputs
Canary string An injected marker token; its appearance in output proves a leak
Eval report A decision document: setup, metrics with CIs, slices, failures, cost, recommendation
Pre-registered launch criteria Decision rules written before the eval runs, not after
Eval culture The habits — ownership, rituals, shared datasets, budgeting — that keep evals trusted and current
Eval maturity model A 0–4 scale from "vibes" to "closed loop" for assessing a team's eval practice
Metric opacity When a platform's metric definition is hidden, making its scores unauditable
Billing meter The unit a platform charges for (traces, spans, units, GB processed, seats); two platforms with similar list prices can cost very different amounts for the same traffic
Ori Eval OpenRouter's agent-driven eval product (*.eval.ts files, pinned harness+model per run)
Human-eval service A vendor selling expert-labelled data and human grading at scale (Scale, Surge)

All terms are also collected in the glossary.


Exercises#

  1. Landscape audit. List every eval tool your team currently uses (or would consider). For each, fill in: licence, who owns the metric definitions, where the data lives, and the exit cost. Which ones are "windows" and which are "stores"?
  2. Three-tools mapping. Take one of your real eval cases and write it as (a) an evalkit Example, (b) a promptfoo tests[] entry, (c) an Inspect AI dataset row. Which fields have no equivalent in each tool?
  3. Benchmark reading. Pick a model card or leaderboard entry. Identify which of the eight distortions in 5.3 are present, and write a one-paragraph "how much should we trust this number" assessment.
  4. Fairness probe. Extend counterfactual_disparity in nonfunctional.py to test a second attribute (e.g., formality of address: "Hi" vs "Dear"). What changes in the case schema?
  5. Robustness delta. Run perturbation_suite on your evalkit dataset's inputs, then compute the pass-rate delta per perturbation type using run_eval with a fake model. At what delta would you block a release?
  6. Leakage gate. Wire leakage_scan into your eval runner as a hard gate: any clean=False row fails the run. Write the three-line integration.
  7. Report writing. Take your last eval run and rewrite it as the 7.1 template. What information is missing? What's the decision recommendation?
  8. Culture assessment. Score your team on the maturity model (8.7). What's the single highest-leverage step to the next level?
  9. 90-day plan. Draft the 90-day roadmap (8.8) for your actual team: name the pilot suite, the owner, and the first ritual.
  10. Report generator. Run demo_report.py from 7.1, then change recommendation to "SHIP" and re-render. Which sections change and which stay identical? Why is that the right behaviour for a decision document?
  11. Meter your own traffic. Estimate the runs per month and spans per run of a system you know. Using the meters in 2.2b, compute what two platforms would charge (re-check the pricing pages first), and note which one's meter you would hit first.

Check yourself#

  1. What are the three layers of the eval stack, and which one do platforms actually sell?
  2. Why is "who owns the metric definitions" the real build-vs-buy question?
  3. Name three tools in each landscape category (harness, framework, platform, academic, provider-native).
  4. What happened to OpenAI's hosted Evals platform, and what's the recommended migration path?
  5. In the three-tools comparison, which concept has no clean equivalent across all three?
  6. Why shouldn't a benchmark score gate a launch decision?
  7. Name four of the eight leaderboard distortions and one way to check each.
  8. What's the difference between disparate treatment and disparate impact in fairness evals?
  9. Why are non-functional qualities gates rather than soft scores?
  10. What does self_consistency measure, and how does it differ from pass^k?
  11. What's the difference between training-data leakage and context leakage probes?
  12. What five questions must an eval report answer?
  13. What's the difference between pre-registered launch criteria and post-hoc thresholds?
  14. Name the five pillars of eval culture and the maturity model's level names.
  15. Why keep datasets in git even if you use a platform's dataset UI?
  16. Why can two platforms with similar list prices produce very different bills for the same agent traffic?

Further resources#


← 10A.9: Offline vs Online Evaluation | Module 10A overview | 10A.11: Evaluating Agent Memory and Context Management →

Esc
02.2Tokens and TokenizationHow LLMs Work · 21k wordsLesson
02.3EmbeddingsHow LLMs Work · 18k wordsLesson
07Retrieval-Augmented Generation (RAG)11 lessons · Everyone who will build LLM features that must answer from knowledge the model doesn't have in its weights: internal handbooks and help centres, contracts, ticket histories, product docs, or any corpus that changes faster than a training run. The module covers the full RAG stack — architecture, retrieval strategy, query understanding, grounded generation, citations, conversation, managed services, advanced patterns, evaluation, debugging and production operation — and shows where each major provider's managed retrieval and citation features fit (OpenAI, Anthropic, Google Gemini and OpenRouter). All code is Python.Overview
08E.1The Model Context Protocol (MCP)Protocols and Extensibility · 12k wordsLesson
↑ ↓ navigate↵ openesc close