Our model bake-off commits 2,436 bytes and gitignores 640,036, because the inputs are other people's comments
Choosing a model for a job is an experiment, and an experiment needs inputs. For Nakodo the inputs are websites and YouTube channels and the comments under their videos: real text, written by real people who have never heard of us. That turns "let us compare four models" into a data retention question before it is a benchmark question.
This post is about the harness rather than the result. The result, which model won each of our four AI jobs and why the most accurate one lost on one of them, is an earlier post. Here I want to go through the parts that I would copy into the next project.
The whole benchmark directory
$ ls -la benchmark/ 408,826 data.json the test set, with comment text 216,528 raw-outputs.json every candidate's output, kept verbatim 11,355 reference-sample.md 50 random rows for a human to check 3,327 run.log 2,436 results.md $ git ls-files benchmark benchmark/results.md One file of the five is in the repository. The rule is in .gitignore, written as an allowlist rather than a denylist:
# benchmark inputs hold YouTube comment text; only results.md is kept /benchmark/* !/benchmark/results.md The difference matters more than it looks. A denylist (benchmark/data.json) is correct until the day the script writes a sixth file, and then it is silently wrong. An allowlist is correct forever: anything new in that directory is ignored until somebody decides, in a commit, that it should not be.
What ends up committed is 2,436 bytes of markdown: four tables, the recommendation, and the sentence that explains how the recommendation was reached. That is the artifact that still matters in six months. The 640,036 bytes that produced it are evidence, and evidence made of other people's words is a liability, not an asset.
The three roles
Three different models do three different things, and they are deliberately not the same model.
- Four candidates, the cheap models we are choosing between.
- One reference model, an expensive one, which labels the 205 comments so there is something to measure accuracy against.
- One judge, a different expensive one, which scores the written outputs against a rubric.
The reference model is the ground truth for the only task that has a right answer. The judge handles the tasks that do not. Letting a candidate judge itself, or letting the reference model judge the outputs it also labelled, would be the cheap version of this and it would be worthless.
Because the ground truth is itself a model, the prepare step writes out 50 random labelled rows for a person to read:
# Reference labels to check (gpt-6-astra) Labels: question, discussion, praise, spam, self_promo. Language is ISO 639-1 (und = no words). | # | Label | Lang | Comment | Video | Fifty rows is small enough to actually read and big enough to notice a systematic mistake. The full set is 205 comments, 40,943 characters, labelled 134 discussion, 34 question, 25 praise, 12 self_promo.
Blind, and blind in both directions
The judge is given the input the writer was given, then the outputs under letters:
const order = shuffle(outputs, seed); const ids = order.map((_, i) => String.fromCharCode(65 + i)); const input = [ "=== Input the writer was given ===", context, ...order.map((o, i) => `\n=== Output ${ids[i]} ===\n${o.text}`), ].join("\n"); with this instruction:
You grade outputs from different AI models for the same task, without knowing which model wrote which. Judge each output on its own merits against the rubric; outputs can tie. Return one score per output id. Two details carry the weight. The shuffle is seeded per item, not per run, so a model is not always output A, and the ordering is still reproducible. And "outputs can tie" is there because a judge asked to rank will rank, inventing a difference between two outputs that are both an eight.
function shuffle<T>(xs: T[], seed: number): T[] { const out = [...xs]; let x = seed; for (let i = out.length - 1; i > 0; i--) { x = (x * 1103515245 + 12345) % 2147483648; const j = x % (i + 1); [out[i], out[j]] = [out[j], out[i]]; } return out; } A linear congruential generator in six lines, because Math.random() would have made the run unrepeatable and a dependency would have been silly.
When the judge call fails, the item is skipped rather than scored zero. A judge outage is not evidence about a candidate.
Validity is not quality
Every task counts two things separately: whether the call came back usable at all, and how good it was. Usable is checked in code, not by a model:
if (keywords >= 8 && r.brief.targetMarkets.length > 0 && r.brief.productSummary.trim()) m.valid++; if (r.subject.trim() && words >= 50 && words <= 200 && !r.body.includes(DASH) && r.optOutLine.trim()) m.valid++; DASH is the em dash character, written as a literal in the file. The second check is my favourite, because the house style ban on em dashes, which is a unit test in the product, turns up here as a validity gate. A model that writes beautifully and cannot stop typing em dashes is not a candidate, it is a rewrite.
Those two numbers moving apart is the whole reason the benchmark exists. The results table has a model at 96.4 per cent accuracy and 80 per cent valid output sitting next to one at 97.1 per cent and 100 per cent, and the decision rule in the committed file resolves it in one sentence:
Rule: among models with at least 90% valid output, the cheapest one within 3 points of the best accuracy (comments) or 0.5 rubric points of the best score (other tasks).
Transient provider failures do not count against anyone. They are retried with a long backoff and only a persistent failure becomes a score:
const transient = status === undefined ? /connection|timeout|ECONNRESET/i.test(String(e)) : status === 429 || status >= 500; Cost from the receipts
Nothing in the cost column is estimated from character counts. Each call returns its usage and the price table is in the file, with the date it was checked:
// USD per 1M tokens: input, cached input, output (checked October 2026). const PRICES: Record<string, [number, number, number]> = { ... }; function cost(model: string, u: Usage): number { const [inp, cached, out] = PRICES[model]; return ((u.inputTokens - u.cachedInputTokens) * inp + u.cachedInputTokens * cached + u.outputTokens * out) / 1e6; } Cached input is priced separately because it is an order of magnitude cheaper and because a benchmark that runs the same context through four models will have cache hits that a production workload would not. Reasoning tokens are counted as output, since that is what the bill does. The results are reported per 1,000 items rather than per call, which is the only unit that lets you compare a cheap slow model with an expensive fast one without doing arithmetic in your head.
The part I got wrong
The harness has three commands: prepare, run, cleanup. The third one deletes the stored comment text.
if (command === "cleanup") { for (const f of [DATA_FILE, SAMPLE_FILE, RAW_FILE, CHECKPOINT_FILE]) rmSync(f, { force: true }); } data.json says "createdAt": "2026-10-01T14:33:13.814Z". Today is 29 November. I have not run it in 59 days, and 420 KB of other people's comments have been sitting in a working directory ever since, outside git and inside every backup my laptop has taken.
The gitignore did its job. The retention policy did not, because it is a command a human has to remember, and the interesting parts of this harness are all the places where I did not trust a human to remember: the seeded shuffle, the checkpoint that resumes an interrupted run, the price table with a date on it.
The fix is the obvious one and it is three lines: have run call the cleanup itself once results.md is written, and have prepare refuse to start when it finds a data file older than a day without a flag. Then the only way to keep the comment text is to ask for it.
What I would copy
- Allowlist the output directory in
.gitignore. Two lines, and it keeps being right after the script changes. - Separate the model that makes ground truth from the model that judges. And write out a sample for a person, because a benchmark whose truth is unchecked is a vibe.
- Seed the shuffle per item. Reproducible and position-independent at the same time.
- Count validity apart from quality. The failure that matters in production is usually "came back unusable", not "came back mediocre".
- Make the retention automatic. A cleanup command is a note to yourself, and this post is the proof of how well that works.
Nakodo uses the models this picked for the work you can watch from the outside: it reads a brand's own website and writes the campaign brief from it, which is what the product does first, and the free plan runs the same pipeline as the paid one, so the pricing page is the honest version of what the cost column above eventually buys.