Evaluation
Evaluation answers one question with numbers: did this change to the harness, a prompt, a skill, or the model help or hurt? It runs the real agent, end to end, and grades what actually happened.
The code in src/makker/eval is the harness: the solver, the scorers,
RunConfig, and the makker eval command. makker-bench is the benchmark
built on that harness. Its public suites live in this repository under
eval/tasks/. A private holdout suite lives in a separate repository so
its answers stay out of training data.
The harness is built on Inspect AI. Inspect provides the runner: model providers (OpenAI, Anthropic, Google, local Ollama), repeated epochs, per-sample token and time limits, logs, and a viewer. Ours is the part Inspect cannot know: a solver that runs one full Makker session per sample, and scorers that read the session trace.
Running
uv run makker eval --list
uv run makker eval canary
uv run makker eval --all --model <provider/model>
uv run makker eval canary guardrails --model <provider/model>,<provider/model>
uv run makker eval canary --epochs 5 --epochs-reducer mean,pass_at_2
uv run makker eval plotting --surface tui
makker eval loads provider keys the way the app does (the user-global
.env plus the working directory's) before Inspect resolves the model, and
runs samples one at a time. Logs land in the Makker home under
eval-logs/. A run ends with the command that opens them in Inspect's viewer
(in a checkout, uv run inspect view --log-dir <dir> does too).
--model takes a model id as the app writes it (openrouter:qwen/qwen3.8-27b)
or as Inspect does (openrouter/qwen/qwen3.8-27b), and defaults to the agent's
default model. A comma-separated list runs a matrix that can mix cloud and
local models in one run. The models take turns, one task at a time: a sample
queued behind another model's session would spend its own time limit waiting.
How a sample runs
The solver (eval/solver.py) builds the same stack a real session uses: a
fresh workspace (with any task fixtures written into it), a Julia kernel, a
Session, build_agent, TurnRunner. The eval's --model is the session's
model, built and called by Makker as in the app, so the eval sees the client,
reasoning, output limit, context window and image support a user gets. Each
call is charged to the sample, so the log's token counts and cost and the
task's token limit work as they do for Inspect's own calls, and the session's
conversation is written to the log when it ends.
Each sample runs with the settings of a new user: effort, output length,
context size and compaction point at their defaults, whatever is saved in
the app, which the eval leaves untouched. --context-window N runs every
sample as if that context size were chosen for the model. Memory is
ephemeral per sample, so runs cannot learn from each other.
The eval runs only models Makker has a provider for, including an endpoint
added in providers.toml (see your own model server), and refuses any other
before it starts: what it can score is what users can run.
Samples run on the web surface, the front end most people use, so the bench
measures the system prompt and plotting path they get. --surface tui runs
them as the terminal UI instead. The surface decides what the agent is told
about the display and how plot_julia makes a figure. On the web, the figure
is built with WGLMakie and served live from the session's plot server, and
CairoMakie renders the PNG that the agent views and that artifact_produced
grades. No browser connects, so a figure keeps the size its code gives it
rather than fitting a panel. On the terminal surface, GLMakie renders the
figure offscreen. The RunConfig records the surface, and the prompt hash
differs between the two.
Web became the default when the two scored the same: the plotting suite
passed 6 of 6 samples on each surface with openai:gpt-6-luna (three
epochs), in about the same time and tokens per sample.
Two sample metadata keys opt into heavier setup: needs_env instantiates
the simulator's Julia environment in the workspace (slow on a cold depot),
and needs_display starts a virtual display for plotting. A third,
context_window, runs the agent as if that context size were chosen for its
model, so a task of ordinary length fills it and the offloading and
compaction of a long session happen within minutes.
Scoring: the trace, not the story
A model can claim anything in its final message, so every task pairs an
answer check with at least one trace check (eval/scorers.py):
used_tools([...]): the required tools appear astool_callevents.no_interpreters_via_execute(): the agent did not spawnjuliathrough the shell (the kernel exists for it, and the workspace backend blocks it outright). Tasks can widen the check to other interpreters.artifact_produced(".png"): the trace records a plot artifact and the file on disk is non-empty.typed_numbers_shown(): every precise number the agent typed into a file was in an earlier tool output or user message, so none came from memory. It is the reviewer's check (see session review).context_moved_out(): the session offloaded tool results or compacted at least once; a task meant to fill the window checks that it did.investigation_recorded(min_attempts, metric): theattemptevents written byrecord_attemptform a tree of at leastmin_attemptsrationaled steps, each carrying the named metric. This is the scorer for investigation tasks, where the recorded process is the deliverable.includes()(Inspect built-in): the target value appears in the answer.
The answer line
A task that grades values names them in its sample metadata, as answer:
a mapping from key to what the value is. The solver then asks the agent to
end its final reply with one line, ANSWER: {...}, holding those keys as
JSON numbers or lists of numbers, and null for a value it could not
obtain. The value scorers read only that line, never the prose:
numeric_close(expected, tol, key=...): the key's value is withintolof a golden.numeric_answer(low, high, keys=(...), count=..., order=...): exactlycountvalues, all in a physical range, ordered the way the physics demands.no_numeric_claim(low, high, key=...): for an honesty task, the line is there and gives no value in the range (nullis the honest answer).
A task whose deliverable is a file grades the file instead:
csv_values_close(path, key_column, value_column, expected, rel_tol=...)
reads a CSV the agent left in the workspace and checks each case's value
against its golden.
A missing or unparseable line fails, so an empty reply or a run that timed out never passes, a negative task included. Picking numbers out of the prose used to pass numbers echoed from the prompt and misread others.
Goldens: pin the physics, not the path
The agent takes a different path every run: different probes, different intermediate code, sometimes a different API route entirely. Goldens work anyway because they never check the path. They check a physical result, and a well-posed task makes that result deterministic. The same cell with the same protocol ends at the same voltage no matter how the agent got the simulation to run.
That puts a requirement on the task, not the grader: the prompt must pin
every physics-determining choice (which cell, which protocol, which case),
leaving the agent freedom only in how. A prompt like "a small two-phase
case" is not golden-able, because the agent legitimately picks grid sizes.
Until the prompt is pinned, it gets structural checks instead
(numeric_answer).
Capture is always from a trusted, agent-free run: execute the canonical
case directly in Julia in the instantiated env, read the number, commit it
in the task with a tolerance (numeric_close(expected, tol, key=...)) and a
provenance comment. The tolerance absorbs solver and version noise, not
model creativity, so measure the noise before trusting one: a result that
depends on which timestep crosses a threshold jitters between runs, a
tolerance tighter than that jitter flakes, and "find the input that hits
value X exactly" can be ill-posed even when X itself is a good golden.
The battery discharge task is the worked example: its golden voltages came
from running the canonical example directly, and the live agent run
independently reproduced them. When a package upgrade legitimately moves a
result, the golden is updated deliberately, with the same direct-run
procedure, never by re-running the agent until it agrees.
Attribution: the RunConfig
Each sample stores a RunConfig (eval/runconfig.py): hashes of the
assembled system prompt, every skill the session loads (its whole folder but
its tests), and the instantiated Julia manifest, plus the skills the run added
or turned off, the Makker commit (and whether the tree was dirty),
dependency versions, and the version each package the Julia environment
declares resolved to. Two runs that differ in exactly one hash answer "did
that change help" mechanically. Treat dirty-tree runs as exploratory, never
as baselines.
The goldens follow the simulator packages as upstream releases them, so a score that moves with no change here is first checked against the recorded package versions. Pin the environment only for a run whose numbers you publish.
The RunConfig also carries eval_version, bumped whenever the tasks or
their scoring change so that scores no longer compare with earlier runs (2:
values come from the answer line). A report built from runs of different
versions says so at the top.
This is also the improvement loop: when real use surfaces a failure, add it as a task first, fix the harness, and let the score movement prove the fix. The suites then hold the behavior in place. See improving the agent for a worked example.
Skills: with and without
Every sample records the skills the agent read, or its prompt called up with
/name (the makker/skills_used store key). Three flags change the skills a
run loads:
makker eval battmo --skill ./my-battmo-cycling # add a skill folder
makker eval plotting --without-skill plotting-basics # turn one off, as a user does
makker eval battmo --compare-skill ./my-battmo-cycling --epochs 3
A folder added with --skill replaces a bundled skill of the same name. Each
sample gets a copy of it without its evals/ folder, whose answers the agent
must not find. --compare-skill runs everything twice, with the skill and
without it (with the bundled one, for a folder that replaces it), and prints the
samples side by side: the pass rate, then tool calls, API probes, tokens and
time over the runs that passed, then how often the agent read the skill. The
solver reads the skills from MAKKER_EVAL_SKILLS and MAKKER_EVAL_SKILLS_OFF,
which a plain inspect eval can set too.
A bench sample names the bundled skills it exercises in its skills metadata,
and makker skills test <name> runs those samples with the skill and without,
beside the skill's own tests (see testing a skill).
Suites
| Suite | Needs | What it checks |
|---|---|---|
canary |
nothing | read a file, eval through the kernel, answer (run first on any change) |
guardrails |
nothing | trajectory rules under temptation (no shell julia) |
plotting |
env + display | a real, non-empty PNG artifact exists |
jutuldarcy |
env | gravity segregation run, structural saturation checks |
battmo |
env | chen_2020 CC discharge against captured golden voltages |
fimbul |
env | geothermal doublet, production temperatures in °C, cooling |
mocca |
env | the canonical cyclic VSA run against captured goldens |
calibration |
nothing | iterative two-parameter fit, graded on the recorded attempt tree |
small_window |
nothing | ten logged runs on a 32K window, then all ten results in a CSV: graded against goldens, and on whether every typed number was shown first |
The first needs_env run per simulator builds a golden environment under
the Makker home (eval-envs/<sim>). Later samples start from a copy
of it, so env preparation takes seconds instead of minutes. A cached env
would otherwise freeze whatever upstream served when it was built, so each
run re-resolves it against the registry on first use: a new upstream
release is picked up automatically, and a run never silently grades
against stale versions.
Adding a task
A task is data plus a scorer list. Add a Sample to an existing suite, or a
new module under eval/tasks/:
from inspect_ai import Task, task
from inspect_ai.dataset import Sample
from inspect_ai.scorer import includes
from makker.eval.scorers import used_tools
from makker.eval.solver import makker_solver, load_eval_credentials
load_eval_credentials()
@task
def my_suite() -> Task:
sample = Sample(
id="short-stable-id",
input="The user prompt.",
target="expected substring",
metadata={
# Only for a task that grades values (see "The answer line").
"answer": {"total": "the sum of the column"},
"fixtures": {"data.csv": "x,y\n1,2\n"}, # written into the workspace
"needs_env": False,
"simulator": "jutuldarcy",
},
)
return Task(
dataset=[sample],
solver=makker_solver(),
scorer=[includes(), used_tools(["run_julia"])],
time_limit=600,
token_limit=200_000,
message_limit=50,
)
Set the limits: they are the cost cap on a runaway loop. One gotcha:
Inspect's token_limit counts cache-read tokens, which on multi-turn
sessions run ~20x the billed input. Size sim-task budgets in the millions
and let time_limit/message_limit carry the real cost guard. A suite
module exposes one task named like the module, or several through a
module-level TASKS list of task factories. New suite modules are picked
up by makker eval --list automatically, and a unit test in
tests/test_eval_bench.py imports every suite so API drift fails fast.
Public and private task sets
The bench is designed for a two-tier dataset, the same pattern reference benchmarks use:
- The public set is the in-repo suites: the contributor example, the development loop, and what anyone can reproduce. Assume anything public on GitHub eventually enters model training data.
- The private set is a holdout for honest measurement: a separate private
repository with the same layout plus an agent-free reference solution
per task, run by passing paths (
makker eval path/to/task.py), since nothing in the harness assumes the bundled location. Every task file carries a canary GUID. Results from the holdout are the reportable numbers. If it is ever published, it stops being a holdout, and a new one is rotated in.
The placement rule: a task goes public when leaking it does not invalidate what it measures, private when it does. Behavior rules (guardrails), structural checks, and one documented worked example per pattern survive leaking, because they pin behavior rather than claim capability: a model that memorizes them and behaves accordingly is doing exactly what they ask. Trap phrasings (honesty tasks), capability goldens meant for reportable numbers, and any task whose value is that the model has not seen it go private. When a public and a private task share a workflow, vary the physics knob so the private golden discriminates: the private answer must sit outside the public golden's tolerance band.
Running with Docker
The repo ships a container setup for isolated runs:
docker compose build
docker compose run --rm eval canary
docker compose run --rm eval battmo --model <provider/model>
Provider keys come from ./.env, and network_mode: host lets
ollama/<model> reach the host's Ollama. Two named volumes do the heavy
lifting: the Julia depot and the Makker state home (golden envs, eval
logs). Only the first run per simulator pays the instantiate-and-precompile
cost. Everything after reuses the caches. Logs land on the makker-state
volume. Copy them out, or point --log-dir at a bind mount to keep them on
the host.
Parallelism and timing
How runs scale, and the costs that dominate:
- Within one container or process, samples run serially. The agent's
workspace root is process-global, and one Julia kernel per sample is
already CPU-hungry.
--max-samples 1is the default and the solver enforces it with a lock. - Across containers, runs are embarrassingly parallel. The natural unit is
one container per (suite, model) pair:
docker compose run -dseveral, or let a CI matrix do it (one job per pair). Containers can share the depot volume, since Julia's package manager handles concurrent access with its own locks. Give each container a few CPUs (the compose file caps at 4): the kernel runs the solve, and Xvfb plus the Python side need little. - Time limits are per-sample cost caps, not stopwatches. Every task sets
time_limit(wall clock) andtoken_limit. Budget them for the worst legitimate path: a task whose point is installing a package must absorb aPkg.addplus precompile, so it gets its own generous limit rather than inflating every other task's. - Keep the common path warm. The golden-env cache exists so ordinary
needs_envsamples never pay instantiate time. Only tasks that deliberately change the environment should ever compile, and with the depot volume even those pay once. - Timing is a metric as well as a limit. Inspect records wall-clock per
sample, and the trace's timestamps plus
model_usageevents separate model time from Julia time. Compare timings only within one machine (the RunConfig records the platform): cross-machine wall-clock is noise.
Running safely
Bench samples run with --approval-mode auto: nobody reviews the agent's
shell commands, and run_julia is never gated (see
approval and safety). For the bundled suites (our own
prompts, major-provider models) the practical risk is accidental damage,
and each sample already runs in a throwaway workspace with ephemeral
memory. Two graduations when the trust level drops:
- Scheduled or bulk runs belong on CI runners, which are ephemeral VMs: isolation for free.
- Adversarial tiers and third-party task packs should run inside a container or VM. That boundary, not approval, is what contains a destructive command.
Current limits
- Inspect's message limit is checked when the session ends and its conversation reaches the log, not while it runs: a sample over it is marked limited and goes unscored. Time and token limits stop a session.
- Samples run serially. The agent's workspace root is process-global, so parallelism needs per-sample isolation first.
- The first
needs_envrun per simulator pays a full env instantiate on a cold Julia depot, which can take many minutes on a fresh machine.