The Local Model Ledger
Desk Setup & Maintenance 2026-10-18 11:40 0 reads

The Coffee-Roasting Rule for AI Evaluation: Control the Variables Before You Blame the Model

The Coffee-Roasting Rule for AI Evaluation: Control the Variables Before You Blame the Model

Drawing a parallel from coffee roasting, this article emphasizes the "coffee-roasting rule" for language model evaluation: control your variables before blaming the model. By maintaining strict pre-flight checks—such as locking sampling settings, prompts, and quantizations—developers can eliminate hidden degrees of freedom, ensure reproducible test results, and make reliable, evidence-based decisions rather than relying on guesswork.

I learned the most important lesson I know about evaluating language models from a bag of green coffee and a small home roaster.

Years ago, before Mistral Large 4 or any of the current generation of models existed, I ruined a perfectly good Ethiopian lot by changing three things at once—charge temperature, gas level, and airflow—and then deciding the beans themselves were defective. The cup was harsh and hollow. I wrote the roast off, ordered a different origin, and only later realized I had no idea which variable had done the damage. I had broken the first rule of any careful craft: change one thing at a time, write down what you changed, and only then decide what the result means.

That same rule now sits at the center of every evaluation I run on Mistral Large 4 and the systems around it. I call it the coffee-roasting rule: control the variables before you blame the model.

Why the Rule Matters More Than Any Single Benchmark

A close-up view of a hand adjusting temperature controls on a coffee roasting machine.

Language-model evaluation is full of hidden degrees of freedom. Temperature, top-p, system prompt wording, context length, quantization level, runtime version, retrieval parameters, even the time of day the call is made—any of these can shift the output. When several of them move at once, the resulting success or failure becomes almost impossible to attribute. Teams then publish claims that cannot be reproduced, or they discard a model that would have been fine under a tighter protocol.

I have watched this pattern repeat in my own work. A prompt that looked broken under one quant and one sampling setup became reliable once I restored the previous quant and locked the temperature. A “model regression” disappeared when I discovered the retrieval chunk size had silently changed. In each case the model was the easy thing to blame. The uncontrolled variables were the actual cause.

The coffee-roasting rule is the discipline that prevents that mistake. It is not glamorous. It is the reason the rest of the test notebooks, the five-run protocols, and the failure logs remain trustworthy.

What the Rule Looks Like in Practice

Before any tokens are generated I write down the same pre-flight list I use in the reproducible test notebook:

  • Exact model identity and endpoint (or quant + runtime + commit)

  • Sampling settings (temperature, top-p, max tokens, anything else that is not default)

  • Full system prompt and user prompt (or versioned references plus hashes)

  • Source documents, chunking method, and retrieval parameters if RAG is involved

  • Hardware and environment notes

  • Success criteria written in advance

Then I change at most one intentional variable between related runs. If I want to know whether temperature 0.1 is better than 0.3 for JSON fidelity, that is the only thing that moves. The prompt, the source material, the quant, and the runtime stay fixed. If I want to compare two quants, the prompt and sampling settings stay fixed. The rule is simple and repeatedly broken by tired people who just want a quick answer. Writing the variables down first is the only reliable defense.

After the runs I record the outcomes against the pre-written criteria, note the quiet failure modes, and only then form a conclusion. The conclusion is always framed as “under these controlled conditions.” Anything broader is a different claim that requires a different experiment.

A Concrete Example from the Roaster and the Model

When I roast coffee I keep a paper log: origin, charge weight, charge temperature, turning point, yellowing time, first-crack time, drop temperature, total roast time, and a short cupping note two days later. If the cup is underdeveloped I do not immediately raise the end temperature and shorten the roast and change the airflow. I pick one lever, write down the new plan, and roast again. Only after several controlled cups do I decide what the bean actually needs.

The parallel in model evaluation is exact. Last month I saw structured-extraction fidelity drop on a local quant. My first impulse was to blame the quant and move back to the API. Instead I locked every other variable and re-ran the same five prompts at the previous quant level, then at the new one, then at the new one with a slightly stronger schema instruction. The fidelity drop tracked the quant; the stronger instruction recovered part but not all of the loss. Because the variables were controlled I could make a precise decision: keep the milder quant for any workflow that writes to a parser, accept the more aggressive quant only for batch jobs that can tolerate extra review. Without the rule I would have made a coarser, less informed choice.

How the Rule Interacts with the Rest of the Practice

The coffee-roasting rule is the reason the other habits on this site exist:

  • Five identical runs exist so that variance under fixed conditions becomes visible.

  • The failure notebook uses consistent language so that the same quiet error can be recognized across weeks.

  • The weekly and monthly maintenance schedule includes re-validation steps so that a runtime or weight change does not silently invalidate earlier conclusions.

  • The test notebook template forces the pre-flight fields to be filled before the first call.

All of these are downstream of the same idea: an uncontrolled experiment produces stories, not evidence.

Common Ways the Rule Gets Broken (Including by Me)

I still break it under time pressure. The usual failure modes are:

  • Changing the prompt and the temperature in the same session because “both needed fixing.”

  • Updating the runtime and the quant on the same day and then attributing every difference to the quant.

  • Running a quick check on a new document set without recording the chunk size or the retrieval k.

  • Declaring a winner after one clean run instead of waiting for the five-run sample under lock.

Each of these creates a notebook entry that later cannot be interpreted. The only remedy is the same one I use when a roast log is incomplete: treat the result as provisional and re-run under proper control when time allows.

Practical Checklist for Anyone Who Wants to Adopt the Rule

  1. Write the controlled variables down before the first call.

  2. Change only one intentional variable between comparative runs.

  3. Record raw outputs and scores against criteria that existed before the outputs.

  4. Frame every conclusion with the conditions under which it was obtained.

  5. When something looks like a model failure, ask first whether any other variable moved.

  6. Keep the logs. Future you will need them.

The rule does not require expensive tools. It requires a text file, the willingness to slow down by five minutes, and the humility to admit that the first explanation is often incomplete.

What the Rule Does Not Do

It does not make evaluation fast. It does not eliminate the need for human judgment. It does not turn a weak model into a strong one. It only makes the claims you do publish more trustworthy and the decisions you make more reversible. In a field that still contains a great deal of marketing heat, that is already a substantial improvement.

A developer’s desk corner featuring a physical 'AI Evaluation Pre-flight' checklist on a clipboard.

Closing

I still roast coffee on the same small machine that sits a few feet from the inference server. The paper roast log and the Markdown test notebook use different vocabulary, but they obey the same discipline. Control the variables. Write them down. Only then decide what the result means.

That discipline is the quiet foundation under every baseline, every stability test, every local-versus-API comparison, and every workflow I have described on this site. Without it the rest is just storytelling with extra steps.

Here is what I controlled, here is what changed, and here is what I still don’t know. The controlled part is the rule itself. The rest continues every time I sit down to test a new prompt, a new quant, or a new piece of source material and force myself to fill the pre-flight fields before I hit send.

If it only works in the demo, it isn’t in the workflow yet. And if the evaluation only works when the variables are left free to wander, it is not yet an evaluation you can trust—any more than a roast you cannot reproduce is a roast you can improve.

Last updated — 2026-10-18 11:41
Comments [ 0 ]

No comments yet.

Leave a comment