10B.1 The Eval Framework Track: DeepEval, Inspect AI and Your Setup

ProductionLesson 1 of 1823,630 words12 parts
Module 10B · 0 of 7 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
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18

Lessons 10A.1 to 10A.12 taught evaluation from the ground up: you built evalkit, a small harness whose every definition you can read and defend, and you used it on tickets, RAG answers, agents, memory and multi-agent systems. Real teams rarely stay there. Sooner or later someone says "can't we just use DeepEval?" or "the AI Security Institute's tool does that", and the honest answer needs more than a feature list. This lesson opens the framework track, eighteen lessons from here to 10B.18, which teach the two Python packages most teams adopt, DeepEval (from Confident AI) and Inspect AI (from the UK AI Security Institute and Meridian Labs), deeply enough that you can run them, extend them, debug them and defend the numbers they print. Before the depth comes the map: why you would adopt a framework after building your own harness, what each package is and who stands behind it, what installing each one puts on your machine, how its vocabulary maps onto evalkit's, how to set up one project for the whole track, how to run both with no API key at all, and a decision table for choosing. You will also run the ticket-triage eval from 10A.1 through both packages and watch three harnesses give the same answer for the same reasons.

DeepEval is the mandatory first topic of the track, and Inspect AI is the optional second topic. DeepEval is 10B.2 to 10B.7; Inspect is 10B.8 to 10B.16, with 10B.17 (choosing, combining and migrating) needing the Inspect lessons. In this lesson the DeepEval parts are required and the Inspect install, smoke tests and samples are optional, each marked "(optional)". A learner who skips Inspect goes from 10B.7 straight to 10B.18 and reads its DeepEval parts. The lesson files keep their numbers either way.

What you'll learn

  • Which part of the track is mandatory and which is optional: DeepEval (10B.2 to 10B.7, plus 10B.1 and the DeepEval parts of 10B.18) is the core, and Inspect AI (10B.8 to 10B.16, plus 10B.17) is optional, with the two routes drawn in 8.4
  • Why a team that already has a working harness still adopts a framework, what it buys (a runner, a log, an ecosystem, benchmarks, CI integration) and what it costs (version churn, definitions you did not write, dependency weight), and the rule that keeps the trade honest
  • What DeepEval and Inspect AI each are: their philosophies (a test is a record plus metrics, versus a task is a recipe and the log is the product), who maintains them, their licences, their release cadence and what "stable" means for each
  • The package maps: what uv add deepeval and uv add inspect-ai install (measured, not guessed), the optional extras (including four new DeepEval extras in 4.3.6), and the companion packages (legacy DeepTeam; Inspect Evals, Harbor, SWE, Scout, Viz, Flow, Petri, Cyber, inspect-k8s-sandbox and inspect-sandboxes) with the lesson that covers each
  • A side-by-side concept map, evalkit ↔ DeepEval ↔ Inspect, with the exact names, and the words that mean different things in each (score, threshold, metric, scorer, test, task, epoch, pass)
  • One uv project for the whole track: Python version, .env and .gitignore, telemetry opt-out, where each package writes files, and the first-hour failures
  • The keyless technique for each package (a scripted DeepEvalBaseLLM judge, and mockllm/model with scripted outputs), what it proves and what it cannot, and a smoke test for both that you can run in one minute, on your laptop and in CI
  • The triage eval from 10A.1 rebuilt in both packages and run for real: the headline numbers, how they reconcile with evalkit's, why the definitions of "the number" differ, and how to find the cause when two ports disagree
  • A decision table (DeepEval, Inspect, both, neither, other tools), a roadmap of lessons 10B.2 to 10B.18 with four reading orders, and the corrections this track makes to 10A.10
  • Older code and tutorials, a first-week failure gallery, and the methodology for defending a number you did not compute yourself

What you don't need

  • An API key, a Confident AI account, Docker, Ollama (local models are optional, see 11C.6) or any running service. Every sample marked as run in this lesson ran on a laptop with nothing but uv; the one block that would need a key (four provider commands in 6.7) is labelled illustrative and was not run.
  • DeepEval or Inspect experience. This is the opening lesson: both are introduced from zero, and each gets its own depth later.
  • The depth of either package. How LLMTestCase, metrics and the runners work is 10B.2; how a Task, solvers and scorers work is 10B.8. This lesson maps, sets up and compares; it does not re-teach those lessons.
  • The eval concepts themselves. Datasets, deterministic graders, judges, calibration, RAG, agent and CI evals were taught framework-free in 10A.1 to 10A.12 and are linked, not repeated.

Setup

You need Python 3.11 or newer for the whole track (Inspect's floor; if you skip the optional Inspect lessons, DeepEval alone accepts 3.10) and uv. If you have not set up a uv project before, 01B.1 and 03.1, Part 4 walk through it. One project serves lessons 10B.1 to 10B.18. DeepEval is required; Inspect AI is optional and is needed only for 10B.8 to 10B.17:

bash
uv init eval-lab --bare --python 3.13 && cd eval-lab   # once
uv add deepeval python-dotenv      # required: DeepEval, 10B.2 to 10B.7
uv add inspect-ai                  # optional: only for 10B.8 to 10B.17
# or: pip install deepeval python-dotenv   (and, optionally, inspect-ai)

Part 5 explains the files to add next (.env.example, .gitignore) and the first-hour failures. The runnable samples save under the file names their first comment gives: most in the eval-lab project, and the Inspect samples in its child folder inspect-lab/, which is also a throwaway git repository (Inspect records the repository in every log, so 5.6 shows how to make it a harmless one). 5.5 shows the layout. Run Python files with uv run python file.py. Shell lines are bash; on Windows use WSL or Git Bash, or translate $? and tail to PowerShell's $LASTEXITCODE and Select-Object -Last 12. This lesson never needs, prints or stores a key.

Versions (current at time of writing; facts verified 24 November 2026, versions and repository counts refreshed on 26 November 2026, red-teaming and changelog facts rechecked on 28 November 2026): deepeval 4.3.6 (uploaded 25 November 2026, Apache-2.0, Python 3.10 or newer), inspect-ai 0.3.292 (23 November 2026, MIT, Python 3.11 or newer), deepteam 1.0.10, inspect-evals 0.30.0, inspect-scout 0.6.4, inspect-viz 0.4.2, inspect-swe 0.3.3 (27 November; 0.3.2 when first checked), inspect-harbor 1.0.0, inspect-flow 0.17.0, inspect-petri 3.1.1 and uv 0.12.1. Both packages release every few days, so treat these as a snapshot. DeepEval 4.3.5 (24 November) is the version the sibling DeepEval lessons 10B.2 to 10B.6 were checked against; 10B.7 is checked against 4.3.6, which moved red teaming back into DeepEval on 25 November 2026. Every sample marked as run here was executed on 26 November 2026 with Python 3.13.14, deepeval 4.3.6 and inspect-ai 0.3.292, with DEEPEVAL_TELEMETRY_OPT_OUT=1 and no key, and every one was re-run on 28 November 2026 (same versions) from a fresh project built only from this lesson's text; outputs dated 28 November are from that re-run.


What you must be able to do after this lesson#

  • Name three things a framework gives you over a hand-built harness and three things it does not
  • State the rule that keeps the framework trade honest
  • Explain which package scores finished records (DeepEval) and which one runs your app (Inspect)
  • Set up one uv project with a .env.example, a .gitignore and telemetry opted out
  • Run the triage eval keyless in both packages, using a scripted DeepEvalBaseLLM judge and mockllm/model
  • Explain what a keyless run proves and what it cannot prove
  • Report a small result such as 10 of 12 honestly, with an oracle run and a null run as checks

Why this matters for an AI engineer#

You'll hear... You'll understand it after...
"We already have an eval script. Why bring in a framework?" Part 1
"DeepEval is pytest for LLMs, Inspect is for government safety testing." Part 2
"Who is behind this, and will it still exist next year?" 2.4 and 2.5
"What does uv add deepeval actually install?" Part 3
"Which of these is our Scorer, and which is our run_eval?" Part 4
"My DeepEval score and my Inspect score for the same cases disagree." 7.4 and Part 12
"Can we test the eval harness in CI without an API key?" Part 6
"This tutorial imports a class that does not exist." Part 10
"Should we use DeepEval, Inspect, both or neither?" Part 8
"The first run crashed before it did anything." Part 5 and Part 11

Part 1: Why adopt a framework after building your own#

1.1 What evalkit gave you, and what it did not#

By the end of 10A.8 you had a harness with a typed dataset, deterministic scorers, calibrated judges, a runner with caching and concurrency, a statistics module with paired comparisons, and a CI gate. Its great virtue is that nothing in it is hidden: when a number moves you can open the file that produced it. A small harness has real limits, though, and they are the reasons teams adopt something bigger.

What a hand-built harness struggles with What it looks like in practice
Breadth of ready-made checks You wrote exact match, schema checks and a rubric judge. Faithfulness, answer relevancy, contextual precision, task completion, tool correctness, toxicity, topic adherence and dozens more are weeks of prompt work each, and a library has them on day one
Run records people can share evalkit writes JSONL. A framework gives you a viewer for every sample, every message and every tool call, which is how a reviewer who did not write the eval reads it
Concurrency, retries and rate limits for real providers Your runner has a thread pool. A framework has adaptive connection control, retry policy, resumable runs and error budgets that took someone a year to get right
Agents, tools and sandboxes 10A.7 gave you trajectory scorers over recorded runs. Running an agent against a sandbox with limits, approvals and a transcript is a product in its own right
Public benchmarks Running GPQA or SWE-bench through your own harness is a project; a framework package runs them with one command
Integration with the tools your team already uses pytest and CI for one package, a log viewer and VS Code for the other, tracing integrations with LangChain, LlamaIndex and OpenAI's agents SDK
A common vocabulary A new hire who knows DeepEval or Inspect can read your evals on day one; nobody outside your team knows evalkit

What a framework does not give you is the thing 10A.1 to 10A.8 were really about: a good dataset, a defensible definition of "correct", a judge you have validated, and honest statistics. No framework supplies those; each only gives you a faster way to produce numbers, which makes the discipline more important, not less.

1.2 What a framework costs#

Cost Why it bites
Definitions you did not write A DeepEval FaithfulnessMetric and the faithfulness in 10A.6 share a name and compute different things; Inspect's model_graded_qa() ships a grading template that Inspect's releases change. A number is only as defensible as your understanding of its definition (10B.4 and 10B.11 open them up)
Version churn DeepEval shipped about thirty releases in twenty weeks, and one of them (4.2.0, 24 August 2026) flipped the direction of four metrics. Inspect is 0.x and ships a release every few days, some with breaking changes (2.5)
Dependency weight Each package brings about eighty distributions with it, and together about 130 (3.4): pytest and four plugins, an OpenAI SDK, OpenTelemetry, a telemetry client on one side; a terminal UI, a web server and filesystem libraries on the other
Hidden behaviour Importing DeepEval reads .env files and, unless you opt out, reports anonymous usage events. Inspect records your git remote in every log. None of it is sinister, all of it is a surprise on a first day
A second place for definitions to live If the dataset is in your repo, the judge prompt is in the framework and the threshold is in CI config, then "what does this number mean" has three answers to keep in sync
Lock-in, mild but real Test cases, logs and metrics are framework-shaped. Porting an eval between DeepEval, Inspect and evalkit is possible (10B.17) but never free

1.3 The rule that keeps the trade honest#

Adopt the framework as a runner and a source of checks, not as the owner of your definitions. Your dataset, your rubric text, your thresholds and your judge-validation results stay in your repository as ordinary files. The framework executes them.

In practice that means four habits, which the rest of the track returns to:

  1. Keep the labelled data and the rubric in your repository, in a format you can load into any framework (JSONL is enough).
  2. Wrap, do not inherit, where you can. A custom DeepEval metric or Inspect scorer that calls an evalkit function keeps the definition in one place (10B.2, Part 8 and 10B.17 show both directions).
  3. Validate every judge you use, whoever wrote its prompt, with the tools of 10A.5. Neither package does this for you.
  4. Record which version of what produced each number (Part 12).

1.4 Where this fits among tools#

10A.10, Part 1 separated three layers that are often confused: a kit (code you run, like evalkit), a harness or framework (a bigger kit with a runner and records), and a platform (a hosted service with a UI, storage and team features). DeepEval and Inspect are both frameworks. DeepEval has a commercial platform attached (Confident AI) that its commands can upload to; Inspect has none, and its closest equivalents are the log viewer and, in the ecosystem, community tools. 10A.10, Part 2 lists both among two dozen tools and 10B.17 compares them on every axis; this track exists because these two are where most Python teams land, and each is large enough to need a course of its own.

1.5 When neither is right#

A framework is not always the answer, and saying so is part of the lesson. This section covers only "harness vs framework". General architecture decisions (workflow vs agent, single vs multi-agent, human approval vs autonomy) live in the decision-frameworks lessons, 08A.9 and 13A.8.

Situation Why a framework may not help What to do
One small eval, one engineer, no CI yet The setup and the concepts cost more than the 200 lines you already wrote Stay on evalkit; revisit when a second eval, a second author or a CI gate appears
A definition that is unusual and must be fully auditable (a regulated decision, a safety claim) Framework defaults are indirect; every default is a thing to document Build on evalkit or write custom metrics and scorers with no built-in prompts
You already live in a platform (LangSmith, Braintrust, Langfuse, Phoenix) The platform has its own datasets, evaluators and runner Use its SDK; see 10A.10 and 11A.5
You need a config-file eval gate fast, in any language A YAML tool is quicker than a Python framework promptfoo (10A.10, 4.3)
Pure benchmark reproduction on open-weight models Purpose-built harnesses exist lm-evaluation-harness, HELM or Lighteval (10A.10, 5.6)

Part 2: The two packages in one picture#

2.1 Side by side#

DeepEval Inspect AI
Built by Confident AI, a company that also sells a hosted platform The UK AI Security Institute (UK AISI, a research organization within the UK government's Department for Science, Innovation and Technology), co-developed with Meridian Labs, a US non-profit
Package, import, command deepeval, import deepeval, deepeval inspect-ai, import inspect_ai, inspect
Licence Apache-2.0 MIT
First PyPI upload August 2023 (repository created 10 August 2023) 3 April 2024 (repository created 14 November 2023)
Version line 4.x, a major version, semantic-looking; 4.3.6 0.x, "pre-1.0"; 0.3.292
Python 3.10 or newer (below 4.0) 3.11 or newer
Tagline "unit testing for LLM apps" "a framework for frontier AI evaluations"
First-class unit A test case (one recorded interaction) scored by metric objects A task: a recipe of dataset, solver and scorer
Who calls your app You do: DeepEval scores finished records. It does not run your app Inspect does: the solver is the thing under test, and it runs the model, tools and agents
Default judge An OpenAI model, unless you configure another; most metrics are LLM-as-judge None: scorers are yours or built in (includes(), match(), model-graded ones need a grader)
Result artefact Console table, exit code, .deepeval/ JSON or SQLite, optional upload to Confident AI An .eval log file per run, read by a web viewer, a Python API and dataframes
Headline strengths Metric catalogue (RAG, safety, conversation, agent), pytest and CI fit, tracing, synthetic data, red teaming in DeepEval 4.3.6 (legacy DeepTeam for old code) Agents, tools, sandboxes, logs and transcripts, reproducibility, statistics, 200-plus ready-made benchmark tasks
Headline gaps No judge calibration, no run-to-run significance tests (both are evalkit's job, 10A.5 and 10A.8), no sandboxed code execution No pytest-style assertion workflow, no ready-made RAG metrics, no hosted UI for non-engineers, no judge calibration
Deep dive 10B.2 to 10B.7 10B.8 to 10B.16

The two are not rivals so much as neighbours: DeepEval is the shape of "my product has behaviours, assert on them in CI", and Inspect is the shape of "I am studying what a model or agent does, record everything, run it across models". Plenty of products need both shapes, which is why 10B.17 devotes a whole lesson to combining them.

The same two shapes as a picture, with evalkit underneath as the hand-built version of both:

flowchart LR
    subgraph de ["DeepEval: a test is a record plus metrics"]
        direction LR
        D1["Your app runs<br/>(you call it)"] --> D2["LLMTestCase<br/>input, actual_output, ..."]
        D2 --> D3["Metric objects<br/>score, threshold, reason"]
        D3 --> D4["evaluate() or<br/>assert_test()"]
        D4 --> D5["Pass or fail per case<br/>.deepeval/ files, exit code"]
    end
    subgraph ins ["Inspect: a task is a recipe, the log is the product"]
        direction LR
        I1["Dataset<br/>Sample: input, target"] --> I2["Solver<br/>generate(), tools, agents"]
        I2 --> I3["Scorer<br/>Score + metrics"]
        I3 --> I4["EvalLog<br/>.eval file per run"]
        I4 --> I5["Inspect View,<br/>log API, dataframes"]
    end
    EK["evalkit (10A.1 to 10A.12)<br/>run_eval, Scorer, judges, statistics"]
    EK -. "same ideas, built by hand" .-> de
    EK -. "same ideas, built by hand" .-> ins

Read the left half left to right: you run your app, wrap what happened in a test case, and DeepEval scores it. Read the right half: Inspect runs the solver, scores what came back, and writes the log that every later step reads. Everything in Parts 3 to 7 is a detail of one of those two lines.

2.2 DeepEval: a test is a record plus metrics#

DeepEval's central idea is in its tagline. An evaluation is a unit test: you record one interaction as a test case (the question, the answer your app gave, perhaps the retrieved context or the expected answer), you choose metric objects that score it against a threshold, and a runner turns that into pass or fail per case, with a score and a written reason per metric. The same objects work from a Python script with evaluate() or inside pytest with assert_test() and the deepeval test run command, which exits non-zero when a metric fails, so CI goes red.

Three consequences shape how you use it.

  1. Most metrics are LLM-as-judge. Of about sixty concrete metric classes (10B.4 counts them), only a handful are plain code. The rest send prompts to a judge model and turn the answers into a score with a fixed formula, so everything 10A.4 and 10A.5 said about judges applies, and the package gives you no tools to measure judge error (10B.2, 8.4).
  2. DeepEval scores records; it does not run your app. You call your application, wrap the input and output in a test case and hand it over. That keeps the library out of your architecture and makes it easy to score recorded production traffic, and it means DeepEval has no opinion about concurrency, retries or sandboxes in your app. Its tracing support (@observe, 10B.5) is how it looks inside an app after the fact.
  3. Confident AI is optional but present. The platform stores runs and datasets, compares runs, annotates traces and evaluates production traffic. Several commands and one evaluate() argument upload to it, so a keyless setup has a short list of things to avoid (10B.2, 7.5); 10B.7 surveys the platform with dated pricing.

2.3 Inspect AI: a task is a recipe, and the log is the product#

Inspect grew out of the UK AI Security Institute's own testing of frontier models for dangerous capabilities and agentic behaviour, and its shape shows it. An Inspect evaluation is a Task that brings together a Dataset of labelled samples, a Solver that produces an answer for each sample ("as simple as a single generate() call to the model, or as sophisticated as a full agent that uses tools over many turns", in the docs' words) and a Scorer that evaluates the output. The task is a recipe, not a run: the model, the number of epochs, limits and the error policy are chosen when you run it, so one task file runs against ten models without edits.

Four consequences shape how you use it.

  1. The solver is the system under test. Inspect calls the model for you, so changing the prompt, adding tools or swapping a plain call for an agent is a change of solver, and the dataset and scorer, which define the measurement, stay put.
  2. Logs are the product. Every run writes a log file with the configuration, every message, every model call, every score and every timing. You read it with a web viewer (inspect view), a Python API and dataframes, and you can re-score, merge and compare logs long after the run (10B.13).
  3. Measurement honesty is written down. The scoring policy treats a model-graded scorer as part of the "measurement instrument": an unparseable answer from the model under test counts against it, while an unparseable verdict from the grader leaves the sample out and is reported separately (10B.10, 10B.11).
  4. It is a harness, not a platform. There is no hosted service, no annotation queue and no dashboard for non-engineers. Logs are files you own; teams that need more build on them or add a platform on top.

2.4 Governance, licences and what they mean for you#

Who maintains a dependency, under what licence and with what incentives is part of choosing it. The facts below are dated 24 November 2026 (repository star counts refreshed 26 November).

Question DeepEval Inspect AI
Who owns the code? Confident AI, a company. The package's author field is a Confident AI address. The repository confident-ai/deepeval has about 19.7 thousand stars UK AISI created it and holds the copyright ("Copyright (c) 2024 UK AI Security Institute"). The docs home says it is "developed by the UK AI Security Institute and Meridian Labs"; Meridian Labs publishes the companion packages. The repository UKGovernmentBEIS/inspect_ai has about 3.3 thousand stars
Licence Apache-2.0 (includes an explicit patent grant) MIT
Business model behind it The open-source library sits beside a paid platform (Confident AI); the free library keeps its full local workflow. (An optional paid decision model, Jev, comes from a different company, TypeSafe AI; 10B.3 surveys it) Government funding for AISI; Meridian Labs describes itself as a 501(c)(3) non-profit. No commercial platform
What could change? Product emphasis can drift toward the platform; new features may land there first. The library has remained fully usable offline so far A government institute can change priorities; the package has a second maintaining organization, which spreads the risk
Contribution model Open repository on GitHub, many contributors Open repository; the benchmark collection (Inspect Evals) changed on 8 May 2026 so that new evaluations live in the contributor's own repository and are registered with a small YAML file (10B.16)
Data flow by default Anonymous usage telemetry unless you opt out (5.3) No usage telemetry is documented; logs record the git origin and commit (5.6), so audit the network traffic yourself if your policy requires it

Neither list is an endorsement or a warning. They are the facts that go into a dependency review: an Apache or MIT licence is acceptable to nearly any employer, neither package's maintainers can revoke a version you have already installed, and the real risk for either one is not disappearance but change you did not plan for, which is the subject of the next section.

2.5 Release cadence and version policy#

Fact (checked 28 November 2026) DeepEval Inspect AI
Latest at verification 4.3.6 (25 November); 4.3.5 a day earlier is the 10B.2 to 10B.6 baseline 0.3.292 (23 November)
Cadence About 30 releases between 4.0.8 (10 July) and 4.3.5 (24 November): one every five days 26 releases from 0.3.267 (22 September) to 0.3.292 (23 November): one every two to three days
Version policy Major version 4, but minor releases change scores and names (see below) 0.x: any release can carry a "Breaking Changes" section
Where release notes live The docs changelog has per-version entries with breaking-change labels, but it can lag PyPI (4.3.6 was still absent when checked on 28 November 2026); the GitHub releases page has Python releases only up to python-v4.2.4, and PyPI is the source of truth for what shipped The CHANGELOG on the docs site lists every release, with a Breaking Changes section when there is one
A change that moved numbers 4.2.0 (24 August 2026) flipped Bias, Toxicity, Hallucination and Misuse: they used to score the proportion of violations (lower is better) and now score 0 to 1 with higher meaning better, like every other metric 0.3.262 made a tied grader panel unscored, and 0.3.288 changed the default model-graded template (nonce-coded markers, 10B.11); 0.3.292 changed what exclude_samples() and zero_samples() return
A change that moved your install Python floor and many dependencies unchanged; 4.3.6 added pyyaml, red teaming, and optional extras for the code scanner's Claude Code, Codex and Cursor engines 0.3.281 (15 October 2026) raised the Python floor to 3.11; 0.3.288 removed web_browser()

DeepEval 4.3.6 (25 November 2026) moved red teaming back into the main package as deepeval.red_team with a deepeval red-team command; 10B.7 teaches it in depth and compares it with the legacy deepteam package.

Five habits follow, and they are the same ones 10B.2, 1.2 and 10B.8, 1.2 give in more detail.

  1. Commit uv.lock. uv add deepeval writes a lower bound into pyproject.toml (deepeval>=4.3.6) and the lock file records exactly what resolved. The lock is the pin; the course writes install commands without == pins because the lock does the job.
  2. Upgrade on purpose, one package at a time, after reading what changed, then re-run a known suite on the old and the new version and compare case by case (10A.8, 8.4 is the playbook).
  3. Treat every number as belonging to a version. A DeepEval score is comparable only with scores from the same version and judge; an Inspect log records the Inspect version but not your other packages.
  4. Date what you write down. Every table in this lesson carries a date for a reason.
  5. Know the check. uv run deepeval --version, uv run inspect --version, the DeepEval changelog, the PyPI release history of each package, and Inspect's CHANGELOG are the places to look first.

Part 3: The package maps#

Reference

3.1 What uv add deepeval and uv add inspect-ai install, measured#

Both installs are broad, and the numbers are easier to trust when you measure them. This script counts the installed distributions in whatever environment runs it, adds up the size of their files, and reports whether named packages are present. Run through uv run --isolated --no-project --with ... it uses a fresh throwaway environment, so your project stays clean and the count is for the named packages alone:

python
# footprint.py: how many packages did this environment resolve, and how big is it? (lesson 10B.1)
import sys
from importlib import metadata


def norm(name: str) -> str:
    return name.lower().replace("_", "-")


dists = {norm(d.metadata["Name"]): d for d in metadata.distributions()}
size = 0
for d in dists.values():
    for f in d.files or []:
        path = d.locate_file(f)
        if path.is_file():
            size += path.stat().st_size
print(f"{len(dists)} distributions, about {size / 1e6:.0f} MB of installed files")
for want in sys.argv[1:]:
    print(f"  {want:14} {'present' if want in dists else 'absent'}")
bash
uv run --isolated --no-project --with deepeval python -I footprint.py deepeval inspect-ai pytest openai posthog textual pandas pyarrow anthropic
uv run --isolated --no-project --with inspect-ai python -I footprint.py deepeval inspect-ai pytest openai posthog textual pandas pyarrow anthropic
uv run --isolated --no-project --with deepeval --with inspect-ai python -I footprint.py deepeval inspect-ai pytest openai posthog textual pandas pyarrow anthropic
Output · real, 28 November 2026, Python 3.13.14; a --- header per command33 lines
--- uv add deepeval
81 distributions, about 112 MB of installed files
  deepeval       present
  inspect-ai     absent
  pytest         present
  openai         present
  posthog        present
  textual        absent
  pandas         absent
  pyarrow        absent
  anthropic      absent
--- uv add inspect-ai
80 distributions, about 149 MB of installed files
  deepeval       absent
  inspect-ai     present
  pytest         absent
  openai         absent
  posthog        absent
  textual        present
  pandas         absent
  pyarrow        absent
  anthropic      absent
--- both in one project
129 distributions, about 240 MB of installed files
  deepeval       present
  inspect-ai     present
  pytest         present
  openai         present
  posthog        present
  textual        present
  pandas         absent
  pyarrow        absent
  anthropic      absent

Read it as three facts. DeepEval alone resolves to about 80 distributions and 110 MB, Inspect alone to about 80 distributions and 150 MB, and the two together to about 130 and 240 MB, so they overlap by roughly thirty packages (pydantic, rich and a few others) and add about fifty each. The counts include every package in the environment, so a count from pip list can differ by one or two, and they move by a few between runs as dependencies publish new releases (the run two days earlier counted 82, 81 and 130). Second, the two installs bring different infrastructure: DeepEval brings pytest, openai and posthog and no terminal UI; Inspect brings textual and a web server and none of the other three. Third, neither installs pandas, pyarrow or any provider SDK other than the OpenAI one DeepEval needs for its default judge, which is the cause of most first-run ImportErrors.

uv add deepeval brings uv add inspect-ai brings
Test machinery pytest and four plugins (pytest-asyncio, pytest-repeat, pytest-rerunfailures, pytest-xdist): the runner is part of the product Nothing: Inspect has its own runner and CLI
Provider SDKs openai (the default judge is an OpenAI model) None. --model openai/... needs openai, Anthropic needs anthropic, the optional Gemini needs google-genai, and so on
Observability OpenTelemetry API and SDK, grpcio, confident-trace (tracing, 10B.5) Nothing equivalent; the log is the record
Telemetry client posthog (anonymous usage events, switched off with DEEPEVAL_TELEMETRY_OPT_OUT=1) None documented
Terminal and web rich, typer, questionary rich, textual (display), fastapi and uvicorn (the inspect view server)
Data and I/O pydantic, pydantic-settings, jinja2 (metric prompts are templates), tenacity (retries), aiohttp, requests (those three are also in Inspect's install), pyyaml (new in 4.3.6) pydantic, anyio, httpx, fsspec, s3fs and universal-pathlib (logs and datasets on S3), tiktoken, zstandard, numpy
Not installed pandas, pyarrow, textual, anthropic, google-genai, litellm, ollama pandas, pyarrow, every provider SDK, pytest, datasets

pydantic and rich are shared too. The columns describe what each install is usually relied on for, not exclusive ownership; in the measured throwaway environments tenacity, aiohttp and requests were present in both. 10B.2, 1.3 and 10B.8, 1.3 go through each list in detail.

3.2 Optional extras and what each needs#

Package Extra Adds Used for
deepeval inspect textual, pyperclip The deepeval inspect terminal viewer for saved runs and traces (10B.5). Without it the command exits with an install hint
deepeval claude-code, codex, cursor, red-team-harnesses (new in 4.3.6; 4.3.5 had only inspect) claude-code adds claude-agent-sdk; codex adds openai-codex; cursor adds cursor-sdk; red-team-harnesses aggregates all three Engines for the source-code scanner that ships with DeepEval's red-teaming module (deepeval red-team --scan PATH). They were not exercised in this track; see 10B.7
inspect-ai math antlr4-python3-runtime, latex2sympy2-extended The math() scorer (10B.10)
inspect-ai dev, doc, dist Development, documentation and distribution tools Inspect's own contributors; ignore them

Provider SDKs are not extras of either package. Each is a separate uv add, and you add only the ones you use (10B.3 for DeepEval's judges, 10B.12 for Inspect's models).

3.3 The companion packages#

Both projects have a family around the core package. You do not need any of it for 10B.1 to 10B.13; this table is the map, with the lesson that opens each one. Versions and licences are from PyPI on 24 November 2026, rechecked on 28 November.

Package Version Owner Licence Python What it is Lesson
deepteam 1.0.10 Confident AI Apache-2.0 3.9 to below 3.14 Legacy red-teaming library for LLM apps: vulnerabilities, attack methods, risk assessment; depends on deepeval (3.6.2 or newer). Red teaming moved back into deepeval in 4.3.6, and its former docs address now redirects to deepeval.com/docs/red-teaming-* 10B.7
Confident AI platform hosted Confident AI commercial n/a Stores runs and datasets, compares runs, annotates, evaluates production traffic; reached through deepeval login and CONFIDENT_API_KEY 10B.7
deepeval for TypeScript npm deepeval Confident AI not covered n/a A TypeScript SDK sharing the metric prompts; the docs have Python and TypeScript tabs. This track covers Python only none
inspect-evals 0.30.0 maintained by Generality Labs (a London non-profit) with contributions from UK AISI, Arcadia Impact and the Vector Institute MIT 3.11+ Ready-made benchmark tasks (inspect eval inspect_evals/gpqa_diamond); new evaluations are registered from external repositories since 8 May 2026 10B.16
inspect-harbor 1.0.0 Meridian Labs MIT 3.12+ Runs Harbor tasks (Terminal-Bench 2.0, SWE-Bench Pro and others) through Inspect; needs Docker or another sandbox 10B.16
inspect-swe 0.3.3 (27 November; 0.3.2 on 24 November) Meridian Labs MIT 3.11+ Runs external coding agents (Claude Code, Codex CLI, Gemini CLI and others) as Inspect agents 10B.15, Part 10, 10B.16, 14.4
inspect-scout 0.6.4 Meridian Labs MIT 3.11+ Transcript scanners: find refusals, broken environments or evaluation awareness across many logs 10B.16
inspect-viz 0.4.2 Meridian Labs MIT 3.11+ Interactive plots from log dataframes 10B.13, 10B.16
inspect-flow 0.17.0 Meridian Labs MIT 3.11+ Workflow orchestration for running many evals reproducibly, at scale 10B.16, 14.3 (survey level; 10B.12, Part 11 teaches core Inspect's own eval sets)
inspect-petri 3.1.1 Meridian Labs with the UK AISI red team MIT 3.12+ An auditing agent that probes a target model across turns; install inspect-petri, not petri (an unrelated 2019 package) 10B.16
inspect-cyber 0.1.0 (June 2025) UK AISI not stated on PyPI 3.10+ YAML-driven cyber evaluations; the PyPI release lags the repository, which is still active 10B.16
inspect-k8s-sandbox 0.14.0 UK AISI not stated on PyPI 3.10+ Kubernetes sandbox 10B.15, Part 5, 10B.16, 14.2
inspect-sandboxes 0.6.1 Meridian Labs MIT 3.12+ Daytona and Modal sandboxes 10B.15, Part 5, 10B.16, 14.2
VS Code extension "Inspect AI" marketplace id ukaisi.inspect-ai UK AISI and Meridian Labs not covered n/a Run and debug tasks, browse logs, edit .env; uses the workspace's Python 10B.8

Three things in that table surprise people. First, Inspect Evals is a separate package with a separate maintainer, not part of inspect-ai: when a benchmark's behaviour surprises you, look in its repository and its own version, not in Inspect's changelog. Second, red teaming changed shape on 25 November 2026: DeepEval 4.3.6 moved it back into the main package as deepeval.red_team with a deepeval red-team command, so new work starts there and 10B.7 teaches it. The legacy deepteam package remains for migration, with two first-day traps: it needs Python below 3.14, and 1.0.10 imports sentry_sdk without declaring it, so install sentry-sdk with it if you must use it (10B.7, 1.2). Its telemetry has its own switch, DEEPTEAM_TELEMETRY_OPT_OUT=YES (the exact value), separate from DeepEval's. Third, package names and import names differ in the usual way: inspect-ai imports as inspect_ai, inspect-evals as inspect_evals, inspect-scout as inspect_scout.

3.4 Both packages in one environment#

The two resolve together, as the 130-distribution line above shows, and the smoke test in 6.6 runs both side by side. Whether to keep them together is a design choice.

Layout Use when Watch for
One project for the track (this course) You are learning, or one team owns both kinds of eval Dependency weight; DeepEval's pytest plugins load in every pytest session of the environment (10B.2, 5.6)
A dependency group (uv add --group eval deepeval inspect-ai) Evals live in the application's repository Production images stay free of both packages; run evals with uv run --group eval
A separate evals project per package Different teams, different Python floors, or conflicting pins (for example your app pins an older openai) Duplicated helpers; share definitions as plain files

Version conflicts are the real risk of combining, and they are visible at install time rather than at run time: uv add fails with a resolution error rather than breaking silently. The two packages' direct pins on pydantic do not conflict today (DeepEval needs 2.11.7 or newer, Inspect a newer 2.x), but your application's pins can.

3.5 Python versions#

Constraint Source
DeepEval 4.3.6 needs Python 3.10 or newer, below 4.0 PyPI metadata
Inspect AI needs 3.11 or newer since 0.3.281 (15 October 2026), and tests on 3.14 PyPI metadata, CHANGELOG
inspect-harbor, inspect-petri and inspect-sandboxes need 3.12 or newer PyPI metadata
deepteam needs below 3.14 PyPI metadata
The course uses 3.13 the Setup section at the top of this lesson

Choosing 3.13 satisfies every row. If uv picks a different interpreter, uv init eval-lab --bare --python 3.13 tells it which.

3.6 What do I install for...?#

I want to... Install
Run a pytest suite of DeepEval metrics with a scripted judge deepeval
Use an OpenAI judge in DeepEval deepeval plus OPENAI_API_KEY (the OpenAI SDK is already there)
Use a Claude judge in DeepEval (or the optional Gemini) deepeval plus anthropic, or google-genai and google-auth (10B.3)
Browse saved DeepEval runs in a terminal viewer uv add "deepeval[inspect]"
Red-team my own app Current deepeval for deepeval.red_team; the legacy deepteam package only when migrating old code (Python below 3.14). 10B.7 compares the two routes
Run an Inspect task against a real model inspect-ai plus the provider's SDK (openai, anthropic; the optional google-genai; the optional OpenRouter goes through openai)
Run a public benchmark inspect-ai, inspect-evals and the provider SDK; disk space for data (the Inspect Evals docs mention tens of gigabytes for the package and its caches)
Analyse logs with dataframes inspect-ai, pandas and pyarrow
Score LaTeX answers with math() uv add "inspect-ai[math]"
Run agent tasks that execute code inspect-ai and Docker or another sandbox provider (10B.15)

Part 4: The concept map: evalkit ↔ DeepEval ↔ Inspect#

4.1 One table for the whole track#

Every later lesson ends with a table that maps its slice of one package onto evalkit. This is the overview: the same idea in three vocabularies. The DeepEval names below come from 10B.2 to 10B.6, which were checked on 4.3.5, and the names used here were re-imported on 4.3.6 for this lesson; the Inspect names are exact for inspect-ai 0.3.292. Each row points at the lesson that teaches it (10A.10, Appendix A lists evalkit's files).

Idea evalkit (10A.1 to 10A.12) DeepEval Inspect AI
One test case Example(id, input, reference, metadata) LLMTestCase(name, input, actual_output, expected_output, retrieval_context, ..., metadata); ConversationalTestCase for conversations (10B.2) Sample(input, choices, target, id, description, metadata, sandbox, files, setup, checkpoint) (10B.9)
Where the app's answer lives In a Row, after the run In the test case (actual_output): you ran the app already Not in the sample: the solver produces it during the run (state.output)
A set of cases A list of Examples; EvalDataset (10A.2) EvaluationDataset of Goldens (10B.6); or a plain list of test cases A list of Samples, MemoryDataset, csv_dataset, json_dataset, hf_dataset
The thing under test The task callable plus the call_model seam Your own code, outside DeepEval The solver chain: prompt_template(), generate(), tools, react() (10B.9, 10B.14)
A code check exact_match, regex_match, schema_valid (10A.3) ExactMatchMetric, PatternMatchMetric, JsonCorrectnessMetric, or a BaseMetric subclass exact(), match(), includes(), pattern(), or your own @scorer
A judge check rubric_judge, Rubric, pairwise_judge (10A.4) GEval, DAGMetric, ArenaGEval (10B.3) model_graded_qa(), model_graded_fact() (10B.11)
The result of one check Score(name, value, passed, detail) metric.score, metric.reason, metric.success; stored as MetricData Score(value, answer, explanation, reason, metadata, history) where value can be a label, a number, a bool, a list or a dict
Who decides "pass" The scorer (passed) score >= threshold (a >= rule you set per metric) Nobody, by default: a score is a value, and metrics such as accuracy() turn values into numbers
One run over many cases run_eval(...) returns EvalReport evaluate(test_cases, metrics) returns EvaluationResult; deepeval test run for pytest eval(task, model=...) returns a list of EvalLog; inspect eval on the command line
Aggregation pass_rate, mean_score, slices from metadata A pass rate and per-metric means printed; slices are yours Metrics (accuracy(), mean(), stderr(), grouped()) over per-sample scores after epochs are reduced (10B.10)
Repeating for noise repeats= deepeval test run -r k (separate tests) epochs= with a reducer, --epochs
A record of the run to_jsonl() rows .deepeval/ JSON or SQLite, results_folder, optional Confident AI upload (10B.2) The .eval log, always written, with every message and model call (10B.13)
A viewer report.py text The console table; deepeval inspect TUI; Confident AI Inspect View (web), the VS Code extension, dataframes
Caching CallCache (model calls) .deepeval-cache.json (metric results, -c) cache=True response cache (model calls, 10B.12)
A CI gate cli.py gate over saved runs (10A.8) assert_test() plus deepeval test run exit code inspect eval exits 0 even when the eval failed: gate on the log (10B.12, Part 13)
Judge validation judge_validation.py (10A.5) Nothing Nothing (a precomputed_scores() bridge helps, 10B.11)
Statistics between runs compare.py: paired bootstrap, permutation, evaluate_gate (10A.8) Nothing locally Standard errors and clustered errors per run; no between-run test
Agents and tools agent_eval.py: World, trajectories (10A.7) Tracing plus agent metrics (10B.5) Tools, agents and sandboxes as first-class (10B.14, 10B.15)
A keyless stand-in FakeTriageModel, rag_eval.ScriptedJudge, online.FakeJudge FakeJudge (a DeepEvalBaseLLM subclass) mockllm/model with custom_outputs

The two rows that say Nothing for judge validation and between-run statistics are the reason evalkit stays installed after you adopt a framework. Adoption changes how you produce numbers; defending them still uses 10A.5 and 10A.8.

4.2 The same word, a different meaning#

Vocabulary overlaps in a way that causes real arguments. Each of these words is used by at least two of the three, and means something different in each.

Word evalkit DeepEval Inspect AI
Score A Score object with a value in [0, 1] and a passed flag A float in [0, 1] on a metric object (higher is better since 4.2.0) A Score whose value can be "C", "I", 1.0, True, a list or a dict
Metric A function over rows (a rate, a mean, an interval) An object that scores one test case (what Inspect calls a scorer) A function that aggregates scores across samples (accuracy(), stderr()); what scores one sample is a scorer
Scorer An object that scores one example Not used; the equivalent is a metric An async function from (state, target) to a Score
Threshold A cut-off you pass to a gate A per-metric attribute that sets pass or fail for each case Not a built-in concept; a gate over logs is your code
Test A pytest function that wraps the gate One test case, run as one pytest test with assert_test() Not used; a Task is the unit
Task The function that turns an example into model output Not used for this A recipe: dataset, solver, scorer and defaults
Dataset EvalDataset of labelled examples A set of goldens (inputs and expectations, no answers) or of finished test cases A sequence of Samples
Epoch repeats Not used (a repeat is a separate test) A pass over the dataset; scores reduced per sample
Judge A callable that returns a JudgeResult The model a metric calls (model=), not the metric The model that grades, bound to the grader role
Run One call of run_eval One call of evaluate() or deepeval test run One eval() call producing a log per task and model
Pass rate Share of rows where every scorer passed Share of test cases where every metric passed, printed by the runner Not printed: compute it from the log

That table is the cure for a common confusion: when a DeepEval engineer says "the metric scored 0.8" and an Inspect engineer says "the metric was 0.8", they are describing different objects, one per test case and one over the whole run. 10B.2, Part 8 and 10B.8, Part 8 give the full tables; 10B.17 compares the two packages axis by axis.

4.3 What each package does not do#

Not provided evalkit DeepEval Inspect AI Where it lives
Judge calibration (agreement with human labels, TPR/TNR, bias correction) yes (10A.5) no no 10A.5
Paired comparison between two runs yes (10A.8) no (platform feature) no 10A.8
Sandboxed execution of model-written code no no yes 10B.15
Ready-made RAG metrics partial (10A.6) yes no 10B.4
pytest-style assertions with thresholds via a wrapper yes no 10B.2
Full transcripts of every model call, always partial optional tracing yes (the log) 10B.13
A hosted UI for non-engineers no Confident AI (commercial) no 10A.10
Deterministic scores yes for code scorers only for non-LLM metrics only for non-model scorers each lesson

Part 5: One project for the whole track#

5.1 Prerequisites#

You need Python 3.11 or newer (3.13 recommended, 3.5), uv, and a terminal. Check uv --version; if it is missing, 03.1, Part 4 installs it. No Docker, no account, no key.

5.2 Create the project#

bash
uv init eval-lab --bare --python 3.13 --quiet && cd eval-lab
uv add deepeval inspect-ai python-dotenv
cat pyproject.toml
uv run deepeval --version
uv run inspect --version
Output · real, 28 November 2026; commands shown, + package lines cut20 lines
$ uv init eval-lab --bare --python 3.13 --quiet && cd eval-lab
$ uv add deepeval inspect-ai python-dotenv
Using CPython 3.13.14
Creating virtual environment at: .venv
Resolved 132 packages in 10ms
Installed 129 packages in 160ms
$ cat pyproject.toml
[project]
name = "eval-lab"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
    "deepeval>=4.3.6",
    "inspect-ai>=0.3.292",
    "python-dotenv>=1.2.4",
]
$ uv run deepeval --version
4.3.6
$ uv run inspect --version
0.3.292

Three details in that output are worth reading. uv add wrote lower bounds (deepeval>=4.3.6), not pins; the exact resolution is in uv.lock, which you commit. Installed 129 packages matches the 129 distributions measured for both packages in 3.1 (python-dotenv is already a dependency of both, so adding it costs nothing; Resolved 132 counts the whole cross-platform lock: the project itself plus two packages this Mac did not need, a Windows-only terminal helper and httpx2-jsfetch, used only when Python runs in a browser through Emscripten). And both commands answer immediately, with no network call and no prompt: deepeval --version printing 4.3.6 took no key.

5.3 The environment files and telemetry#

Both packages read a .env file, and they do it at different moments, with different reach. Create .env.example (committed, no secrets) and copy it to .env (never committed):

bash
# .env.example: copy to .env (never commit .env). Nothing below is a secret.
DEEPEVAL_TELEMETRY_OPT_OUT=1
# DEEPTEAM_TELEMETRY_OPT_OUT=YES   # only if you install the legacy deepteam package
# Add real keys only when you run against hosted models:
# OPENAI_API_KEY=
# ANTHROPIC_API_KEY=
# GEMINI_API_KEY=       # optional provider
DeepEval Inspect AI
When .env is read At import deepeval, before anything else in your script, from the current folder only (or the folder named by ENV_DIR_PATH); parent folders are not searched When the CLI starts, and when eval() or eval_set() starts (not at import inspect_ai); the first .env found walking up from the current folder
Which files .env, then .env.{APP_ENV} only if APP_ENV is set (in the shell, or inside .env.local or .env; there is no default), then .env.local; later files win .env
What beats .env The process environment always wins: DeepEval only writes keys that are not already set Shell variables beat .env; arguments to eval() and the command line beat both
Switch it off DEEPEVAL_DISABLE_DOTENV=1 (recommended in CI) Not applicable
Surprise to know deepeval login and set-* commands that are given a key write it in plain text to .env.local when you pass --save=dotenv (10B.2, 7.3). Still pass --save=dotenv to every set-* command (10B.3, 2.6), keep .env.local out of git, and look at the file afterwards Command-line options can be set as INSPECT_EVAL_* variables for the CLI only; Python eval() ignores them, except INSPECT_EVAL_MODEL

Provider keys follow each SDK's conventions: OPENAI_API_KEY, ANTHROPIC_API_KEY, and for the optional providers OPENROUTER_API_KEY and, for Google, both GEMINI_API_KEY and GOOGLE_API_KEY (Inspect's Google provider accepts either; GOOGLE_API_KEY wins if both are set). The .env.example above lists the course's names.

Two more rules keep the first week quiet.

Switch telemetry off for each package, in every environment that runs it. By default DeepEval sends anonymous usage events (event names such as "an evaluation ran", metric names, whether you are in a notebook, an anonymous id and the public IP address of the machine, for coarse region) to PostHog; the docs' data-privacy page says test cases and outputs are not on the list and that the package "does not report crashes or exceptions anywhere" (a statement about DeepEval itself, not about the legacy DeepTeam package). The DeepEval switch is DEEPEVAL_TELEMETRY_OPT_OUT=1. Put it in .env for your laptop and in the CI job's environment, because CI runners rarely have your .env. If you install the legacy deepteam package, that switch does not cover it: DeepTeam's import-time telemetry is controlled only by DEEPTEAM_TELEMETRY_OPT_OUT=YES (the exact value), and without it the import looks up the machine's public IP and initializes crash and tracing exporters. The red-teaming module inside DeepEval 4.3.6 uses DeepEval's own switch; 10B.7, 1.2 compares the two. For the wider question of what data your system may send to third parties, see the governance material in 11C.4 and, for evaluation tools as vendors, 14A.7, section 3.3. Samples in this lesson also set the DeepEval switch from Python with os.environ.setdefault(...) before the first import deepeval, so a copied file is safe on its own (10B.2, 1.5).

Never put a key anywhere that is committed. Keys go in .env (or .env.local for DeepEval's CLI), the file is in .gitignore, and the repository carries only .env.example. If a key ever lands in a commit, treat it as leaked and rotate it.

5.4 .gitignore and what to commit#

Both packages write files into the working directory, so the ignore list matters from day one.

bash
# .gitignore
.env
.env.local
.venv/
logs/
.deepeval/
deepeval.db
results/
__pycache__/
Commit Do not commit
pyproject.toml, uv.lock .env, .env.local (keys, in plain text)
.env.example, .gitignore .venv/
Your datasets (JSONL), rubrics, tasks and metric files logs/ (Inspect logs: large, and they record your git remote), .deepeval/, deepeval.db, results/ (DeepEval run files)
A small, reviewed baseline result (a summary JSON) if you gate on it Raw run files and caches

5.5 Where each package writes#

What DeepEval Inspect AI
Default location .deepeval/ in the current directory (override with DEEPEVAL_CACHE_FOLDER; DEEPEVAL_FILE_SYSTEM=READ_ONLY stops writes) ./logs/ in the current directory (override with --log-dir, INSPECT_LOG_DIR, or log_dir= in eval())
What is written The latest run (JSON), a metric-result cache (.deepeval-cache.json), and, if you ask, one JSON file per run or a SQLite database (deepeval.db) One .eval file per task run, written as the run progresses
Anonymous id ~/.deepeval/ (only when telemetry is on) None
Keys .env.local if you used --save=dotenv Never written by Inspect
Deep dive 10B.2, 1.7 10B.8, Part 6

The samples use this layout:

text
eval-lab/
  .env  .env.example  .gitignore  pyproject.toml  uv.lock
  footprint.py  wilson.py  fake_judge.py  triage_data.py  triage_metrics.py
  deepeval_smoke.py  triage_deepeval.py  test_triage_deepeval.py
  check_track.py  run_record.py  exercise_check.py
  inspect-lab/                    (a throwaway git repo, placeholder remote)
    triage.py  fake_triage.py  triage_scripted.py
    inspect_smoke.py  check_data.py  parity_inspect.py
    logs/  logs-smoke/  logs-triage/

eval-lab is the uv project and holds the DeepEval samples and the shared data module. inspect-lab/ is a child folder, which matters twice: uv run finds the parent project, and check_data.py adds its own parent folder to sys.path so it can import triage_data.py. The generated files stay where you can delete them: .deepeval/ in eval-lab, and logs-* in inspect-lab.

5.6 Inspect records your git remote#

Every Inspect log header records the git revision of the folder you ran in: the type (git), the origin URL, the commit and whether the working tree was dirty. That is a feature (a log tells you which code produced it), and it has two consequences. A log you share, bundle or publish exposes your repository's URL. Inspect strips user:token@ credentials from the origin before recording it (since 0.3.242), so the URL itself, the commit and the dirty flag are what a shared log reveals. Older releases did not redact them, which is another reason never to put tokens in remotes.

For a lab folder you do not want to publish from, make a throwaway repository with a placeholder remote:

bash
mkdir inspect-lab && cd inspect-lab
git init -q .
git remote add origin https://example.com/placeholder/triage-lab.git
git -c user.name="Lab" -c user.email="lab@example.com" commit -q --allow-empty -m "placeholder"

The smoke test in 6.5 prints what Inspect recorded from such a folder. When you share logs from a real project, decide on purpose whether the origin should be visible.

5.7 Commands that leave the machine#

A keyless setup has a short list of things to avoid, because each sends something somewhere. For data governance in general (what may leave your systems, and who decides), see 14A.7 and 11C.4.

Command or call What it does Instead
deepeval login, deepeval view, deepeval gate, deepeval generate, deepeval setup Talk to Confident AI or download a binary (view uploads the latest run if you are not logged in) Stay with deepeval test run, evaluate() and deepeval diagnose, which are local (10B.2, 7.5)
deepeval red-team Generates attack inputs and grades replies with models; hosted targets receive traffic, and --scan can use a provider coding agent Keep it out of the keyless setup unless every model and target is local; 10B.7 teaches the safe setup
deepeval set-<provider> without --save=dotenv In 4.3.x set-ollama without --save mis-routes the judge; others store settings in a legacy JSON file Always --save=dotenv, then deepeval diagnose
Any DeepEval LLM metric without model= and without a key Fails at construction, with an error Pass a scripted judge (6.2)
inspect eval ... --model openai/... (or any hosted model string) Calls the provider and costs money --model mockllm/model (6.4)
inspect eval inspect_evals/... Downloads the benchmark dataset on first use, and some need Docker Skip until 10B.16
hf_dataset(...) Downloads from the Hugging Face Hub Use a local file

5.8 Troubleshooting the first hour#

Symptom Cause Fix
DeepEvalError: OpenAI API key is not configured when you build a metric LLM metrics build their judge at construction, and the default is OpenAI Pass model=<your judge>, or set OPENAI_API_KEY; keyless: the scripted judge
ModuleNotFoundError: No module named 'openai' when running Inspect against OpenAI Inspect does not install provider SDKs uv add openai (also for OpenRouter)
ImportError mentioning pandas when calling samples_df() Inspect does not install pandas or pyarrow uv add pandas pyarrow
import deepteam fails with ModuleNotFoundError: No module named 'sentry_sdk' deepteam 1.0.10 imports sentry_sdk without declaring it Only for the legacy package: uv add sentry-sdk, or use deepeval.red_team in current DeepEval instead
uv add says no solution found Your app's pins conflict with a package's Read the named conflict; try a separate project or a dependency group (3.4)
ModuleNotFoundError: No module named 'fake_judge' with python -I -I removes the script's folder from the import path Run with uv run python file.py, or python -E -s file.py
A DeepEval run behaves differently in CI .env loaded locally but not in CI (or the reverse) DEEPEVAL_DISABLE_DOTENV=1 in CI and set variables in the job
inspect: command not found The virtual environment is not active uv run inspect ...
The Inspect log shows an unexpected repository URL Logs record the origin (5.6) Use a placeholder remote in lab folders

Part 6: The keyless technique#

6.1 Why run evals with no key, and what that proves#

Everything in this track runs without an API key, and that is a method, not a workaround. A scripted judge or a scripted model gives you three things a real one cannot.

You get Why it matters
Determinism The same input gives the same output, so a failing test points at your wiring or your definitions, not at model noise
Zero cost and zero latency You can run the whole suite on every commit and in a fork's CI with no secrets
Visibility A scripted judge can record the exact prompts a metric sends, which is how you read what a built-in metric really asks (10B.3, 10B.4)

What a keyless run proves is plumbing: the install works, the files import, the scorer handles each shape of output (valid, malformed, empty), the aggregation code is right, the runner exits with the right code, and the log or result file has the fields you read. What it cannot prove is quality: nothing about a fake judge says how a real judge scores, and a fake model says nothing about how good your prompt is. 10B.8, Part 10 and 10B.2, Part 10 call the controls that make this precise the oracle run (a fake that answers perfectly should score 100%) and the null run (a fake that answers nothing useful should score near 0%); a harness that fails either one is broken before any model is involved.

6.2 DeepEval: a scripted judge#

Most DeepEval metrics call a judge model, and an LLM metric fails at construction without one (the error appears the moment you write AnswerRelevancyMetric(), long before any case is scored). The fix is a judge you control: a subclass of DeepEvalBaseLLM, the base class every DeepEval judge extends. The track uses one such class everywhere, FakeJudge, defined in 10B.2, 3.5 and reused unchanged by 10B.3 and the later lessons. Save it as fake_judge.py:

python
# fake_judge.py: a keyless, scripted DeepEval judge that records every prompt (lesson 10B.2)
# It never calls a model. When a metric asks for a structured answer (a Pydantic
# schema such as ReasonScore), the judge answers with a dict you scripted for that
# schema's class name. 10B.3 and 10B.4 reuse this file unchanged.
from __future__ import annotations

import json
from typing import Any

from pydantic import BaseModel

from deepeval.models import DeepEvalBaseLLM

Answer = dict[str, Any]


class FakeJudge(DeepEvalBaseLLM):
    """Scripted stand-in for an LLM judge.

    script:  {schema name: [answer, answer, ...]}, popped in call order.
    routes:  {schema name: [(needle, answer), ...]}; checked first, the first needle
             found in the prompt wins (and can answer any number of times).
    as_json: return JSON text instead of a schema object, to exercise DeepEval's
             string-parsing path (what most real custom judges return).
    name:    the model name DeepEval prints and records in results.
    calls:   every (schema name, prompt) pair DeepEval sent, in order.
    """

    def __init__(self, script: dict[str, list[Answer]] | None = None, *,
                 routes: dict[str, list[tuple[str, Answer]]] | None = None,
                 as_json: bool = False, name: str = "fake-judge"):
        # Copy the lists so one script dict can seed several judges.
        self.script = {k: list(v) for k, v in (script or {}).items()}
        self.routes = {k: list(v) for k, v in (routes or {}).items()}
        self.as_json = as_json
        self.calls: list[tuple[str | None, str]] = []
        self._name = name
        super().__init__(model=name)          # calls load_model()

    def load_model(self):
        return self                           # nothing to load: no client, no key

    def _answer(self, prompt: str, schema: type[BaseModel] | None):
        name = schema.__name__ if schema else None
        self.calls.append((name, prompt))
        data = next((answer for needle, answer in self.routes.get(name or "", [])
                     if needle in prompt), None)
        if data is None:
            queue = self.script.get(name or "")
            if not queue:                     # fail loudly: an unscripted call is a bug
                raise RuntimeError(f"FakeJudge has no scripted answer for schema {name!r}")
            data = queue.pop(0)
        if self.as_json or schema is None:
            return json.dumps(data)
        return schema.model_validate(data)

    def generate(self, prompt: str, schema: type[BaseModel] | None = None):
        return self._answer(prompt, schema)

    async def a_generate(self, prompt: str, schema: type[BaseModel] | None = None):
        return self._answer(prompt, schema)

    def get_model_name(self) -> str:
        return self._name

    # Helpers for reading what DeepEval asked.
    def schemas(self) -> list[str | None]:
        return [name for name, _ in self.calls]

    def prompt(self, i: int) -> str:
        return self.calls[i][1]

How it works, in four sentences. DeepEval asks a metric's judge for a structured answer by passing a Pydantic schema class (for G-Eval's scoring call it is ReasonScore, with a reason and a score); FakeJudge looks the schema's class name up in your script and returns your scripted answer in the right type. script is a queue per schema name, answers popped in call order; routes answers by a needle found in the prompt, which is how one judge returns different verdicts for different cases when cases run concurrently. With nothing scripted it raises, on purpose: a call you did not plan for is a bug in your test. And calls records every (schema name, prompt) pair, so you can print exactly what DeepEval asked.

6.3 A DeepEval smoke test#

This is the smallest sample that proves the install, the no-key path and the scripted judge. It checks three things in order: that an LLM metric with no judge fails fast, that a deterministic metric needs no judge at all, and that a G-Eval metric on the scripted judge scores a case and records the prompt it sent.

python
# deepeval_smoke.py: the keyless DeepEval smoke test (lesson 10B.1)
# Proves the install works, that no key is needed, and shows what the judge was asked.
import os

os.environ.setdefault("DEEPEVAL_TELEMETRY_OPT_OUT", "1")   # before the import: see 1.5 of 10B.2

import deepeval
from deepeval.metrics import AnswerRelevancyMetric, ExactMatchMetric, GEval
from deepeval.test_case import LLMTestCase, SingleTurnParams

from fake_judge import FakeJudge

print("deepeval", deepeval.__version__ if hasattr(deepeval, "__version__") else "?")

# 1. Without a judge and without a key, an LLM metric fails at construction.
os.environ.pop("OPENAI_API_KEY", None)
try:
    AnswerRelevancyMetric()
except Exception as e:                                       # DeepEvalError in 4.3.x
    print("1. no judge:", type(e).__name__)

# 2. A deterministic metric needs no judge at all.
case = LLMTestCase(input="Which plan includes SSO?", actual_output="Team",
                   expected_output="Team")
exact = ExactMatchMetric()
exact.measure(case)
print("2. ExactMatch:", exact.score, exact.success)

# 3. An LLM metric with the scripted judge: the judge answers {reason, score 0-10}.
judge = FakeJudge(script={"ReasonScore": [{"reason": "Names the right plan.", "score": 9}]})
quality = GEval(name="Answer quality",
                evaluation_steps=["Check the answer names the plan in the expected output."],
                evaluation_params=[SingleTurnParams.ACTUAL_OUTPUT, SingleTurnParams.EXPECTED_OUTPUT],
                model=judge)
quality.measure(case)
print("3. G-Eval:", quality.score, quality.success, "|", quality.reason)
print("   judge calls:", judge.schemas(), "| prompt chars:", len(judge.prompt(0)))

Run it from a folder that also holds fake_judge.py:

bash
uv run python deepeval_smoke.py
Output · real, 26 November 20266 lines

deepeval 4.3.6
1. no judge: DeepEvalError
2. ExactMatch: 1.0 True
3. G-Eval: 0.9 True | Names the right plan.
   judge calls: ['ReasonScore'] | prompt chars: 1037

Read it line by line. deepeval 4.3.6 confirms the installed version (the uv run deepeval --version command is the sturdier check). Line 1 is the construction failure, a DeepEvalError, which you now recognize as "no judge". Line 2 shows ExactMatchMetric scoring 1.0 and passing with no judge and no network. Line 3 shows GEval (the track's workhorse judge metric, 10B.3) reading the scripted {"reason": ..., "score": 9} and reporting 0.9: G-Eval's judge answers on a 0 to 10 scale and DeepEval divides by ten. The last line shows the recording: one judge call, for the ReasonScore schema, with a prompt of about a thousand characters, which you can print with judge.prompt(0) to read exactly what G-Eval asked.

6.4 Inspect: mockllm/model#

Inspect's equivalent is a provider that is a fake. mockllm/model plugs in where openai/gpt-6-luna would, so the solvers, scorers, logs and viewer all run unchanged around a model that never touches the network. Three behaviours to know (10B.8, 3.3 goes deeper):

Behaviour Detail
With no configuration Every call returns the text Default output from mockllm/model. An evaluation with an answer-checking scorer therefore scores 0: the plumbing ran, and nothing matched
Scripted replies get_model("mockllm/model", custom_outputs=...) takes a list of ModelOutputs (consumed in order), or a function from the request to a ModelOutput
Concurrency Samples run concurrently, so a shared list of replies is handed out in scheduling order. Use a function keyed on the input (as 7.3 does), not on call order

6.5 An Inspect smoke test#

One task, one sample, one scripted reply. Run it inside a folder that is a git repository (5.6) so you can also see what the log recorded:

python
# inspect_smoke.py: the keyless Inspect smoke test (lesson 10B.1)
# One task, one sample, one scripted reply from mockllm/model. No provider, no key.
from inspect_ai import Task, eval, task
from inspect_ai.dataset import Sample
from inspect_ai.model import ModelOutput, get_model
from inspect_ai.scorer import includes
from inspect_ai.solver import generate


@task
def smoke() -> Task:
    return Task(dataset=[Sample(id="q1", input="Which plan includes SSO?", target="Team")],
                solver=[generate()], scorer=includes())


if __name__ == "__main__":
    scripted = get_model("mockllm/model", custom_outputs=[
        ModelOutput.from_content("mockllm", "The Team plan includes SSO.")])
    log = eval(smoke(), model=scripted, log_dir="logs-smoke", display="none")[0]
    print("status:", log.status, "| model:", log.eval.model)
    print("reply :", log.samples[0].output.completion)
    print("score :", log.results.scores[0].metrics["accuracy"].value)
    rev = log.eval.revision                       # recorded from the git repo you ran in
    print("git   :", rev.type, rev.origin, rev.commit[:7])
bash
uv run python inspect_smoke.py
Output · real, 26 November 2026; throwaway commit hash4 lines
status: success | model: mockllm/model
reply : The Team plan includes SSO.
score : 1.0
git   : git https://example.com/placeholder/triage-lab.git 0722ac8

status: success and a score of 1.0 mean the whole pipeline ran: the dataset loaded, generate() called the fake, includes() found "Team" in the scripted reply, and a log was written. The last line is the provenance Inspect recorded from the folder: the repository type, the origin URL (the placeholder) and the short commit.

The same task from the command line, with no scripted reply, shows what the default mock does:

bash
uv run inspect eval inspect_smoke.py --model mockllm/model --display plain
Output · real, 28 November 202621 lines
Monitor from another shell: inspect ctl task list   (inspect ctl --help)
Running 1 tasks...
---------------------------------------------------------
smoke (1 sample): mockllm/model                          
dataset: (samples)                                       
---------------------------------------------------------
                                                         
generate     | Steps:   1/1 100% | Samples:   1/  1 | accuracy:  n/a | mockllm:  0/20 | HTTP retries: 0

---------------------------------------------------------            
smoke (1 sample): mockllm/model                                      
dataset: (samples)                                                   
                                                                     
total time:               0:00:00                                    
mockllm/model             39 tokens [I: 6, O: 33]                    
includes                                                             
accuracy  0.000                                                      
stderr    0.000                                                      
Log: logs/2026-11-28T11-06-56-00-00_smoke_GKcRTexnxKzivJWv34UkfS.eval
---------------------------------------------------------            
                                                                     

The run finished, the panel printed, a log was written (to ./logs/, the default, because this command passes no --log-dir), and accuracy is 0.000: the default reply "Default output from mockllm/model" does not contain "Team". That is the correct result for a null run, and it is the reason a keyless command-line check proves only that the machinery works. To see passes you script the mock, as the next part does for 12 tickets.

6.6 One smoke test for both#

When you set up the track project, one script that exercises both packages catches nearly every first-day problem (the Inspect half is optional: if you did not install inspect-ai, delete the Inspect lines and keep the DeepEval ones): a missing dependency, a wrong Python, a telemetry import, an unwritable folder. Save it as check_track.py next to fake_judge.py:

python
# check_track.py: one keyless smoke test for both packages (lesson 10B.1)
# Run it after `uv add deepeval inspect-ai`: it needs no key, no network and no service.
import os

os.environ.setdefault("DEEPEVAL_TELEMETRY_OPT_OUT", "1")   # set before DeepEval is imported

import tempfile
from importlib import metadata

from deepeval.metrics import GEval
from deepeval.test_case import LLMTestCase, SingleTurnParams
from inspect_ai import Task, eval
from inspect_ai.dataset import Sample
from inspect_ai.model import ModelOutput, get_model
from inspect_ai.scorer import includes
from inspect_ai.solver import generate

from fake_judge import FakeJudge

print("deepeval", metadata.version("deepeval"), "| inspect-ai", metadata.version("inspect-ai"))

# DeepEval: a G-Eval metric whose judge is scripted (no model is called).
judge = FakeJudge(script={"ReasonScore": [{"reason": "Names the right plan.", "score": 9}]})
metric = GEval(name="Answer quality",
               evaluation_steps=["Check the answer names the plan in the expected output."],
               evaluation_params=[SingleTurnParams.ACTUAL_OUTPUT, SingleTurnParams.EXPECTED_OUTPUT],
               model=judge)
metric.measure(LLMTestCase(input="Which plan includes SSO?", actual_output="Team",
                           expected_output="Team"))
print("deepeval ok:", metric.score, metric.success)

# Inspect: one sample, one scripted reply from mockllm/model.
mock = get_model("mockllm/model", custom_outputs=[ModelOutput.from_content("mockllm", "Team")])
task = Task(dataset=[Sample(input="Which plan includes SSO?", target="Team")],
            solver=[generate()], scorer=includes())
with tempfile.TemporaryDirectory() as logs:
    log = eval(task, model=mock, log_dir=logs, display="none")[0]
print("inspect ok:", log.status, log.results.scores[0].metrics["accuracy"].value)
bash
uv run python check_track.py
Output · real, 26 November 2026, in eval-lab3 lines
deepeval 4.3.6 | inspect-ai 0.3.292
deepeval ok: 0.9 True
inspect ok: success 1.0

The script writes Inspect's log to a temporary directory, so it leaves nothing behind, and it reports both versions, which is a good first line for any bug report. Run it again after every upgrade.

6.7 What each fake can and cannot prove#

Claim Scripted DeepEval judge mockllm/model Needs a real model
The install and imports work yes yes no
My scorer or metric handles a malformed or empty output yes (script the bad output) yes (script the bad reply) no
The runner exits non-zero when a case fails yes (deepeval test run) partly: inspect eval exits 0 even when the eval fails; gate on the log (10B.12) no
The aggregation and report code is right yes yes no
I can read exactly what a built-in metric asks the judge yes (judge.prompt(i)) partly (model-graded scorers show the grading prompt in the log) no
The judge agrees with humans no no yes, and then validate with 10A.5
My prompt or app is good no no yes
Costs, latency and rate-limit behaviour no no yes

When you do add a key, the swap is small and the rest of this track shows where. In DeepEval you pass a real judge (GEval(..., model="gpt-6-luna") for OpenAI, or an AnthropicModel, the optional GeminiModel or a gateway for the others, 10B.3); in Inspect you change one string.

bash
# illustrative: each line needs the provider SDK and a key in .env
uv run inspect eval triage_task.py --model openai/gpt-6-luna
uv run inspect eval triage_task.py --model anthropic/claude-haiku-5-5
uv run inspect eval triage_task.py --model google/gemini-3.8-flash         # optional
uv run inspect eval triage_task.py --model openrouter/openai/gpt-6-luna    # optional

Example output (illustrative — your exact output will differ): one results panel per command, in the shape of the panel in 6.5, with that provider's real token counts and a real accuracy; nothing here was run, because each line needs a key.

6.8 The keyless smoke test in CI#

The "Can we test the eval harness in CI without an API key?" question from the top of the lesson has a short answer: yes, and it is the first job to add. check_track.py needs no secret, so it can run on every pull request, including pull requests from forks, which never see repository secrets. A minimal GitHub Actions job:

yaml
# .github/workflows/eval-smoke.yml: the keyless plumbing check (lesson 10B.1)
name: eval-smoke
on: [pull_request]
jobs:
  smoke:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    env:
      DEEPEVAL_TELEMETRY_OPT_OUT: "1"   # CI has no .env, so the switch goes here
      DEEPEVAL_DISABLE_DOTENV: "1"      # the job's variables are the whole configuration
    steps:
      - uses: actions/checkout@v7
      - uses: astral-sh/setup-uv@v10.4.0   # no moving major tag: pin an exact release
      - run: uv sync --locked               # fail if uv.lock no longer matches pyproject.toml
      - run: uv run python check_track.py

This workflow was not run here (it needs a GitHub repository); the action versions are the ones 10B.7, 2.7 read from their release pages on 26 November 2026. Three choices in it carry the lesson's rules. uv sync --locked installs what uv.lock records and fails if the lock no longer matches pyproject.toml, instead of quietly re-resolving to newer versions, so the CI run uses the versions you tested (--frozen, which 10B.7 uses, also installs from the lock but skips that staleness check). Both DeepEval variables live in the job, not in a file. And the script exits non-zero on any exception, so a broken import or a missing dependency turns the job red. What it cannot catch is a wrong number that is still a number: check_track.py proves plumbing only. The real gates come later: deepeval test run with thresholds (7.2, 10B.7, Part 2) and an Inspect gate that reads the log, because inspect eval exits 0 even when the eval failed (10B.12, Part 13).


Part 7: The triage eval, rebuilt in both packages and run keyless#

The fastest way to understand a framework is to run an eval you already understand through it. 10A.1, Part 6 built a ticket-triage eval in evalkit: twelve support tickets, one prompt, a deliberately imperfect fake model, and two scorers. 10A.10, Part 4 sketched it in three tools. This part runs it for real in both packages, with the same twelve tickets and the same twelve scripted replies, and then reconciles the numbers.

7.1 The fixture and the reference numbers#

The fixture, unchanged from 10A.1: a ticket comes in, the model must reply with a JSON object holding a priority (P1, P2, P3), a category (billing, technical, account, shipping, other) and a one-sentence summary. Two scorers judge each reply:

Scorer Question Value
format (gate 1) Is there a JSON object with exactly those three fields and valid values? pass or fail
labels (gate 2) Are the priority and category right, and is the summary present and under 25 words (or empty when the ticket is empty)? a third of a point for each of the three checks

The scripted replies are deliberately imperfect, so a correct harness should find exactly two problems: T02 (a login outage labelled P2|billing instead of P1|technical) and T11 (prose wrapped around an incomplete JSON fragment, so the format gate fails). Run evalkit's own version first, from the 10A.1 project (standard library only):

bash
python3 triage_eval.py | grep -E "^(eval|pass rate|failing)" | head -n 3
Output · real, 26 November 2026; 10A.1 files unchanged3 lines
eval: triage-v1   model: fake-triage-1   examples: 12   runs/example: 2
pass rate: 83.3%   mean score: 0.903   errors: 0   cache hits: 0
failing examples: T02, T11

83.3% pass rate, 0.903 mean score, failing examples T02 and T11. Those three facts are the reference. A pass here means every scorer passed on the example; the mean score averages the two scorers for each example and then averages the examples. Remember how they are defined, because the packages print different aggregates.

Before you read on, notice what "83.3%" means with twelve cases. This sample computes a 95% Wilson interval for the same proportion at three sizes, using only the standard library:

python
# wilson.py: how much does "10 of 12" tell you? A 95% Wilson interval, standard library only (lesson 10B.1)
from math import sqrt


def wilson(passed: int, n: int, z: float = 1.96) -> tuple[float, float]:
    p = passed / n
    denom = 1 + z * z / n
    centre = (p + z * z / (2 * n)) / denom
    half = z * sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / denom
    return centre - half, centre + half


for passed, n in [(10, 12), (50, 60), (500, 600)]:
    low, high = wilson(passed, n)
    print(f"{passed:>3} of {n:<3} = {passed / n:.1%}   95% interval {low:.1%} to {high:.1%}")
bash
python3 wilson.py
Output · real3 lines
 10 of 12  = 83.3%   95% interval 55.2% to 95.3%
 50 of 60  = 83.3%   95% interval 72.0% to 90.7%
500 of 600 = 83.3%   95% interval 80.1% to 86.1%

7.2 The DeepEval version#

DeepEval scores finished records, so the port has three parts: the data, two metrics and a runner. The data is the twelve tickets and twelve scripted replies, copied verbatim from the Inspect lesson's files into one module, triage_data.py (no package imports, so the DeepEval sample needs no Inspect install). Save the full module below in eval-lab; Part 7.3 shows a check that the copy is exact.

python
# triage_data.py: the twelve tickets and the scripted replies, shared by both packages (lesson 10B.1)
"""Copied verbatim from 10B.8's triage.py (TICKETS) and fake_triage.py (RESPONSES),
with the package imports removed, so the DeepEval sample needs no Inspect install."""
from __future__ import annotations

TICKETS: list[tuple[str, str, str, dict[str, str]]] = [
    ("T01", "Hi, I was charged twice for my pro plan this month and nobody has "
            "responded to my emails for days. This is really frustrating and I "
            "want my money back. Also is there any discount if I stay?",
     "P2|billing", {"intent": "billing", "edge": "multi-intent"}),
    ("T02", "Our whole team can't log in since this morning. Dashboard shows "
            "a 500 error on every page. We're losing sales every hour.",
     "P1|technical", {"intent": "technical", "edge": "outage"}),
    ("T03", "How do I add a second admin to our Team plan? The docs mention "
            "it but I can't find the button.",
     "P3|account", {"intent": "account", "edge": "how-to"}),
    ("T04", "I think someone hacked my account. I got a password-reset email "
            "I didn't request and now I see charges I don't recognise.",
     "P1|account", {"intent": "account", "edge": "security"}),
    ("T05", "When will my order ship? I ordered the standing desks two weeks "
            "ago and tracking hasn't updated.",
     "P2|shipping", {"intent": "shipping", "edge": "stale-tracking"}),
    ("T06", "Your mobile app crashes every time I open the reports tab on "
            "Android 15. I've reinstalled twice.",
     "P2|technical", {"intent": "technical", "edge": "bug-report"}),
    ("T07", "Thanks for the quick fix last week — everything works now. "
            "Just wanted to say the support was great.",
     "P3|other", {"intent": "other", "edge": "no-request"}),
    ("T08", "I want to downgrade from Team to Pro at the end of this billing "
            "cycle. Will I lose my historical data?",
     "P3|billing", {"intent": "billing", "edge": "downgrade"}),
    ("T09", "URGENT: all our API calls are returning 403 since your deploy "
            "last night. This is blocking our production launch tomorrow.",
     "P1|technical", {"intent": "technical", "edge": "outage"}),
    ("T10", "", "P3|other",
     {"intent": "other", "edge": "empty", "allow_empty_summary": "1"}),
    ("T11", "pls refnd my dupolicate charge on the pro plan, its the second "
            "time this month and support hasnt replied",
     "P2|billing", {"intent": "billing", "edge": "typos"}),
    ("T12", "Bonjour, je voudrais savoir si je peux exporter mes données "
            "avant de résilier mon abonnement Team. Merci!",
     "P3|account", {"intent": "account", "edge": "non-english"}),
]

RESPONSES = {
    "T01": '{"priority": "P2", "category": "billing", "summary": "Duplicate Pro charge, refund requested."}',
    "T02": '{"priority": "P2", "category": "billing", "summary": "Login outage reported."}',  # wrong on purpose
    "T03": '{"priority": "P3", "category": "account", "summary": "How to add a second admin."}',
    "T04": '{"priority": "P1", "category": "account", "summary": "Suspected account takeover."}',
    "T05": '{"priority": "P2", "category": "shipping", "summary": "Order tracking stale two weeks."}',
    "T06": '{"priority": "P2", "category": "technical", "summary": "App crashes on reports tab."}',
    "T07": '{"priority": "P3", "category": "other", "summary": "Customer thank-you, no request."}',
    "T08": '{"priority": "P3", "category": "billing", "summary": "Downgrade and data-retention question."}',
    "T09": '{"priority": "P1", "category": "technical", "summary": "API 403s blocking launch."}',
    "T10": '{"priority": "P3", "category": "other", "summary": ""}',
    # prose wrapping an incomplete JSON fragment: a format failure on purpose
    "T11": 'Sure! This looks like a billing issue, I would mark it P2. '
           'Here is the JSON you asked for: {"priority": "P2"}',
    "T12": '{"priority": "P3", "category": "account", "summary": "Data export before cancelling Team plan."}',
}

The metrics are evalkit's two scorers written as BaseMetric subclasses, plus a third, judge-based metric to show how an LLM metric slots in. The first two need no judge. The third is a G-Eval metric ("is the summary useful to the on-call engineer?") whose judge is the scripted FakeJudge of 6.2: the judge answers each case by finding the case's reply in the prompt, and its scores are scripted, so they demonstrate the mechanics (one judge call per case) and say nothing about how a real judge would score summaries. Save this as triage_metrics.py:

python
# triage_metrics.py: evalkit's two triage scorers as DeepEval metrics, plus a scripted G-Eval (lesson 10B.1)
"""The format gate and the label check from 10A.1, written as BaseMetric subclasses
(no judge, no key), and a G-Eval summary metric whose judge is the shared FakeJudge."""
from __future__ import annotations

import json
import re

from deepeval.metrics import BaseMetric, GEval
from deepeval.test_case import LLMTestCase, SingleTurnParams

from fake_judge import FakeJudge
from triage_data import RESPONSES

CATEGORIES = {"billing", "technical", "account", "shipping", "other"}
PRIORITIES = {"P1", "P2", "P3"}


def parse_json(text: str) -> dict | None:
    """The tolerant extractor from 10A.1: strip fences, take the first {...}."""
    fence = chr(96) * 3                       # three backticks, built so this file stays readable
    text = re.sub(fence + r"\s*(?:json)?", "", text, flags=re.IGNORECASE)
    found = re.search(r"\{.*\}", text, re.DOTALL)
    if not found:
        return None
    try:
        obj = json.loads(found.group(0))
    except json.JSONDecodeError:
        return None
    return obj if isinstance(obj, dict) else None


class TriageFormat(BaseMetric):
    """Gate 1, the contract: a JSON object with exactly the three valid fields."""

    def __init__(self, threshold: float = 1.0):
        self.threshold = threshold            # same name as the argument (the copy rule, 10B.2)

    def measure(self, test_case: LLMTestCase, *args, **kwargs) -> float:
        obj = parse_json(test_case.actual_output or "")
        problems = []
        if obj is None:
            problems.append("no JSON object found")
        else:
            if set(obj) != {"priority", "category", "summary"}:
                problems.append(f"keys={sorted(obj)}")
            if obj.get("priority") not in PRIORITIES:
                problems.append(f"priority={obj.get('priority')!r}")
            if obj.get("category") not in CATEGORIES:
                problems.append(f"category={obj.get('category')!r}")
            if not isinstance(obj.get("summary"), str):
                problems.append("summary not a string")
        self.score = 0.0 if problems else 1.0
        self.reason = "; ".join(problems) or "ok"
        self.success = self.is_successful()
        return self.score

    async def a_measure(self, test_case: LLMTestCase, *args, **kwargs) -> float:
        return self.measure(test_case)

    @property
    def __name__(self):
        return "Triage Format"


class TriageLabels(BaseMetric):
    """Gate 2, correctness with partial credit: priority, category and summary are a third each."""

    def __init__(self, threshold: float = 1.0):
        self.threshold = threshold

    def measure(self, test_case: LLMTestCase, *args, **kwargs) -> float:
        obj = parse_json(test_case.actual_output or "")
        if obj is None:
            self.score, self.reason = 0.0, "unparseable output"
        else:
            want_priority, want_category = (test_case.expected_output or "").split("|")
            allow_empty = (test_case.metadata or {}).get("allow_empty_summary") == "1"
            summary = obj.get("summary", "")
            checks = {
                "priority": obj.get("priority") == want_priority,
                "category": obj.get("category") == want_category,
                "summary": ((summary == "" and allow_empty)
                            or (isinstance(summary, str) and 0 < len(summary.split()) < 25)),
            }
            wrong = [name for name, ok in checks.items() if not ok]
            self.score = sum(checks.values()) / len(checks)
            self.reason = "ok" if not wrong else f"wrong: {', '.join(wrong)}"
        self.success = self.is_successful()
        return self.score

    async def a_measure(self, test_case: LLMTestCase, *args, **kwargs) -> float:
        return self.measure(test_case)

    @property
    def __name__(self):
        return "Triage Labels"


def summary_metric() -> GEval:
    """A G-Eval 'is the summary useful to the on-call engineer?' metric on the scripted judge.

    The judge answers per case by finding the case's reply in the prompt. The scores are
    scripted, so they show the MECHANICS (one judge call per case) and not the quality of any
    real judge."""
    scripted = {"T02": (4, "Calls it a login outage, but the ticket reports a 500 on every page."),
                "T11": (2, "No summary at all: the reply is prose around a JSON fragment.")}
    routes = []
    for tid, reply in RESPONSES.items():
        score, reason = scripted.get(tid, (9, "Names the concrete issue in one sentence."))
        routes.append((reply, {"reason": reason, "score": score}))
    judge = FakeJudge(routes={"ReasonScore": routes})
    return GEval(
        name="Summary usefulness",
        evaluation_steps=["Check the summary names the concrete issue.",
                          "Penalize a summary that is missing or contradicts the ticket."],
        evaluation_params=[SingleTurnParams.INPUT, SingleTurnParams.ACTUAL_OUTPUT],
        model=judge,
    )

Three things to notice, because they recur in every DeepEval metric you write (10B.2, Part 3). Both metrics set self.threshold, because without a threshold success is never computed. Both store the constructor argument under its own name (threshold), because the runners rebuild metrics from those attributes for each case (10B.2, 4.5). And __name__ is a property, which is how the metric appears in results. The format metric is binary (threshold 1.0), and the labels metric uses partial credit but the same threshold, 1.0, so a case passes only when all three label checks pass, matching evalkit's rule.

The runner builds the test cases (running your app first, here a scripted function), hands them to evaluate(), and recomputes evalkit's headline numbers from the per-case results. Save it as triage_deepeval.py:

python
# triage_deepeval.py: the ticket-triage eval of 10A.1, rebuilt in DeepEval and run keyless (lesson 10B.1)
import os

os.environ.setdefault("DEEPEVAL_TELEMETRY_OPT_OUT", "1")

from deepeval import evaluate
from deepeval.evaluate import DisplayConfig
from deepeval.test_case import LLMTestCase

from triage_data import RESPONSES, TICKETS
from triage_metrics import TriageFormat, TriageLabels, summary_metric


def scripted_app(ticket_id: str) -> str:
    """Stands in for your app (a model call). Real code would call the model here."""
    return RESPONSES[ticket_id]


def triage_cases() -> list[LLMTestCase]:
    # DeepEval scores FINISHED records: run the app first, then wrap input and output.
    return [LLMTestCase(name=tid, input=text, actual_output=scripted_app(tid),
                        expected_output=ref, metadata=meta)
            for tid, text, ref, meta in TICKETS]


if __name__ == "__main__":
    result = evaluate(
        test_cases=triage_cases(),
        metrics=[TriageFormat(), TriageLabels(), summary_metric()],
        display_config=DisplayConfig(print_results=False, show_indicator=False),
    )
    results = sorted(result.test_results, key=lambda t: t.index)
    print("cases:", len(results))
    for tr in results:
        by_name = {md.name: md for md in tr.metrics_data}
        fmt, lab = by_name["Triage Format"], by_name["Triage Labels"]
        note = "" if lab.score == 1 else f"  labels: {lab.reason}"
        if not fmt.success:
            note += f"  | format: {fmt.reason}"
        print(f"{tr.name}  success={str(tr.success):5}  format={fmt.score:.1f}  "
              f"labels={lab.score:.3f}{note}")

    # per-metric means: the numbers Inspect prints as accuracy and mean
    for name in ("Triage Format", "Triage Labels"):
        scores = [md.score for tr in results for md in tr.metrics_data if md.name == name]
        print(f"{name:14} mean={sum(scores) / len(scores):.3f}  passed={sum(x == 1.0 for x in scores)}/{len(scores)}")

    # evalkit's headline numbers, recomputed from the same per-case scores
    passed = [tr.success for tr in results]
    per_row = []
    for tr in results:
        by_name = {md.name: md.score for md in tr.metrics_data}
        per_row.append((by_name["Triage Format"] + by_name["Triage Labels"]) / 2)
    print(f"\nevalkit-style pass rate: {sum(passed) / len(results):.1%}"
          f"   mean score: {sum(per_row) / len(results):.3f}")
bash
uv run python triage_deepeval.py
Output · real, 26 November 2026; DeepEval banner included35 lines
⚠ WARNING: No hyperparameters logged.
» Log hyperparameters to attribute prompts and models to your test runs.

================================================================================


✓ Evaluation completed 🎉! (time taken: 0.03s | token cost: None)
» Test Results (12 total tests):
   » Pass Rate: 83.33% | Passed: 10 | Failed: 2

 ===============================================================================
= 

» Want to share evals with your team, or a place for your test cases to live? ❤️
🏡
  » Run 'deepeval view' to analyze and save testing results on Confident AI.


cases: 12
T01  success=True   format=1.0  labels=1.000
T02  success=False  format=1.0  labels=0.333  labels: wrong: priority, category
T03  success=True   format=1.0  labels=1.000
T04  success=True   format=1.0  labels=1.000
T05  success=True   format=1.0  labels=1.000
T06  success=True   format=1.0  labels=1.000
T07  success=True   format=1.0  labels=1.000
T08  success=True   format=1.0  labels=1.000
T09  success=True   format=1.0  labels=1.000
T10  success=True   format=1.0  labels=1.000
T11  success=False  format=0.0  labels=0.333  labels: wrong: category, summary  | format: keys=['priority']; category=None; summary not a string
T12  success=True   format=1.0  labels=1.000
Triage Format  mean=0.917  passed=11/12
Triage Labels  mean=0.889  passed=10/12

evalkit-style pass rate: 83.3%   mean score: 0.903

Read it as a reviewer would. The runner's own summary says 83.33% pass rate, 10 passed, 2 failed. The per-case lines show the two failures and why they fail: T02 loses two of three label checks (priority and category), and T11 fails the format gate (keys=['priority']; category=None; summary not a string) and the label check. The per-metric means are 0.917 for format (11 of 12) and 0.889 for labels (10 of 12 fully correct), and the recomputed evalkit-style numbers are 83.3% and 0.903, equal to the reference to the digit.

DeepEval's home ground is the pytest form, and the same cases and metrics run as a test file. Save this as test_triage_deepeval.py:

python
# test_triage_deepeval.py: the same triage eval as a pytest file for `deepeval test run` (lesson 10B.1)
import os

os.environ.setdefault("DEEPEVAL_TELEMETRY_OPT_OUT", "1")

import pytest
from deepeval import assert_test

from triage_deepeval import triage_cases
from triage_metrics import TriageFormat, TriageLabels, summary_metric


@pytest.mark.parametrize("case", triage_cases(), ids=lambda c: c.name)
def test_triage(case):
    # A failing metric raises AssertionError, so this test fails and pytest exits 1.
    assert_test(case, [TriageFormat(), TriageLabels(), summary_metric()])
bash
uv run deepeval test run test_triage_deepeval.py -n 1 --color no > run.txt 2>&1; echo "exit code: $?"
tail -n 12 run.txt
grep -E "^FAILED|failed, " run.txt
Output · real, 28 November 2026; everything the three commands print16 lines
exit code: 1
✓ Evaluation completed 🎉! (time taken: 1.18s | token cost: None)
» Test Results (12 total tests):
   » Pass Rate: 83.33% | Passed: 10 | Failed: 2

 ===============================================================================
= 

» Want to share evals with your team, or a place for your test cases to live? ❤️
🏡
  » Run 'deepeval view' to analyze and save testing results on Confident AI.


FAILED test_triage_deepeval.py::test_triage[T02] - AssertionError: Metrics: T...
FAILED test_triage_deepeval.py::test_triage[T11] - AssertionError: Metrics: T...
2 failed, 10 passed, 4 warnings in 1.05s

Exit code 1 is the point: two of the twelve parametrized tests raised AssertionError, so the command fails and CI goes red, exactly what a gate should do. The last three lines are pytest's own summary, and they name the failing tests by their ids, T02 and T11, which is why the test file passes ids=lambda c: c.name. (2>&1 sends everything to the file, including a pytest-asyncio deprecation warning from DeepEval's dependencies, which is harmless here and would otherwise print the path of your virtual environment to the terminal; the no after the colour flag keeps terminal colour codes out of the file so grep works; -n 1 runs one pytest-xdist worker; 10B.2, Part 5 lists every flag.)

The full reason for each failure is in run.txt, on the line pytest marks with E. The first one is T02's:

bash
grep -m1 -E "^E +AssertionError" run.txt
Output · real, 28 November 20261 line
E               AssertionError: Metrics: Triage Labels (score: 0.3333333333333333, threshold: 1.0, strict: False, error: None, reason: wrong: priority, category), Summary usefulness [GEval] (score: 0.4, threshold: 0.5, strict: False, error: None, reason: Calls it a login outage, but the ticket reports a 500 on every page.) failed.

Two things in that line are worth knowing on day one. The message lists every metric that failed for the case, with its score, threshold and reason, so a CI log alone tells a reviewer why the case failed. And the scripted G-Eval metric failed T02 too, at 0.4 against a threshold of 0.5, which is G-Eval's default because summary_metric() set none: a built-in metric you construct without a threshold still gates, at a line someone else chose (10B.3, Part 4 covers G-Eval's scale and thresholds). What it does not tell you is the one thing the evalkit gate did: how far a failure is from the line. A DeepEval gate is per case; a suite-level rule ("fail if the pass rate drops more than three points against the baseline") is code you write over the saved results.

7.3 The Inspect version#

Inspect runs the app itself, so the port is a task: a dataset of Samples, a solver chain that renders the prompt and calls the model, and the same two scorers as @scorer functions. The three files that do this are exactly 10B.8, Part 4's, copied unchanged: triage.py (the task, the data and the scorers), fake_triage.py (the scripted replies, as a function for mockllm/model keyed on the ticket text so it stays correct when Inspect runs samples concurrently), and triage_scripted.py, which attaches the scripted model to the task:

python
# triage_scripted.py: the triage task with the scripted model as its default (lesson 10B.8)
from inspect_ai import Task, task, task_with

from fake_triage import scripted_model
from triage import triage


@task
def triage_scripted() -> Task:
    # task_with() edits the Task it is given (in place) and returns it.
    # A model set on the Task is used even when --model is given (see 5.6).
    return task_with(triage(), model=scripted_model(), name="triage_scripted")

Because the data lives in both packages' samples, a check keeps the copies honest. This script, run in inspect-lab/, compares triage_data.py against the Inspect files:

python
# check_data.py: is triage_data.py really a verbatim copy of 10B.8's data? (lesson 10B.1)
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent.parent))   # the folder with triage_data.py

import triage_data
from fake_triage import RESPONSES
from triage import TICKETS

print("tickets equal  :", triage_data.TICKETS == TICKETS, f"({len(TICKETS)} tickets)")
print("responses equal:", triage_data.RESPONSES == RESPONSES, f"({len(RESPONSES)} replies)")
Output · real, 26 November 20262 lines
tickets equal  : True (12 tickets)
responses equal: True (12 replies)

Now run the task from a folder that is a git repository (5.6):

bash
uv run inspect eval triage_scripted.py --display plain --log-dir logs-triage
Output · real, 26 November 2026; log file name truncated22 lines
Monitor from another shell: inspect ctl task list   (inspect ctl --help)
Running 1 tasks...
---------------------------------------------------------
triage_scripted (12 samples): mockllm/model              
dataset: (samples)                                       
---------------------------------------------------------
                                                         
generate     | Steps:  12/12 100% | Samples:  12/ 12 | accuracy:  n/a | mockllm:  0/20 | HTTP retries: 0

---------------------------------------------------------                       
triage_scripted (12 samples): mockllm/model                                     
dataset: (samples)                                                              
                                                                                
total time:             0:00:00                                                 
mockllm/model           4,375 tokens [I: 3,343, O: 1,032]                       
triage_format         triage_labels                                             
accuracy       0.917  mean           0.889                                      
stderr         0.083  stderr         0.075                                      
Log:                                                                            
logs-triage/2026-11-26T02-16-46-00-00_triage-scripted_ThCRXqdaViuLo8Nv4WDw84.ev…
---------------------------------------------------------                       
                                                                                

Inspect prints two scorers, each with its own metrics: triage_format has accuracy 0.917 (standard error 0.083) and triage_labels has a mean of 0.889 (standard error 0.075). There is no single pass rate, because Inspect treats each scorer independently. To compare with evalkit, read the log back and compute it. This script lists the newest log in logs-triage, reads it and recomputes the headline numbers:

python
# parity_inspect.py: read the triage log and recompute evalkit's headline numbers (lesson 10B.1)
from inspect_ai.log import list_eval_logs, read_eval_log
from inspect_ai.scorer import CORRECT

info = list_eval_logs("logs-triage")[0]                  # newest first
log = read_eval_log(info.name)
print("status:", log.status, "| samples:", len(log.samples))
for s in log.results.scores:
    print(f"{s.name:14}", {k: round(m.value, 3) for k, m in s.metrics.items()})
rows = [(s.scores["triage_format"].value, s.scores["triage_labels"].value) for s in log.samples]
failing = [s.id for s in log.samples
           if s.scores["triage_format"].value != CORRECT or s.scores["triage_labels"].value != 1.0]
per_row = [((1.0 if f == CORRECT else 0.0) + lab) / 2 for f, lab in rows]
print("failing:", failing)
print(f"evalkit-style pass rate: {1 - len(failing) / len(rows):.1%}   "
      f"mean score: {sum(per_row) / len(rows):.3f}")
bash
uv run python parity_inspect.py
Output · real, 26 November 20265 lines
status: success | samples: 12
triage_format  {'accuracy': 0.917, 'stderr': 0.083}
triage_labels  {'mean': 0.889, 'stderr': 0.075}
failing: ['T02', 'T11']
evalkit-style pass rate: 83.3%   mean score: 0.903

The recomputed numbers are the same again: failing samples T02 and T11, pass rate 83.3%, mean score 0.903.

7.4 Reconciling the three numbers#

What was measured evalkit DeepEval Inspect AI
Failing cases T02, T11 T02, T11 T02, T11 (read from the log)
Share of cases where every check passed 83.3% (printed) 83.33% (printed) 83.3% (computed; not printed)
The format check alone in the report detail mean 0.917 (11 of 12), computed accuracy 0.917, stderr 0.083 (printed)
The labels check alone in the report detail mean 0.889 (10 of 12 fully correct), computed mean 0.889, stderr 0.075 (printed)
Mean of the two scorers per case, then over cases 0.903 (printed) 0.903 (computed) 0.903 (computed)
Files left behind triage_results.jsonl .deepeval/ JSON files in the folder you ran from one .eval log (about 44 KB) in logs-triage/
Code you wrote about 245 lines plus the 391-line core.py 119 lines of metrics plus 55 of runner and 16 of tests 187 lines of task and scorers, 44 of fakes, 12 to attach the fake

Four lessons come out of a table in which every cell agrees.

  1. Reconcile cases before aggregates. When two harnesses disagree, compare the set of failing cases first. The set agreed here, so any difference in a headline number is a difference of definition, never of data. That is the first thing to check whenever a DeepEval number and an Inspect number for "the same eval" differ.
  2. A headline number has a definition, and each tool prints a different one. Inspect prints per-scorer accuracy and mean; DeepEval prints a per-case pass rate plus per-metric detail; evalkit prints both a pass rate and a mean of means. All three are valid, and all three can be reproduced from the per-case scores, which is why 10B.2, 10.1 and 10B.10, Part 10 both start with "name the number".
  3. A new metric must earn its place by changing something. The third DeepEval metric here (the scripted G-Eval summary check) fails the same two cases the other metrics fail, so it changed no pass rate. That is by construction, since we scripted it, but the habit is real: when you add a metric to a suite, list the cases it fails that the others did not, and read those. A metric that never disagrees with the cheap ones adds cost, not information.
  4. Same data and fakes do not make the harnesses interchangeable. The Inspect run reports a standard error and keeps every message in a log; the DeepEval run gives a pass/fail per case and a reason per metric and a CI exit code; evalkit gives slices and intervals you wrote. Choose by the questions you need to answer (Part 8), not by the number.

One cell of the table hides a difference worth noticing. evalkit's banner in 7.1 says runs/example: 2: it ran every ticket twice, and its pass rate is the share of the 24 (example, run) rows that passed, while its failing list names any example with at least one failed run. DeepEval and Inspect ran each case once. With a deterministic fake both runs are identical, which is why the numbers agree. With a real model they would not: two runs per case is evalkit's repeats=2, Inspect's epochs=2 with a reducer, and in DeepEval a separate test per repeat (-r 2), and the three aggregate repeats differently (4.2, "Epoch"). Match the repeat policy before you compare numbers from a real model.

When parity fails, the cause is almost always one of a short list. Check them in this order, because the early ones are the most common and the cheapest to rule out.

Suspect What it looks like How to confirm
A field lost in the port (metadata, a reference, a context list) Extra failing cases that share a property, such as the empty ticket Diff the failing sets; print one test case or sample from each harness side by side
A different parser Format failures on replies with fences, prose or trailing text Run both parsers on the failing replies alone
A different threshold or comparison Cases at exactly the line flip (DeepEval passes on score >= threshold) List the scores of the flipped cases next to each threshold
Errors counted differently One harness has fewer cases in its denominator Count errored and unscored cases per harness (10B.2, Part 4, 10B.10, Part 4)
A different repeat or reduction policy Same failing set on a fake, different numbers on a real model Compare repeats, epochs and the reducer
A different aggregate Same failing set, different headline Recompute each headline from per-case scores (7.4, lesson 2)

Here is the first suspect caught in the act. This sample runs the DeepEval port twice, once faithfully and once with a one-field bug, the test cases built without their metadata, and diffs each failing set against evalkit's. Save it in eval-lab next to the Part 7 files:

python
# parity_bug.py: a port that drops one field, caught by diffing failing cases (lesson 10B.1)
import os

os.environ.setdefault("DEEPEVAL_TELEMETRY_OPT_OUT", "1")

from deepeval import evaluate
from deepeval.evaluate import DisplayConfig
from deepeval.test_case import LLMTestCase

from triage_data import RESPONSES, TICKETS
from triage_metrics import TriageFormat, TriageLabels

REFERENCE = {"T02", "T11"}            # evalkit's failing examples, from 7.1


def failing(keep_metadata: bool) -> set[str]:
    cases = [LLMTestCase(name=tid, input=text, actual_output=RESPONSES[tid], expected_output=ref,
                         metadata=meta if keep_metadata else None)   # the bug: metadata dropped
             for tid, text, ref, meta in TICKETS]
    result = evaluate(test_cases=cases, metrics=[TriageFormat(), TriageLabels()],
                      display_config=DisplayConfig(print_results=False, show_indicator=False))
    return {tr.name for tr in result.test_results if not tr.success}


for label, keep in [("faithful port", True), ("port without metadata", False)]:
    got = failing(keep)
    print(f"{label:22} pass {12 - len(got)}/12  failing {sorted(got)}  "
          f"new {sorted(got - REFERENCE)}  missing {sorted(REFERENCE - got)}")
bash
uv run python parity_bug.py | grep -E "^(faithful|port)"
Output · real, 28 November 2026; DeepEval's banners filtered out by grep2 lines
faithful port          pass 10/12  failing ['T02', 'T11']  new []  missing []
port without metadata  pass 9/12  failing ['T02', 'T10', 'T11']  new ['T10']  missing []

The aggregate says something is off (9 of 12 instead of 10 of 12), and the case diff says exactly what: one new failure, T10, the empty ticket. T10 passes only because its metadata carries allow_empty_summary; drop the metadata and the label check marks its empty summary wrong. That is the whole method in miniature: an aggregate tells you that two harnesses disagree, the failing-set diff tells you where, and reading the one new case tells you why.

7.5 What to take from the port#

Question Honest answer
Was the port hard? No. In DeepEval it was two small classes and a runner; in Inspect it was a task file that the Inspect lesson explains line by line
Did the framework find anything evalkit missed? Not on this fixture, by design. On real data the gains come from the things around the scorers: the viewer, the logs, the CI integration, the ready-made metrics, the concurrency
What did the frameworks add that you can see? DeepEval: a table with per-metric reasons, a pytest exit code, and a judge metric slot. Inspect: a log with every message, token counts, a git revision, standard errors
What did the frameworks not add? Slices by ticket type, intervals on a 12-case pass rate, any statement about whether the judge is right. Those are evalkit's and 10A.5's, which is why it stays in the project
Which numbers would you put in a report? The failing cases and their reasons first, then a pass rate with an interval, and the definition of every number, as in 10A.10, 7.1

Part 8: Choosing, and the roadmap of the track#

8.1 The decision table#

10B.17 compares the two packages on every axis once you know both. This table is the short version for deciding where to start, and for deciding that you do not need either.

Your situation Start with Why Add later if
A product feature (support bot, docs_qa RAG app, an extraction pipeline), single-turn, evals should gate pull requests DeepEval Metric objects with thresholds, assert_test() in pytest, ready-made RAG and safety metrics, a clean red or green exit code You need agent transcripts, many models or benchmarks: add Inspect
An agent with tools, multi-turn behaviour, code execution or a sandbox Inspect The solver is the agent; tools, limits, approvals and a transcript viewer are built in You want pytest-style metric assertions on top: add DeepEval metrics, or write the checks as scorers
Comparing many models or prompt variants on the same tasks, reproducibly Inspect One task file, many models, logs with provenance, resumable eval sets You need a hosted comparison UI: a platform over the logs
Running public benchmarks Inspect with Inspect Evals Hundreds of ready-made tasks You need custom variants: copy the task into your own repository
RAG quality: faithfulness, answer relevancy, context precision and recall DeepEval (and validate the judge first) The metrics exist, with documented prompts you can read; Inspect has none Inspect for the agentic parts of a RAG agent
Red teaming your own app DeepEval 4.3.6 red teaming, with legacy DeepTeam only for migration (10B.7) A purpose-built module with benign-by-default examples; 10B.7 compares the two routes, and Module 12 owns the depth Inspect for long-horizon behaviour audits
A research-style safety or capability evaluation Inspect It was built for exactly this DeepEval is not needed
One small eval, one author, no CI evalkit (or a script) The setup costs more than the 200 lines you have Adopt a framework when a second author or CI appears
A regulated or audited metric you must explain line by line evalkit or custom metrics and scorers No built-in prompt between you and the number Use a framework as the runner only
You already live in a platform (LangSmith, Braintrust, Langfuse, Phoenix) That platform's SDK It has datasets, evaluators and a runner already DeepEval or Inspect as a library inside it
A config-file CI gate in any language, fast promptfoo (10A.10) YAML and a CLI, 60-plus providers A Python framework when checks outgrow YAML
Both product behaviour and agent studies Both, with clear ownership DeepEval for the PR gate, Inspect for studies and benchmarks 10B.17 shows how to share definitions
flowchart TD
    Q1{"Do you need agents with tools,<br/>sandboxes or long transcripts?"}
    Q1 -- yes --> INS["Inspect first"]
    Q1 -- no --> Q2{"Does your team want evals<br/>as pytest tests with thresholds?"}
    Q2 -- yes --> DEV["DeepEval first"]
    Q2 -- no --> Q3{"Is it one small eval<br/>that you can fully define yourself?"}
    Q3 -- yes --> EVK["Stay on evalkit,<br/>revisit when it hurts"]
    Q3 -- no --> Q4{"Need many models, reproducible logs,<br/>public benchmarks?"}
    Q4 -- yes --> INS
    Q4 -- no --> DEV
    INS --> BOTH["Add the other package later<br/>only for a gap you can name"]
    DEV --> BOTH

8.2 Seven questions before you adopt either#

  1. What decision will the number drive? (merge a pull request, pick a model, ship a prompt, prove a safety claim). The decision sets how strict the definitions and statistics must be.
  2. Who will read the results? Engineers in pytest output, reviewers in a log viewer, or non-engineers in a hosted UI?
  3. Is the thing under test a single call, a pipeline or an agent? The more steps and tools, the more Inspect's solver and transcript model pays off.
  4. Can you define "correct" with code? If most checks can be deterministic, the framework matters less and evalkit-style scorers carry the weight; if most need a judge, you need validation (10A.5) whatever you adopt.
  5. Where may data go? Telemetry, uploads and judge calls to hosted models all have data-handling consequences (5.7).
  6. What is your upgrade policy? Both packages move fast; can you pin, test an upgrade on a frozen fake and read changelogs?
  7. What is the exit path? Keep datasets, rubrics and thresholds as plain files, so that moving to the other package or back to evalkit is a port, not a rewrite.

8.3 Where the other tools fit#

10A.10, Part 2 lists the landscape with versions and licences. In one line each, relative to this track:

Tool Relation to DeepEval and Inspect
promptfoo A YAML CLI gate; overlaps DeepEval's CI role with less Python; also red-teams
Ragas A RAG-metrics library; DeepEval wraps some of its metrics (10B.4); the 10A.10 note about its activity applies
TruLens, Giskard Python libraries in DeepEval's neighbourhood (feedback functions; scanning and test suites)
LangSmith and openevals A platform plus evaluator library for LangChain shops (11A.5); coexists with either
Braintrust, Langfuse, Phoenix, MLflow, Weave, Opik Platforms: UI, storage and online evaluation that sit over logs from either package
lm-evaluation-harness, HELM, Lighteval Benchmark runners; Inspect Evals overlaps for public benchmarks
OpenAI Evals (hosted) Shutting down on 30 November 2026 per 10A.10; do not build on it

8.4 The roadmap of lessons 10B.2 to 10B.18#

The track has two branches that meet at the end, and they are not equal: DeepEval (10B.2 to 10B.7) is mandatory and Inspect AI (10B.8 to 10B.16) is optional, as is 10B.17, which compares the two and needs the Inspect lessons. 10B.18 is mandatory for its DeepEval parts and optional for its Inspect parts. A learner who skips Inspect goes from 10B.7 straight to 10B.18. Each lesson opens with the same mapping to evalkit and closes with the same kind of methodology: how to defend the numbers.

Lesson Teaches You leave able to
10B.2 What installing DeepEval changes (telemetry, .env loading, files on disk); LLMTestCase and ConversationalTestCase; the metric object contract; evaluate() and the metric-copy rule; assert_test() and deepeval test run; caching and local results; the CLI and configuration; the complete evalkit mapping; pitfalls reproduced Write a keyless DeepEval suite, run it in code and in pytest, and defend its pass rate (Part 10)
10B.3 The judge inside every metric; choosing a judge model (set-*, --save=dotenv, the set-ollama trap); your own DeepEvalBaseLLM; G-Eval in depth (its two prompts, the 0 to 10 scale, log-probability weighting, strict mode); conversational G-Eval and ArenaGEval; custom BaseMetric and BaseConversationalMetric; DAGMetric; Expectations checklists; eval modes, Jev and classifiers Pick the right judge construct for a check and validate it against human labels with evalkit (Part 10)
10B.4 How a built-in metric works (decompose, verdict, formula); the RAG metrics; task-quality metrics; the safety metrics and the 4.2.0 direction flip; metrics that make no judge call; conversation metrics; multimodal, voice, MCP and agent metrics; cost, latency and variance per case Read the prompt and formula behind any built-in score and decide whether to trust it (Part 9)
10B.5 Traces, spans and the three scopes of evaluation; @observe and filling test-case data at runtime; evals_iterator and async runs; local tracing, privacy and OpenTelemetry; component-level design; what trace-aware judges see; task completion, step efficiency and plan metrics; tool-centred metrics and loop detection; multi-turn agent metrics; MCP metrics; multi-agent systems and framework integrations Instrument an app or agent, evaluate it span by span, and defend an agent metric (Part 14)
10B.6 Goldens and EvaluationDataset; the Synthesizer opened up (from documents, contexts, scratch and goldens, single- and multi-turn); making synthetic goldens trustworthy; the ConversationSimulator and validating it before you trust it; public benchmarks in deepeval.benchmarks Build, synthesize and validate an eval dataset, and choose between real, synthetic and simulated data (Part 10)
10B.7 Red teaming inside DeepEval 4.3.6 (deepeval.red_team, RedTeamer, multi-turn attacks, AgenticRedTeamer, guardrails, the deepeval red-team CLI and YAML) and the DeepTeam migration; DeepEval in CI/CD (the pytest plugin, a keyless suite, gates the summary table misses, a GitHub Actions workflow, regressions); integrations; prompts and prompt optimization; Confident AI at survey level; a production checklist Run a benign red-team pass on your own app and put DeepEval in CI with a gate you trust (Part 6)
10B.8 (optional) What Inspect is; Task = Dataset + Solver + Scorer; install and a first keyless run; the triage eval rebuilt in Inspect; inspect eval and eval(); where logs go and Inspect View; reading the log in Python; the complete evalkit mapping; first-day pitfalls reproduced Run, read and defend a first Inspect eval (Part 10)
10B.9 (optional) The life of one sample; Sample fields; dataset loaders; selecting, shuffling and multiple-choice data; the solver protocol and TaskState; the built-in solvers and writing your own; task configuration; the triage task rebuilt properly Make a dataset and solver chain you can defend (Part 10)
10B.10 (optional) The scoring pipeline; the scorer contract and value types; the built-in scorers opened up; the scoring policy (verdict, error, unscored); custom scorers; metric formulas; epochs and reducers; the statistics Inspect reports (standard errors, clustering) and the ones it does not Say exactly what an Inspect accuracy or mean means and how uncertain it is (Part 10)
10B.11 (optional) The grader as part of the instrument; model_graded_qa() and model_graded_fact(); how a grader reply becomes a grade; templates and criteria; choosing the grader; panels; grading text the model under test controls (the nonce-coded markers); reproducibility, caching and cost; your own judge scorer; validating the grader Use a model grader and prove it agrees with people (Part 10)
10B.12 (optional) Models and providers; GenerateConfig; concurrency; model-call retries and timeouts; the response cache; batch mode; the sample error policy; eval_retry and crash recovery; logging options; eval sets; early stopping; a CI gate that cannot go green on a broken eval Run a real, multi-model eval that survives errors, and gate CI on it (Part 13)
10B.13 (optional) The analysis workflow; log formats and storage; the EvalLog schema level by level; events (the transcript in code); reading logs efficiently; writing, converting and editing logs; Inspect View for teams; dataframes; analysis recipes; extending Inspect (registry and entry points, a custom model provider, hooks) Turn logs into a decision, and extend Inspect without forking it (Part 11)
10B.14 (optional) The tool execution model; custom tools with @tool; adapting tools; the standard tool catalogue; MCP tools; the agent protocol; react() parameter by parameter; custom agents; multi-agent systems (handoffs, agents as tools, workflows); grading agent runs Give a model tools, build an agent or a team of agents, and grade what it did (Part 10)
10B.15 (optional) The control surface around an agent; the sandbox threat model; the sandbox() API and per-sample setup; Docker and the other sandbox providers; scoring a sandbox's final state; limits; tool approval; tool result review; long-horizon and external agents (inspect-swe) Run an agent safely under budgets and approvals, and defend a number from a controlled run (Part 12)
10B.16 (optional) The agent evaluation contract; trajectory from events and outcome from final state; reliability (epochs, pass@k and pass^k); budgets and baselines; transcript auditing with Scout; adversarial models; Inspect Evals, Harbor, Viz, Petri and Cyber; the sandbox and operations packages (Flow and others); governance Evaluate an agent end to end and choose ecosystem packages on evidence (Part 17)
10B.17 (optional) How to compare frameworks fairly; the two packages on every axis; the same three evals in both; combining them; migrating; patterns and anti-patterns; a pitfalls checklist for 10B.2 to 10B.16; the decision table and the other tools; what moved in 2026 Choose, combine or migrate, and defend a number that came from two frameworks (Part 10)
10B.18 What the track covered and did not; a map of the official resources; a reading order and a six-week plan; reading docs pages, API references and installed signatures; reading changelogs and PyPI history; telling whether a lesson is out of date; keeping current Finish learning both packages from their own documentation, and notice when a lesson has gone stale (Part 8)
flowchart TD
    A["10B.1 You are here<br/>both packages, setup, keyless technique"]
    A --> DE["DeepEval path (mandatory)"]
    A --> IN["Inspect path (optional)"]
    DE --> D14["10B.2 Test cases, metrics, runner"]
    D14 --> D15["10B.3 Judges, G-Eval, DAG, custom metrics"]
    D15 --> D16["10B.4 Built-in metrics"]
    D16 --> D17["10B.5 Tracing and agent evals"]
    D17 --> D18["10B.6 Datasets, synthesis, simulation"]
    D18 --> D19["10B.7 Red teaming, CI, platform"]
    IN --> I20["10B.8 Task = Dataset + Solver + Scorer"]
    I20 --> I21["10B.9 Datasets, solvers, task config"]
    I21 --> I22["10B.10 Scorers, metrics, epochs, statistics"]
    I22 --> I23["10B.11 Model grading"]
    I23 --> I24["10B.12 Running at scale"]
    I24 --> I25["10B.13 Logs, analysis, extending"]
    I25 --> I26["10B.14 Tools and agents"]
    I26 --> I27["10B.15 Sandboxes, limits, approval"]
    I27 --> I28["10B.16 Agent evals and ecosystem"]
    D19 --> M["10B.17 Choosing, combining, migrating (optional)"]
    I28 --> M
    M --> F["10B.18 Finish with the official docs"]
    D19 -. "skip Inspect" .-> F

Four reading orders, depending on why you are here. The first and last are DeepEval-only routes; the second and third need the optional Inspect lessons.

If you are... Read
A product engineer who needs a PR gate this week 10B.1, then 10B.2, 10B.3 (G-Eval in Part 4 and judge validation in Part 10), the metrics you use from 10B.4, then 10B.7, Part 2 for CI
Evaluating agents or comparing models (take the optional Inspect lessons) 10B.1, then 10B.8 to 10B.10, 10B.12, and 10B.14 to 10B.16; add 10B.5 if your agent already runs in production code you can instrument
Responsible for the numbers other people quote (the 10B.10, 10B.11, 10B.13 and 10B.17 items are optional Inspect reading) 10B.1, then the methodology parts: 10B.2, Part 10, 10B.3, Part 10, 10B.4, Part 9, 10B.10 and 10B.11 in full, 10B.13, Part 11, then 10B.17
Short of time This lesson (its DeepEval parts), Part 1 and Part 10 (methodology) of 10B.2; then use 10B.18 to read the official docs. Add Part 1 and Part 10 of 10B.8 and 10B.17 only if you take the optional Inspect lessons

The track's boundaries: safety content (red teaming, cyber and misuse evals) uses benign payloads against your own app only, and Module 12 owns the depth; production monitoring and trace platforms belong to Module 11A; and the official documentation is more complete than any lesson for provider lists, integrations and benchmark catalogues, which is why 10B.18 closes the track by teaching you to read it.


Part 9: What this track changes in 10A.10 and 10A.6#

Deep-dive

Lesson 10A.10 surveyed DeepEval and Inspect before this track existed, and 10A.6 compared RAG metric names. Re-checked on 24 November 2026 and again on 28 November, these are the statements the track supersedes. 10A.10 has been partly updated; where it still differs, this table gives the framework-track version so that notes, slides or older copies you may hold can be corrected.

Where It or an older copy said As of November 2026
10A.10, landscape table, DeepEval row 4.3.5, now with a note that red teaming is back inside DeepEval since 4.3.6 (older copies say 4.3.3 and send red teaming to DeepTeam) 4.3.5 on 24 November, 4.3.6 on 25 November; lessons 10B.2 to 10B.6 keep the 4.3.5 baseline and 10B.7 is checked on 4.3.6. The description (pytest style, LLMTestCase, assert_test, GEval, RAG metrics, optional Confident AI) is still right
10A.10, landscape table, Inspect row 0.3.292 now (older copies say 0.3.288) 0.3.292 (23 November), so the current 10A.10 row is right; Python 3.11 or newer since 0.3.281; the wording "UK AISI + Meridian Labs" matches the docs home page
10A.10, 4.4 and 4.5 (Inspect sketch and concept map) Several simplifications: partial credit "in [0, 1]", "sample-level epochs", a Parquet loader, "slices from metadata", "the judge is your code" Corrected in 10A.10; full tables are in 10B.8, 8.3 and 10B.11, 12.2
10A.10, 4.6 "DeepEval when your team lives in pytest" Correct in outline Detailed in 10B.2; the 4.2.0 score-direction flip is a fact old tutorials get wrong (10B.4)
10A.6, Part 7.2 (same name, different metric) An earlier version of its table described AnswerRelevancyMetric and ContextualRecallMetric as rubric judges and named a DeepEval AnswerCorrectnessMetric Both descriptions were wrong: they are decompose-and-verdict (QAG) metrics, and no AnswerCorrectnessMetric exists (define a GEval instead). 10A.6 now carries the corrected, sourced table; 10B.4, 2.10 summarises it
Any note that says "Inspect is for government safety testing only" A half-truth Built there, used widely for product evals; the triage eval of Part 7 is a few dozen lines
Any note that says "DeepEval needs an OpenAI key" Half-true LLM metrics need a judge; any DeepEvalBaseLLM works, including a scripted one, and non-LLM metrics need none (6.2)

Part 10: Older code and tutorials#

Reference

Both packages change quickly and tutorials date quickly. This part is the short translation table for the names you will most often meet; every later lesson ends with its own, more detailed one (10B.2, Part 11, 10B.8, Part 11).

10.1 DeepEval#

In an older tutorial Today Note
LLMTestCaseParams SingleTurnParams The old name still imports and prints a DeprecationWarning
TurnParams MultiTurnParams Same: a deprecated alias
additional_metadata= on a test case metadata= The old keyword is still accepted as an alias; it raises a DeprecationWarning that Python's default warning filters hide (10B.17, 2.2)
GPTModel OpenAIModel Deprecated alias in deepeval.models
DAGMetric built with children=[VerdictNode(...)] add_verdict() and add_node() Warns at runtime (10B.3)
ToxicityMetric(threshold=0.2) meaning "at most 20% toxic", and the same for Bias, Hallucination and Misuse Meaning flipped in 4.2.0 (24 August 2026): higher is better and the threshold is a minimum The silent one: the same line now means "at least 0.2 clean", a far weaker gate
DisplayConfig(display=...) (from the docs) DisplayConfig(display_option=TestRunResultDisplay.FAILING) The docs' keyword is a TypeError
Tutorials that set up the judge with a bare OPENAI_API_KEY only Any judge, per metric (model=) or globally (set-* with --save=dotenv) 10B.3
Tutorials without DEEPEVAL_TELEMETRY_OPT_OUT=1 Add it 5.3

10.2 Inspect AI#

In an older tutorial Today Note
Python 3.10 Python 3.11 or newer Required since 0.3.281 (15 October 2026)
web_browser() tool Deprecated in 0.3.272 and removed in 0.3.288: the name still imports, but calling it raises PrerequisiteError web_search() for retrieval; computer() or a browser MCP server in a sandbox for interaction (10B.14)
basic_agent() as the way to build an agent react() from inspect_ai.agent basic_agent() is still exported but the docs lead with react() (10B.14)
Score.value "in [0, 1]" and "sample-level epochs" Any value type; epochs are a task or run setting reduced per sample 10B.10
pip install inspect-ai then samples_df() Also install pandas and pyarrow 3.1
Examples that assume the default model-graded template never changes Tied panels became unscored in 0.3.262, and the template gained nonce-coded markers in 0.3.288 Re-validate built-in graders (10B.11)
New benchmark evaluations contributed as pull requests to Inspect Evals Registered from your own repository with a YAML file since 8 May 2026 10B.16

10.3 How to date a tutorial#

Look for names, not publication dates. If a snippet uses LLMTestCaseParams, GPTModel or additional_metadata, it was written for an older DeepEval (the rename was in place by 4.0.10); if it gates Toxicity or Bias with a low threshold, check whether it was written before 4.2.0 and translate the threshold. For Inspect, a working web_browser() call marks a tutorial older than 0.3.288 (it warned from 0.3.272), an agent built with basic_agent() rather than react() suggests an older one (both still run), and a note that says "Python 3.10" is older than 0.3.281. Then check the version the tutorial names in the DeepEval changelog or Inspect's CHANGELOG, use the PyPI release history for exact upload dates (and as the fallback when DeepEval's changelog lags), and run the snippet on a scripted fake in a throwaway project before you trust it. Do not install an old version into your track project: install it in a separate throwaway environment, and delete it when you are done.


Reference

Everything below is a surprise someone met in the first week with one of the two packages. Each row names the lesson that reproduces it.

Symptom Cause Fix Where
DeepEvalError: OpenAI API key is not configured the moment a metric is created LLM metrics build their judge at construction; the default is an OpenAI model Pass model=<judge>; for plumbing, the scripted FakeJudge 6.2, 10B.2, 3.4
A DeepEval script behaves differently on your laptop and in CI import deepeval loaded .env, and .env.{APP_ENV} when APP_ENV is set, and .env.local; the process environment wins DEEPEVAL_DISABLE_DOTENV=1 in CI and explicit variables 5.3
An upload happened that you did not intend deepeval view uploads the latest run when you are not logged in Do not run view, login, gate, generate or setup in keyless work 5.7
deepeval set-ollama then a "missing parameter" error Without --save=dotenv the settings are stored incompletely (4.3.x) Always --save=dotenv, then deepeval diagnose 10B.3
A custom metric ignores the argument you passed under evaluate() The runners rebuild metrics from attributes named like constructor arguments; yours used a different name Store every argument under its own name 10B.2, 4.5
TypeError on DisplayConfig(display=...) The docs show a keyword that does not exist display_option= 10B.2, Part 4
A tutorial's toxicity gate suddenly passes everything The 4.2.0 score flip: the threshold is now a minimum Re-derive thresholds; read the metric's direction 10B.4
import pandas error from samples_df() Inspect does not install pandas or pyarrow uv add pandas pyarrow 3.1
inspect eval exits 0 though the eval errored The exit code reports the process, not the log's status Gate on the log, or use inspect eval-set 10B.12, Part 13
Accuracy 0.000 on a keyless Inspect run mockllm/model answers "Default output from mockllm/model" unless scripted Script the mock, keyed on the input 6.5
Every sample passes with an empty target includes() and match() treat an empty target as contained in every output Assert targets are non-empty before the run 10B.10, 10.3
The model sees a mangled prompt system_message() and prompt_template() read single braces as fields; literal JSON braces must be doubled Double the braces and print the prompt as sent 10B.9
Token counts on a mock run look huge Output tokens are counted in characters on a mock Never quote mock usage 6.4
A shared log reveals your repository URL Logs record the git origin and commit; credentials embedded in the origin are redacted in current Inspect, but the URL itself is still identifying Placeholder remote in lab folders; decide before bundling logs 5.6
A DeepEval number and an Inspect number for the "same eval" differ Different aggregates (per-case pass rate vs per-scorer mean), or different definitions Compare failing cases first, then name each number 7.4
The same metric name gives different scores in two libraries A name is a pointer to a definition Read the prompt and the formula; validate the judge 10B.4, 10A.6, 7.2
ModuleNotFoundError for a sibling file with python -I -I removes the script's folder from the import path uv run python file.py or python -E -s file.py 5.8
import deepteam fails with sentry_sdk missing deepteam 1.0.10 does not declare its sentry-sdk dependency Install sentry-sdk too, or use current deepeval.red_team (10B.7, 1.2) 3.3
deepteam will not install It requires Python below 3.14 Use 3.13 or 3.12 3.3
A DeepEval upgrade changed scores overnight Prompts, formulas or directions changed between releases Pin with uv.lock; re-run a frozen suite on both versions and diff per case 2.5
An LLM metric you added never fails differently from the cheap ones It adds cost without information on this data List the cases only it fails and read them 7.4

Part 12: Methodology: defending a number you did not compute yourself#

Deep-dive

When you wrote evalkit, you could defend a number by reading the code that produced it. With a framework, part of the pipeline is someone else's, so the defence needs a different checklist. It is the same checklist for both packages, and the later lessons deepen each step.

12.1 Name the number#

"Accuracy is 0.917" is not a claim until it says: accuracy of which scorer, over which cases, with which unscored or errored cases counted how, aggregated per case or per run. Part 7 showed three harnesses printing three different aggregates for one set of verdicts. Write the definition next to every number, and recompute the headline from per-case results rather than quoting what the tool printed (10B.2, 10.1, 10B.10, Part 10).

12.2 Record what produced it#

A number belongs to a version of the package, a version of the data and a judge. This sample builds the small record that should sit next to every result: Python and package versions from the environment, a hash of the dataset file, the judge's identity, and the named number. Copy triage_data.py into the eval-lab project (the script hashes it as its stand-in dataset) and save this next to it:

python
# run_record.py: the few facts to store next to every eval number (lesson 10B.1)
import hashlib
import json
import platform
import sys
from importlib import metadata
from pathlib import Path


def run_record(dataset: Path, judge: str, number: dict) -> dict:
    """What produced this number: code versions, the data, the judge, and the number itself."""
    return {
        "python": platform.python_version(),
        "packages": {name: metadata.version(name) for name in ("deepeval", "inspect-ai")},
        "dataset": {"file": dataset.name,
                    "sha256": hashlib.sha256(dataset.read_bytes()).hexdigest()[:12]},
        "judge": judge,                       # a model id for a real judge; "fake-judge" for plumbing
        "number": number,                     # name it: which aggregate, over which cases
    }


if __name__ == "__main__":
    record = run_record(Path(__file__).with_name("triage_data.py"), "fake-judge",
                        {"name": "share of cases where every metric passed", "value": 0.833, "n": 12})
    json.dump(record, sys.stdout, indent=2)
    print()
bash
uv run python run_record.py
Output · real, 26 November 202617 lines
{
  "python": "3.13.14",
  "packages": {
    "deepeval": "4.3.6",
    "inspect-ai": "0.3.292"
  },
  "dataset": {
    "file": "triage_data.py",
    "sha256": "930ab965e874"
  },
  "judge": "fake-judge",
  "number": {
    "name": "share of cases where every metric passed",
    "value": 0.833,
    "n": 12
  }
}

Store that JSON with the results file, and add the git commit of your own repository and the judge's model id and settings when you use a real judge. Inspect logs already record the task, solver, scorer, model, configuration, git revision and the inspect_ai version; they do not record your other packages' versions, and DeepEval's console output and result files are not guaranteed to carry the package version, so log it yourself, for example as a hyperparameter (10B.2, 10.5). A record like this one fills both gaps.

12.3 Run the controls#

Two runs on fakes, before any real model, catch a broken harness: an oracle run (replies built from the reference answers must pass every case) and a null run (replies unrelated to the task must fail every case). This sample runs both on the DeepEval triage eval, plus the shipped fixture and the fixture with one reply made wrong. Run it from the folder that holds triage_data.py, triage_metrics.py and fake_judge.py (the DeepEval files of Part 7):

python
# exercise_check.py: the oracle, null and one-change runs behind exercises 1, 2 and 4 (lesson 10B.1)
import os

os.environ.setdefault("DEEPEVAL_TELEMETRY_OPT_OUT", "1")

import json

from deepeval import evaluate
from deepeval.evaluate import DisplayConfig
from deepeval.test_case import LLMTestCase

import triage_data
from triage_metrics import TriageFormat, TriageLabels

QUIET = DisplayConfig(print_results=False, show_indicator=False)


def run(replies: dict[str, str], label: str) -> None:
    cases = [LLMTestCase(name=tid, input=text, actual_output=replies[tid],
                         expected_output=ref, metadata=meta)
             for tid, text, ref, meta in triage_data.TICKETS]
    result = evaluate(test_cases=cases, metrics=[TriageFormat(), TriageLabels()], display_config=QUIET)
    rows = sorted(result.test_results, key=lambda t: t.index)
    fmt = [m.score for r in rows for m in r.metrics_data if m.name == "Triage Format"]
    lab = [m.score for r in rows for m in r.metrics_data if m.name == "Triage Labels"]
    passed = sum(r.success for r in rows)
    print(f"{label:28} pass {passed}/12  format mean {sum(fmt) / 12:.3f}  "
          f"labels mean {sum(lab) / 12:.3f}  mean score {(sum(fmt) + sum(lab)) / 24:.3f}")


# 1. Oracle: a reply built from each reference answer must pass everything.
oracle = {}
for tid, _text, ref, meta in triage_data.TICKETS:
    priority, category = ref.split("|")
    summary = "" if meta.get("allow_empty_summary") else "Short summary of the issue."
    oracle[tid] = json.dumps({"priority": priority, "category": category, "summary": summary})
run(oracle, "oracle (perfect replies)")

# 2. Null: a reply that has nothing to do with the task must fail everything.
run({tid: "Default output from mockllm/model" for tid in oracle}, "null (default mock text)")

# 3. The scripted fixture, then one change: T03 gets the wrong priority.
run(triage_data.RESPONSES, "fixture (as shipped)")
changed = dict(triage_data.RESPONSES)
changed["T03"] = '{"priority": "P2", "category": "account", "summary": "How to add a second admin."}'
run(changed, "fixture + T03 wrong priority")
bash
uv run python exercise_check.py | grep -E "^(oracle|null|fixture)"
Output · real, 28 November 2026; DeepEval's banners filtered out by grep4 lines
oracle (perfect replies)     pass 12/12  format mean 1.000  labels mean 1.000  mean score 1.000
null (default mock text)     pass 0/12  format mean 0.000  labels mean 0.000  mean score 0.000
fixture (as shipped)         pass 10/12  format mean 0.917  labels mean 0.889  mean score 0.903
fixture + T03 wrong priority pass 9/12  format mean 0.917  labels mean 0.861  mean score 0.889

The oracle passes 12 of 12 and the null run passes 0 of 12: the metrics can fail and can pass. The shipped fixture gives the reference numbers again (10 of 12, means 0.917 and 0.889, mean score 0.903). And one wrong priority on T03 moves exactly the numbers it should: a 9 of 12 pass rate, a labels mean that falls from 0.889 to 0.861 (two thirds of a point lost out of twelve), and a format mean that does not move. That last run is a sensitivity check: change one thing, predict which numbers move and by how much, and confirm. A harness whose numbers move in ways you cannot predict is not yet understood.

12.4 Read the definitions you adopted#

Built-in metrics and scorers carry prompts and formulas you did not write. The remedy is to read them, and both packages let you see what they actually send.

To see... DeepEval Inspect
The prompt a metric sends the judge Run the metric on a FakeJudge and print judge.prompt(i) (6.3); 10B.3 and 10B.4 do this for every metric The model-graded scorers' templates are in the package and recorded in the log's model events (10B.11)
The formula The metric's documentation page and 10B.4, which states each one The metric's reference page and 10B.10
Which model judged metric.evaluation_model and MetricData.evaluation_model The grader role and model in the log header
What changed since last month The DeepEval changelog first, then PyPI release history when it lags (the GitHub release page has Python releases only up to 4.2.4); diff the wheels only as a fallback The CHANGELOG

Then validate every judge you adopt, whoever wrote its prompt: score a human-labelled set, compute agreement, estimate error rates and report an interval, with the tools of 10A.5. Neither package does this for you, and a number from an unvalidated judge is an opinion with a decimal point.

12.5 Change one thing at a time, and test upgrades on a frozen fake#

When you upgrade a package, change the judge or edit a prompt, change one of them per run and keep everything else fixed. For upgrades, the frozen-fake technique is the cheapest check: run the scripted triage eval on the old and the new version and diff the per-case verdicts. If the verdicts differ with no change of data, the framework changed behaviour, and you have found it before your trend line did (10A.8, 8.4).

12.6 A checklist before you quote a framework number#

Check Done when
The number has a name and a definition You can say which scorer or metric, which cases, per-case or per-run
The failing cases were read You have looked at the reasons or transcripts for a sample of failures, not only the aggregate
The versions are recorded Python, package versions, judge and model identities, dataset hash, git commit
Controls passed Oracle near 100%, null near 0%, one sensitivity check behaved as predicted
Judges are validated Agreement with human labels measured and reported with an interval (10A.5)
The sample size is honest An interval accompanies any pass rate; twelve cases are a fixture, not evidence
Definitions are yours or read Every built-in metric or scorer you rely on has been read, not assumed
The upgrade policy is in force The lock file is committed and a frozen-fake diff runs before upgrades

Common misconceptions#

Misconception Reality
"DeepEval and Inspect are alternatives; pick one forever." They have different shapes (a test is a record plus metrics, versus a task is a recipe with logs as the product). Many teams use both; 10B.17 shows how to share definitions.
"Adopting a framework means throwing away evalkit." The framework replaces your runner and some scorers. Judge validation, between-run statistics and your own definitions are still evalkit's and 10A.5's.
"DeepEval needs an OpenAI key." Only its LLM metrics need a judge, and any DeepEvalBaseLLM works, including a scripted one; deterministic metrics need nothing.
"Inspect is only for government safety evaluations." It was built there, and it runs product evals well; the triage eval is a few dozen lines. Its strengths are agents, logs and benchmarks.
"Inspect has no cost and no telemetry, so it has no data-handling considerations." No usage telemetry is documented, but logs record your git remote and can contain full transcripts, so treat logs as data you must govern.
"Higher is better for every DeepEval metric." True since 4.2.0, and false before it; old tutorials and old thresholds assume the opposite for Bias, Toxicity, Hallucination and Misuse.
"A green keyless run means my eval is good." It proves the plumbing. Quality needs a real model, a validated judge and enough cases.
"Both tools print the same headline number." They print different aggregates (a per-case pass rate, per-scorer metrics). Recompute from per-case results and name the number.
"inspect eval failing will fail my CI job." It exits 0 even when the log's status is error. Gate on the log or use inspect eval-set.
"Version pins belong in install commands." In a uv project the lock file pins; install commands name packages only, and the lock plus a recorded version line carry the rest.
"Evals at 12 cases show model quality." Twelve cases are a harness fixture; a 95% interval on 10 of 12 spans about 55% to 95%.
"uv run --no-project --with X always runs in a fresh environment." Inside a folder with a .venv it reuses that environment when it already satisfies X. Add --isolated when you need a clean room (3.1).
"If the headline numbers match, the port is right." Compare the failing sets first; a fixture can also hide a wrong threshold if no case falls between the old and new line (7.4, exercise 11).

Key takeaways#

  • Adopt a framework as a runner and a source of checks, not as the owner of your definitions. Keep data, rubrics and thresholds as plain files, wrap framework metrics around evalkit functions where you can, validate every judge, and record versions with every number.
  • DeepEval (Confident AI, Apache-2.0, 4.3.6 on 25 November 2026) turns an evaluation into a unit test: a finished test case scored by metric objects with thresholds, run with evaluate() or assert_test() and deepeval test run. Most metrics are LLM-as-judge and it gives you no judge calibration. In 4.3.6 it also regained red teaming, which 10B.7 owns.
  • Inspect AI (UK AI Security Institute with Meridian Labs, MIT, 0.3.292 on 23 November 2026) makes an evaluation a task, a recipe of dataset, solver and scorer, and makes the log the product. It excels at agents, tools, sandboxes, reproducibility and benchmarks, and leaves pytest-style assertions, RAG metrics and between-run statistics to you.
  • Both move fast. DeepEval ships every five days or so (and flipped four metrics in 4.2.0); Inspect is 0.x and ships every two to three days (and raised its Python floor in 0.3.281). Commit uv.lock, upgrade on purpose, and test upgrades on a frozen fake.
  • The installs are broad: about 80 distributions each and about 130 together. Neither installs pandas, pyarrow or provider SDKs beyond OpenAI for DeepEval's default judge. The companion packages (legacy DeepTeam; Inspect Evals, Harbor, SWE, Scout, Viz, Flow, Petri, Cyber and the sandbox packages) are separate, with their own owners and versions.
  • Vocabulary collides. "Metric" is a per-case object in DeepEval and a cross-sample aggregator in Inspect; "score" can be a float, a label or a dict; "judge" is a model in DeepEval and a role in Inspect. Use the concept map of Part 4.
  • One project serves the track: uv init eval-lab, uv add deepeval inspect-ai python-dotenv, a .env.example with DEEPEVAL_TELEMETRY_OPT_OUT=1, a .gitignore that covers .env, logs/ and .deepeval/, and a placeholder git remote for the Inspect lab folder.
  • Every sample in the track runs keyless: a scripted FakeJudge for DeepEval and mockllm/model for Inspect. That proves plumbing, not quality, and the oracle and null runs are the controls that tell you the harness itself is sound.
  • The triage eval gave the same failing cases and the same headline in three harnesses. Reconcile cases before aggregates, name every number, and remember that twelve cases are a fixture.
  • Choose by the question you need answered: PR gate and ready-made metrics point to DeepEval; agents, many models, logs and benchmarks point to Inspect; a small, fully auditable eval points to evalkit; and "add the second package only for a gap you can name".

Terms introduced in this lesson#

Term One-line definition
Eval framework A library that supplies the parts of an eval harness (case format, checks, runner, records, CLI) so you do not write them yourself; DeepEval and Inspect AI are two, evalkit is a small one
Framework track Lessons 10B.1 to 10B.18, which teach DeepEval and Inspect AI in depth after the framework-neutral lessons 10A.1 to 10A.12
Companion package A separate package in a framework's family (legacy DeepTeam for DeepEval; Inspect Evals, Harbor, SWE, Scout, Viz, Flow, Petri, Cyber and the sandbox packages for Inspect) with its own owner, version and Python floor
Distribution (Python) An installed package as importlib.metadata counts it; uv add deepeval brings about 80, and both packages together about 130
Optional extra A named bundle of extra dependencies (deepeval[inspect], inspect-ai[math]) that you install explicitly
Lock file (uv.lock) The file uv writes that records exactly which versions resolved; it, not an install-command pin, is what keeps an eval environment reproducible
Keyless smoke test A short script that proves the install, the imports and the pipeline work using a scripted judge or model, with no key and no network
Scripted judge / scripted model A fake that returns answers you wrote (FakeJudge for DeepEval, mockllm/model for Inspect), used to test plumbing deterministically
Parity test (eval) Running the same cases through two harnesses and diffing the per-case verdicts before comparing aggregates
Reconciliation Explaining why two tools' headline numbers for the same eval differ, starting from the set of failing cases and ending at each number's definition
Failing-set diff Listing the cases that fail in one harness and not the other (new and missing failures) before comparing any aggregate; the fastest way to locate a porting bug
Oracle run / null run Controls on fakes: replies built from the references should pass everything, replies unrelated to the task should fail everything
Sensitivity check Changing one thing in a fixture, predicting which numbers move and by how much, and confirming
Placeholder remote A fake git origin URL in a lab folder so that Inspect logs do not reveal a real repository
Run record The small record stored with a result: Python and package versions, dataset hash, judge identity, and the named number

Terms defined elsewhere and used here: DeepEval, Confident AI, Fake judge (DeepEval) (10B.2); Inspect (Inspect AI), Task (Inspect), mockllm, Solver (Inspect AI) (10B.8); Dependency group, Optional dependency / extra, Keyless run vs real-model eval (the glossary).


Exercises#

All exercises run keyless, in the eval-lab project and the two throwaway folders of this lesson.

  1. Oracle and null (12.3). Reproduce the oracle and null runs for the DeepEval triage eval. Then write the Inspect equivalent: a scripted mockllm/model that answers perfectly, and one that returns the default text. What should each score, and why does a null run that does not score 0 tell you your scorer is too lenient?
  2. Predict, then run (12.3). Make T05's scripted reply wrong in category only. Predict the DeepEval pass rate, the labels mean and the format mean, then run. Predict also the Inspect triage_labels mean without running it.
  3. A fourth DeepEval metric (7.2). Add a metric that fails when a summary mentions an internal URL or contains the word "urgent" in capitals. Which cases does it fail that the other metrics do not? Does the pass rate move?
  4. Footprint (3.1). Run footprint.py against your own project's environment (uv run python footprint.py deepeval inspect-ai pandas pyarrow). How do your counts compare with the lesson's, and what explains the difference?
  5. Date a tutorial (Part 10, third section). A tutorial gates safety with ToxicityMetric(threshold=0.2), builds a judge with GPTModel, and passes additional_metadata= to its test cases. Say roughly when it was written, what each line means today, and what you would change.
  6. Decide (8.1). Pick the starting package for each: (a) a support bot whose answers should fail a pull request when faithfulness drops; (b) a coding agent that edits files in a container, compared across three models; (c) a one-off check that a prompt returns valid JSON; (d) a monthly benchmark run on a public benchmark. Name the gap that would make you add the other package.
  7. Run record (12.2). Extend run_record.py to include the git commit of the folder it runs in (use subprocess and git rev-parse --short HEAD, falling back to null outside a repository), then store its output next to a DeepEval results file from DisplayConfig(results_folder=...).
  8. Placeholder remote (5.6). In your Inspect lab folder, run the smoke test once with a placeholder remote and once with your real remote (a repository you are happy to expose). Compare log.eval.revision. What would you strip before sharing the log, and how?
  9. A frozen-fake upgrade diff (12.5). Write a script that stores the per-case verdicts of the DeepEval triage eval as JSON and a second that diffs two such files. Run it before and after uv lock --upgrade-package deepeval and report any difference, or the lack of one.
  10. Port one of your own (7). Take one eval you built in 10A.1 to 10A.12, with a frozen scripted model, and port it to the package you chose in exercise 6. Reproduce the failing cases first, then the headline, and write down which definitions differ.
  11. A bug the fixture cannot see (7.4). In a copy of parity_bug.py, keep the metadata but build TriageLabels(threshold=0.6) instead of the default 1.0. Predict the failing set before you run it, then try 0.3. Which suspect from the 7.4 table is this, and what would you add to the fixture so that the 0.6 bug shows up?
Answers
  1. DeepEval: the oracle passes 12 of 12 and the null run 0 of 12 (output in 12.3). For Inspect, script custom_outputs as a function that builds each reply from the sample's target; the format and labels scorers should both give 1.0. The default mock text should give 0 for both (the format scorer finds no JSON and the labels scorer scores 0.0). A null run above 0 means the scorer accepts something it should not, for example an empty target matched by includes().
  2. In DeepEval, T05 is currently a full pass, so a wrong category costs it one of three label points: the pass rate falls from 10 of 12 to 9 of 12 (75%), the format mean stays 0.917, and the labels mean falls from 0.889 to 0.861 (the same arithmetic as the T03 run in 12.3). In Inspect, the same change gives a triage_labels mean of 0.861, because mean() averages the per-sample values (ten of them 1.0 before, nine now plus one 0.667, and the two earlier failures at 0.333), and an unchanged triage_format accuracy of 0.917. Confirm the DeepEval numbers by running; the Inspect ones follow from the arithmetic.
  3. For example, a metric that checks the reply's summary against a regular expression for https?://\S+\.internal and the capitalized word "URGENT". On the fixture, none of the shipped summaries contains either, so it fails no case and changes no pass rate: exactly the "metric that adds cost, not information" case of 7.4. To make it fail something, change one scripted summary and rerun.
  4. Your counts depend on what else is in the environment. The lesson's --isolated environments held only the packages under test; your project also holds anything else you added (python-dotenv costs nothing, since both packages already depend on it). On 28 November a fresh eval-lab printed 129 distributions and about 240 MB, the same as the isolated both-packages line, and yours will differ by a few as dependencies release. If you ran the 3.1 commands from inside the project without --isolated, all three lines show this same project count: that is the trap in the 3.1 warning.
  5. The tutorial predates DeepEval 4.2.0 (24 August 2026) for the threshold and an older 4.x or 3.x release for the names. ToxicityMetric(threshold=0.2) meant "at most 20% toxic" and now means "at least 0.2 clean", a much weaker gate, so choose a high threshold (for example 0.9, calibrated on your data) and read 10B.4. GPTModel is a deprecated alias of OpenAIModel. additional_metadata= is a deprecated alias of metadata=.
  6. (a) DeepEval: ready-made faithfulness metric and a pytest gate (validate the judge first); add Inspect only if you later need agent transcripts. (b) Inspect: agents, containers and a model comparison are its home ground; add DeepEval if you want ready-made metrics on the final answers. (c) evalkit or a few lines of code: a schema check needs no framework. (d) Inspect with Inspect Evals; add nothing unless you need a custom variant.
  7. subprocess.run(["git", "rev-parse", "--short", "HEAD"], capture_output=True, text=True) returns a non-zero code outside a repository; map that to None. Store the JSON file beside the test_run_*.json the results folder wrote, and name both with the same identifier.
  8. log.eval.revision.origin shows whichever URL the folder had. On current Inspect, credentials embedded as user:token@ are redacted before recording, but the host and path remain visible and older releases did not redact anything. Before sharing, either re-run from a folder with a placeholder remote, or accept that the origin is visible and share only logs from repositories you are happy to expose; bundling a log (inspect view bundle) copies the header with it.
  9. The script writes {case name: [metric name, score, success]} per case; the diff compares two such dicts key by key. With the same scripted judge and the same data, a minor upgrade should show no difference. Any difference is a finding to read, not to average away.
  10. Open ended. A good port reproduces the old failing cases exactly, then the headline, and ends with a short list of definitional differences (aggregation, error handling, defaults) like the table in 7.4.
  11. At 0.6 nothing changes: the failing set is still T02 and T11, because no case scores between 0.6 and 1.0 on labels (T02 scores 0.333 and every other parseable reply scores 1.0), so the parity test passes with a wrong threshold. At 0.3, T02's 0.333 clears the line and only T11 fails (checked by running both). It is the "different threshold" suspect, and the lesson is that a fixture tests only the distinctions it contains: add a reply with exactly one wrong label (0.667), such as the T03 change of 12.3, and the 0.6 threshold now passes a case the original definition fails.

Check yourself#

  1. Name three things a framework gives you that a hand-built harness struggles to, and three things it does not give you.
  2. What is the rule that keeps the framework trade honest?
  3. In one sentence each, what are DeepEval's and Inspect's central ideas?
  4. Who maintains each package, and under what licence?
  5. Which package scores finished records and which one runs your app?
  6. Why can a DeepEval LLM metric fail the moment you construct it?
  7. What does Inspect record in every log header that you may not want to publish?
  8. What is the difference between a "metric" in DeepEval and a "metric" in Inspect?
  9. Why does deepeval test run on the triage eval exit with code 1, and why does inspect eval not behave that way?
  10. What does a keyless run prove, and what can it not prove?
  11. In the triage eval, what did all three harnesses agree on, and what did they print differently?
  12. What is an oracle run and what is a null run?
  13. Why is "10 of 12" a weak claim about a model, and how would you say it honestly?
  14. Which two things do neither package give you that evalkit still does?
  15. A port of your eval prints a different pass rate from the original on the same frozen fake. What do you compare first, and name three usual causes.

Further resources#

Official documentation (every URL below returned a page when checked on 26 November 2026, and again on 28 November):

DeepEval and Confident AI

Inspect AI and its ecosystem

Tools and background

  • uv documentation: projects, lock files and dependency groups.
  • The course's own map of the field: 10A.10 (landscape and three-tools triage), and 01B.1 for uv.

Within this course: 10B.2 to 10B.7 for DeepEval in depth, 10B.8 to 10B.16 for Inspect in depth, 10B.17 for the comparison and 10B.18 for finishing with the official documentation. The same shape of lesson for another ecosystem is 08F.4.


← Module 10A: Evaluation Foundations | Module 10B overview | 10B.2: DeepEval Fundamentals: Test Cases, Metrics and the Test Runner →

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