Evaluating models

How the Model Switch Lab's Harness Works

A model comparison is only as trustworthy as the machinery around it. This page walks through that machinery, the harness, one step at a time: what runs where, what each model is allowed to touch, and how a run turns into a PASS, FAIL or INCONCLUSIVE.

It's the harness behind Can We Replace Claude Opus with Sonnet?. If you're new to agent loops, The harness loop builds one from scratch.

Step through one run

Use Next, the arrow keys, or Play all. Several steps have controls you can change.

Your machine · Inspect AIholds the API keyModel APIany providerAgent containerno network · no capabilitiescheckout/ cart.py money.py discounts.pytests/test_cart.pyGrader containeragent can’t reach it(empty)Spend guardAgent loopScorerGate

Step 1 of 9

The spend guard runs first

Before the agent gets a single model call, a guard checks the model. The free mock model always passes. A real, paid model is refused unless you opted in and set a per-run dollar ceiling. Try it.

Refused. Refused before any model call: no opt-in and no budget_usd.

Three ideas to take away

  1. Same agent, same tools, same starting code. The only thing that changes between runs is --model. The agent is Inspect AI's built-in react() agent, which isn't tuned for any vendor, so Opus, Sonnet and DeepSeek all get the same prompt and tools.
  2. The model never grades itself. Its code is copied to a separate container and judged by tests it never saw. No model judges another model's work.
  3. Not every failure is the model's fault. Crashes, wrong models and missing results make a comparison inconclusive, not failed.

A real run, message by message

This is one complete run of the bug-fix task, recorded from the lab. The containers, the tools, the pytest output and the grade are all real. The model is Inspect's mock model, scripted to make the fix, so the run cost nothing and says nothing about how good any real model is. It's here to show what a transcript looks like, not to report a result.

Recorded run · bug-fix

Real containers, real tools, real pytest output. The model is Inspect's scripted mock model, so this run cost nothing and is not a benchmark result.

success · 10/10 hidden tests

System prompt (Inspect’s react agent)

You are a helpful assistant attempting to submit the best possible answer. You have several tools available to help with finding the answer. You will see the result of tool calls right after sending the message. Prioritize parallel tool calls: when operations are independent, run them in one response — e.g. reading several files or running several searches at once — rather than one at a time. Only sequence calls when one depends on another's result. Do some reasoning before your actions, describing what tool calls you are going to use and how they fit into your plan. When you have completed the task and have an answer, call the submit() tool to report it.

1/17
Open this run in Inspect's log viewerEvery model call, tool event, score and timing, exactly as Inspect recorded it.

To record it again yourself:

cd model-switch-lab
uv run python demo_run.py     # zero cost: scripted mock model
uv run inspect view --log-dir logs/demo

demo_run.py removes your git remote and local paths from the copy it writes for the website. Inspect records both in its logs by default, so check any log before you publish it.

Previous
Opus vs Sonnet: Model Switch Lab