Rhys Brett-Bowen Coding in the age of AI

Tune the Prompt Before You Split It

12 min

Confidence the loop is built and dogfooded; the stopping rule is a judgment call I have run twice and not measured

“Everything should be made as simple as possible, but not simpler.” — attributed to Albert Einstein, in the form given by Roger Sessions (1950)

A single clay tablet is reworked in place four times, each pass leaving it denser, before a slate blade finally divides it into two smaller tablets.

Here is the loop. The agent produces something you don’t like. You open the prompt, add the missing instruction, run it again. It’s better. A week later the file is 400 lines, you have no idea which lines are load-bearing, and you are reluctant to delete any of them.

That loop is where almost all of the value is, and nobody measures it. This is how to.

It is also the step before Building an Agent Graph. Do not split a prompt into a graph until you have finished tuning the prompt — splitting multiplies the surface you have to tune, and a graph of five badly-tuned nodes is worse than one well-tuned prompt and far more expensive to fix.

Bottom line up front

  • Run it on work you already have, today. Not a synthetic scenario. The first useful signal is you reading one real output and saying what’s wrong with it.
  • Say what you’re optimising for before you edit anything. Signal, length and coherence pull against each other, and an unconstrained loop maximises one and wrecks the other two.
  • Capture failures at the moment they happen. People will complain on demand and will never interrupt a good run to log it. Build for that asymmetry or your eval set will be all synthetic.
  • Check the thing is evaluable before you measure it. A rule whose trigger can’t fire in your harness scores zero forever, and the zero looks like a finding.
  • Test at the depth the rule has to hold. A rule followed in a fresh session is followed less reliably 60k tokens later — so pick the depth from where the rule is load-bearing, rather than always reaching for a full window.
  • Stop tuning and start splitting when your edits begin fighting each other — when the instruction that fixes one case breaks another, you have two jobs in one prompt.

1. Run it on something you already have

Take a real piece of work — a diff you shipped, a document you wrote, a ticket you closed — and run the prompt over it. Read the output. Decide whether you like it.

That is the whole first step and people skip it to go build a harness. You cannot specify what good looks like until you have seen the system be bad at something you understand. One real output you can judge beats ten synthetic scenarios you can only guess at.

Do it three or four times, by hand, on different inputs. You are not measuring yet. You are finding out whether the job is even the job you thought it was.

2. Say what you’re optimising for

This is the step the whole post turns on, and it is usually skipped because it feels like paperwork.

There are at least three axes and they pull against each other:

Axis What it buys What more of it costs
Signal the agent knows what you want length, and eventually coherence
Length less context, cheaper, less to drown in the instruction you cut was doing something
Coherence the file reads as one voice and can be edited you can’t just append the fix

Left alone, an optimisation loop — human or automated — maximises signal. It adds every instruction that fixes a case, and the file grows until it is internally inconsistent and nobody can edit it without fear. That is the failure mode, and the fix is a constraint rather than better judgment: minimise length subject to no adherence regression, with coherence held as a judged guardrail. Reject an edit that trims tokens and drops coherence below threshold.

The same shape shows up whatever you are building. For a reviewer it’s recall against cost against false positives. For a summariser it’s fidelity against length. Name the axes, pick the one you are minimising and the ones you are holding, and write it down before you start editing — because once you are in the loop, every edit looks like an improvement on whichever axis you happen to be looking at.

Finding out which lines are load-bearing

Anthropic’s own test is “would removing this cause mistakes?” — which is answerable rather than rhetorical. Ablate at rule-group granularity, a heading with its examples rather than a bare line, because lines interact and a header often carries context indirectly:

  • without — remove the group, measure the adherence delta
  • sham — replace it with the same volume of inert text, so you can tell a real contribution from the effect of the file simply being longer

Without the sham arm you cannot distinguish an instruction that works from one that is padding the context in a way the model happens to like.

3. Capture the failures when they happen

Your eval set should be harvested from real use, not written cold. The way to harvest it follows one behavioural fact: people complain on demand and will never interrupt a good run to log it.

So the two directions need different mechanisms. For failures, a command the user runs the moment the thing fails them. At that instant you get three things for free: a real failure rather than an imagined one, captured at the context depth it actually occurred at, with the person present to say what they expected instead. That is the most valuable data point the system will ever produce and by default it is thrown away. Successes need to be sampled passively, because nobody will stop to record one.

Every captured failure becomes a depth-tagged case. That is your corpus, and you accreted it by using the thing rather than by sitting down to build one.

4. Check it’s evaluable before you measure it

This one cost me a real correctness hole, so take it as a gate rather than a tip.

Before building a harness, classify how success can be observed at all:

  • deterministic-evaluable — an output you can check with code
  • soft-evaluable — no deterministic oracle, but judgeable. This is the normal case, not a failure state
  • evaluable-after-lift — needs an output surface that does not exist yet

The trap is the fourth category nobody names: a rule whose trigger cannot fire in your harness. A rule like “when you finish a task that changed files, end with DONE:” cannot fire in a harness with no tools. Score it anyway and you bank a zero that looks exactly like a failing rule. In the dogfood run the classifier existed and nothing called it. So the loop was doing precisely that: scoring a phantom failure against a rule that never had a chance. Of three fixture rules, only one was cleanly text-evaluable.

Gate on this before the baseline, not after. A broken oracle does not announce itself; it produces confident numbers.

5. Tune by hand before you automate

Run the loop manually until it is boring. You are learning what the edits look like, and you cannot automate a loop whose steps you cannot describe.

Automate when two things are true: you are making the same kind of edit repeatedly, and you have enough captured cases that running them by hand is the slow part. Before that, automation is a harness you will tune instead of tuning the prompt.

6. Then automate it, and add the examples

The automated version is the same loop with the judgment moved into an objective. Propose an edit, score it against the captured cases, and keep it if it improves the axis you chose without regressing the ones you are holding.

Add worked examples to the tuning set as you go. An example is the cheapest form of instruction and usually the highest-signal — it is the thing you reached for by hand when prose wasn’t landing.

Two things make the difference between a loop that works and a loop that flatters you.

Test at depth

Instruction adherence is context-length-dependent, so a single-point eval is invalid. A rule the agent follows reliably in a fresh session is followed less reliably once the window is full — which is exactly the moment the rule is load-bearing.

Run every scenario at a minimum of two fills: fresh, and near-full. The dogfood loop padded to 60k tokens. Report an adherence-versus-depth curve per rule, and let a rule pass only to the depth it is required to hold.

Compaction is a separate step change — the file gets re-injected fresh, or summarised away — and it can only be tested faithfully against the client you actually ship on. Simulated compaction is diagnostic, never a gate.

Decide who judges

If the judge shares the target’s model family, it shares its blind spots. Errors across models correlate rather than scatter, and the correlation rises with capability (Kim et al., 2025). Re-running the same family does not remove shared error.

So the ladder puts a cross-family judge at the top — a different vendor scoring the output — with the cheaper rungs always applied underneath.

Read that as better than nothing, not as independence. A different vendor is not a different education. Families train on overlapping data toward similar objectives, so blind spots correlate by origin rather than by brand, and swapping vendors moves you somewhere else on the same map rather than off it. That causal reading is mine rather than Kim’s, and it is argued at length in A Pool of Models Narrows the Overlap.

I have also measured it going the wrong way. A preregistered run over four families on 13 planted-bug fixtures found misses came out more correlated than chance, not less — median overlap ratio 1.56 against an against-band of 1.3, with three of six pairs perfectly nested, meaning the second checker contributed nothing at all. Those were 4-bit quantised 1.5B–7B models on a laptop, which is not the frontier case the ladder is written for.

None of that is a reason to skip the rung — partial decorrelation beats re-running the family you are trying to check. But it is not the only move against shared error, and I should not have implied it was: independently produced labels, a human adjudicating a sample, and any deterministic check you can write all attack the same problem, and the deterministic one is free every time it applies. It is a reason not to treat its verdict as independent evidence, and to check the assumption at your own scale instead of inheriting it. See also You Can’t Grade Your Own Misses.

7. Stop tuning when the edits start fighting

There is a point where tuning stops paying, and the tell is specific: the instruction that fixes one case breaks another. Not a regression you can patch — a genuine conflict, where the two cases want opposite behaviour from the same prompt.

That is the same tell as the one in the graph guide, arriving earlier: one prompt may be doing two jobs with different error budgets. It is a reason to investigate splitting, not proof that you must — the honest first move is to try a condition, or more task context, and see whether one prompt can hold both after all. Split when that fails, because the structural fix costs a call and a boundary and you want to have earned it.

This is the real progression, and I have run it twice with different endings.

The first is still a single prompt. It has been tuned, repeatedly, and it has never needed splitting. One job, one error budget, and the tuning kept paying.

The second started as a single prompt too, and went further. It split into scouts and deep passes and writers, and then each node got tuned on its own — which is only possible once they are separate calls with their own schemas. The split did not replace the tuning. It multiplied the number of things worth tuning, and made each one tunable against its own objective.

The order matters. Tune first, split when tuning stops working, then tune the pieces. Splitting a prompt you never tuned gives you several badly-tuned prompts and a harness bill.

What to do on Monday

  1. Take one real input you already have. Run the prompt. Read the output.
  2. Write down the axis you are minimising and the ones you are holding.
  3. Add a way to capture a failure the moment it annoys you.
  4. Before you build any harness, check each rule’s trigger can fire in it.
  5. Tune by hand until it’s boring, then automate that loop.
  6. Re-run at the depth the rule actually has to hold before you believe it.
  7. Split only when an edit that fixes one case breaks another.

How sure I am: the loop is built and was dogfooded against a fixture instruction file at 60k-token depth, and the evaluability gap in step 4 is a real bug that run found and fixed. The three-axis objective and the ablation design are implemented. The stopping rule in step 7 is the weakest part — I have run that judgment twice, on two different reviewers, and both times it was a call rather than a measurement. I do not have a number that says “tuning has stopped paying here”. If you have one, it is worth more than the rest of this post.

Sources

  • A prompt-tuning tool of my own, and its design note Tuning prompts and agent instruction files (2026-07-08) — the three-axis objective, the with/without/sham ablation at rule-group granularity, the asymmetric capture entry point, the evaluability pre-pass, the context-depth axis and the judge independence ladder. The dogfood findings are from the 2026-07-10 run. Not published, so this is an author’s-own source rather than something you can go and read.
  • Its diagnose-and-slim counterpart — a separate tool for the other half. Run that one first on a skill that is new, broken, or doing deterministic work in prose; the tuner is for a skill that already works. Also unpublished.
  • Kim, Garg, Peng & Garg, Correlated Errors in Large Language Models (2025, arXiv:2506.07962; ICML) — errors correlate rather than scatter, and the correlation rises with capability. The why — overlapping training data and similar objectives, so blind spots correlate by origin rather than by vendor — is my reading rather than the paper’s, and is argued in A Pool of Models Narrows the Overlap.
  • Anthropic’s context-engineering guidance — the “would removing this cause mistakes?” test, operationalised here as the ablation.

Related: Building an Agent Graph — the step after this one, and the place to go when an edit that fixes one case starts breaking another; Rules Are the Alpha — why the knowledge in the prompt is where the early gains are; A Big Rule Set Is an Attention Problem — what happens to a prompt that only ever grew; A Pool of Models Narrows the Overlap — the judge-independence claim and its limits.