How you know it worked
Benchmarks, budgets, null results and measurement mistakes. The skill that separates a demo from evidence.
By the end of this chapter
- Design a fair comparison with one independent variable
- Read a results table, including the null results, without fooling yourself
- Understand budget-tiered evaluation (BudgetBench)
A demo is not evidence
An agent that works once on a task you chose is a demo. An eval (short for evaluation) is a repeatable procedure that scores a system on a set of tasks, so that you or someone else can run it again and compare. The skill in this chapter is less about running benchmarks and more about not fooling yourself with the numbers they produce.
Chapter 5 ended with a claim from Aditya's harness guide: the same model can behave very differently in different harnesses. If that is true, then "which model is better" and "which harness is better" are different questions, and any comparison has to say which one it is asking. That is the idea of an independent variable: the one thing you change on purpose while everything else stays fixed.
One variable at a time
Suppose you want to know whether retrieval beats truncation for an agent's memory. You run strategy A and strategy B and B scores higher. Was it the strategy? Only if nothing else changed. If B also ran on a larger model, or with more tokens, or with a different sampling temperature, the gap has several possible causes and you cannot tell them apart.
Only memory strategy differs. If B scores higher than A, there is exactly one thing it can be credited to.
Try the second preset, then the first. BudgetBench takes the strict route. In BudgetBench Explained the harness fixes the model, task, sampler and decoding settings. All runs use temperature 0 and a fixed seed. The one thing swept on purpose is the per-call input-token budget, at 2K, 4K, 8K, 16K and 32K tokens. Each strategy is then scored at each budget, so every cell differs from its neighbor in one way.
Budget as the variable you sweep
Why make budget the variable? Because a model's advertised context window is not what you spend per call. The post separates the nominal window, the total cost of a task and the active budget, meaning how many input tokens one call may see. On a laptop you may not want to pay the prefill cost of a full window on every turn, so the budget you choose is a real engineering decision.
A memory strategy is a function that takes the message history and a budget and returns messages that fit. The strategies compared include truncation (keep what fits), summary compression, episodic RAG (retrieval-augmented generation, which fetches only the relevant pieces) and lean retrieval. Drag the slider to see the real numbers.
At 2K, truncation scored 0.380 while RAG scored 0.646. Retrieval at 2K (0.646) is about what truncation needs 8K to reach (0.650).
On the LongMemEval oracle study (500 questions), the post's headline is that retrieval at 2K scored 0.646 while truncation needed 8K to reach 0.650. On the smaller LongBench v2 pilot, nothing rises steadily with budget at all. That contrast is the reason to sweep: a single-budget evaluation would have picked one column and reported a conclusion that the neighboring column contradicts.
One design choice is worth copying. The runner does not trust the strategy. After the strategy returns a prompt, an enforcer counts the tokens independently. If the prompt is still over budget, the harness logs a violation row for that item instead of dropping it. A strategy that cannot produce a legal prompt has failed differently from one that produced a legal prompt and got the answer wrong, and a benchmark that silently drops the first kind overstates it.
Reading nulls and intervals
A null result is a comparison that shows no clear difference. Nulls are easy to hide and honest papers report them. A number alone is not enough. You also need to know how uncertain it is. A bootstrap interval is a range built by resampling the data; if the range for a difference includes zero, the data does not show a difference.
Hosted: Truncation 8K: difference -0.20, interval [-0.34, -0.07]. The interval excludes zero, so this loss is real at this sample size.
Only one row excludes zero: truncation at 8K on the hosted model, which is clearly worse than full context. The others do not establish a loss and, importantly, do not establish equivalence either. The post says this directly: the local 1.5B result is near-null and the intervals are far too wide to claim a tie. The paper's honest summary is that nothing in its paired intervals establishes equivalence.
The post is just as careful about what it does not claim. It does not rank strategies, because most studies used 30 to 89 items and were mostly single runs. It makes no latency claims, since durations are only operational diagnostics: in the hosted run, two settings that send identical prompts still differ by about 16 seconds, which the post attributes to provider variance. It treats only one local model as publicly reproducible. And the SWE-bench rows use a patch-similarity proxy, not the official resolved rate, so the paper treats them as a check of the plumbing, not as a result. A list of limits like this is part of the evidence. It tells the reader which conclusions the data will not support.
The post also contains several cases where a tidy number would have misled. Open each one.
RAG at 8K (0.34) beats full context at 32K (0.32), so retrieval wins.
The paired difference is +0.02 with an interval of [-0.08, +0.12] on 50 items. That includes zero, and it is too wide to claim equivalence either.
The last case is the most instructive. The team found that their own token counts were off, downgraded their own table, and made the runner take an explicit --tokenizer flag and log the tokenizer ID, a prompt hash and the counted tokens for every call. The post's reasoning: a budget benchmark whose counts are off (Qwen's counts averaged 5.5% higher than the tiktoken counts) is measuring a different budget than the one on the label.
Evals for agents, not just prompts
Agents are harder to score than single answers because the result is a sequence of actions. In Building Quecto, Aditya describes moving from demos to a native evaluation harness. Tasks are described in an eval.yaml file, run in isolated workspaces and graded with scripts, telemetry or rubrics, while traces record turns, tokens, latency and tool use. An earlier 10-task TerminalBench-style smoke suite passed 10 out of 10 deterministic runs. The post sorts tasks by purpose: regression, capability, compatibility and telemetry.
The same lesson holds when the model runs on your own machine, which is the thread through two more of Aditya's projects. locobench is a set of local coding-model benchmarks that uses the Harbor harness, the Terminus-2 agent and Ollama. local-code-review is a parallel council of local AI reviewers for correctness, security and regression, routed by a deterministic code graph and gated by a verifier, running on a laptop. Both are linked below. The common move is a verifier or grader that is separate from the model being tested, so the model does not mark its own work.
Grading deserves the same care. A grader is the code or model that scores an answer. BudgetBench uses deterministic or versioned graders, so a score means the same thing on a later run. Quecto's eval harness composes script graders, telemetry graders and LLM rubric graders. A script that checks whether a test passes is cheap and repeatable. A model acting as a judge can cover softer questions, but then the judge becomes one more variable you have to hold still. For the LongMemEval study the post used the official evaluator with GPT-4o, which is an example of borrowing a published grader instead of inventing one.
The BudgetBench post lists what to do before acting on a comparison: pin the envelope first (model, tokenizer, hardware or provider, and the budget tiers you will actually ship), gate on compliance before quality, use tiny runs only to check plumbing, use at least 100 items with paired item-level estimates for anything you will act on, and measure full cost, including latency and auxiliary model calls.
Try it yourself
The BudgetBench post gives these commands to run the full five-tier sweep against a local Ollama model, using the served model's tokenizer:
git clone https://github.com/aviskaar/budgetbench cd budgetbench pip install -e . python scripts/run_pilot.py --full-study \ --model qwen2.5:1.5b \ --tokenizer Qwen/Qwen2.5-1.5B-Instruct \ --repeat-cells 3 --shuffle-cells
Per the post, raw logs land as one JSONL file per task, strategy and budget, and scripts/analyze_results.py and scripts/plot_tradeoffs.py turn them into tables and figures. When you have them, find one place where a larger budget scored lower than a smaller one and look at the item-level flips, as the post suggests, before calling it noise.
Conceptual exercise: write down a comparison you care about, such as two coding agents on your own repository. List every variable that could differ. Choose one to change and fix the rest. Then decide, before running anything, how many items you need and what result would count as a null.