AI Engineering · The Wrenlet Saga · Free article
Did Yesterday’s Change Make It Worse?
Somebody tweaked the prompt and nobody can say whether it helped. You cannot answer that without three things: a fixed golden set, a judge you checked against human labels, and a gate that knows how wide its own numbers are.
Chapter 6 closes the arc by giving Wrenlet the one thing every earlier fix quietly assumed: a way to know whether a change helped. Right now someone edits the prompt, it looks fine on the demo, it ships, and a week later quality has drifted with nobody able to name when. The cure is an evaluation loop: a standing golden set of real tickets with known-good answers, a model acting as a judge so you can grade hundreds of them cheaply, and a regression gate that only turns green when the improvement is bigger than the measurement noise. The subtlety is that the judge is itself a fallible model with biases you have to catch and validate, so you learn to trust it the way you would trust any instrument, by checking it against the truth.
It is a quiet Tuesday. A teammate notices Wrenlet's replies feel a touch stiff, tweaks two lines of the system prompt to warm them up, checks the one ticket everyone always demos, sees a nicer reply, and ships it. Reasonable. Except three days later the head of support says resolutions feel off: the tone is friendlier and the drafter has started softening refund policies it used to state firmly. Was it the Tuesday change? Nobody knows. There is no before, no after, no number. There is just a running system that used to be trusted and now is not, and a git log full of “tweak prompt” with no way to tell which tweak did the damage.
This is the failure mode that has been lurking under every chapter. You changed chunk sizes in Chapter 4, added a reranker in Chapter 5, and edited prompts constantly, and each time you checked by looking at a handful of outputs and trusting your gut. That works for a demo and falls apart for a product, because a human eyeballing five replies cannot see a regression spread across the other five hundred. Chapter 6 is the discipline that ends the guessing: you build an instrument that measures quality, and you gate every change on it.
First, a set you can actually measure against
You cannot measure “is Wrenlet good” in the abstract. You measure it against examples. So you pull a few dozen real tickets, deliberately including the hard and weird ones rather than just the easy demo, and for each one you write down what a good answer looks like. That is a golden set: a fixed, labelled slice of reality you can re-run any change against. Build it by reading actual failures and grouping them, so your set covers the ways Wrenlet really breaks (the softened-refund case now has a permanent home in it) rather than the cases you imagined. The LLM evaluation page calls this looking at your data first, and it is the unglamorous step that makes every number afterward mean something.
The payoff is immediate. The moment you have a set instead of a demo, a single anecdote loses its power to fool you. The Tuesday tweak might have improved the one ticket you looked at while regressing four others, and an average over the set shows the truth an eyeball never could.
Who grades a few hundred replies?
A second model does, because you cannot afford a person. A golden set of a few dozen tickets is small enough to grade by hand once, but you want to grade it on every change and you want it ten times bigger, and now hand-grading is the bottleneck. Some qualities a line of code checks for free: did it leak an internal ID, is it valid JSON. But “did it soften the refund policy?” or “is the tone right?” needs judgement, and that is exactly what a capable model can do. You hand a second model the ticket, the reply, and a rubric, and ask it to score. A model grading another model's output is a judge, and it is cheap enough to run over the whole set on every change, which is what makes continuous evaluation practical at all.
But a judge is still a model, with the same fallibility you have spent five chapters respecting, and it has quirks you have to design around. The most surprising is position bias: show the judge two answers and it can prefer whichever one it saw first, even when the content is identical. Watch a verdict flip on order alone, then turn on the mitigation and change how far ahead the better draft really is:
The interactive version of this example is available when JavaScript loads.
Be precise about what that bought you, because the obvious reading is the wrong one. Judging both orders and keeping the verdict only when they agree does not recover the right answer from a judge that was reading the slot. It tells you that it was, and returns a tie. That is the useful outcome: you stop quoting a number that was never about the drafts. When the real gap between the two answers is wider than the judge's positional thumb on the scale, both orders agree and the verdict is worth having. That is the flavour of the whole LLM as a judge page: pointwise against pairwise scoring, why the rubric is the real instrument, the catalogue of biases with a number attached to each, and when not to reach for a judge at all.
Would you trust a scale you never checked?
Here is the trap that catches most teams. They stand up a judge, watch it agree with them ninety percent of the time, and declare victory. But raw agreement lies when most answers are fine. A judge that blindly says “good” to everything scores ninety percent on a set that is ninety percent good, while being completely useless at catching the ten percent that broke. You validate a judge the way you would calibrate any instrument: against a batch of human-labelled answers, using a statistic that discounts the agreement you would get by luck.
The interactive version of this example is available when JavaScript loads.
Watch what raw accuracy does across that whole dial against what the chance-corrected number does. Accuracy moves about five points while the second number moves the entire range, which is the argument for reading the second one. There is a second lesson hiding in the same widget: a judge only catches more failures by flagging more eagerly, and flagging more eagerly costs good drafts, so precision pays for recall. Where you set that line is a product decision rather than a statistical one. A judge you have not validated against humans is a scale you have never put a known weight on, and you do not know whether it reads true. The LLM as a judge page walks the full loop: the confusion matrix, why accuracy misleads on imbalanced sets, how many labels a usable agreement number actually needs, and what human agreement is and is not a ceiling on.
The gate that only greens on a real win
Now you wire the pieces into a habit. Every prompt change, model swap, or retrieval tweak runs the golden set through the validated judge and produces a score, and a change only ships if the score holds or climbs. But there is one last statistical trap: a small set scored once is noisy, so a tiny bump might be a real improvement or might be luck. A gate that greens on noise is worse than no gate, because it launders random drift as progress. So the gate has to know the size of its own noise and only fire when the win clears it.
The interactive version of this example is available when JavaScript loads.
Notice that the two dials are not equals, which is the part everybody gets wrong. Widening the set narrows the band with the square root of the number of cases, and it keeps doing so. Scoring each case more times only averages away the part of the wobble that comes from re-rolling one case; the part that comes from having asked only that many questions stays exactly where it is. So the band has a floor, the floor is set by the size of the set, and past it more scoring buys nothing. On a small set you cannot repeat your way to an answer.
What you ship this sprint
You did not make the model smarter, faster, or cheaper this chapter. You made every future change measurable, which is what lets Wrenlet keep improving without secretly getting worse. Below is the Tuesday tweak, and the truth about it is fixed and stated: it made Wrenlet 8 points worse. Nobody in the story knows that. Build the instrument one piece at a time and watch how much apparatus it takes before anybody could have said so.
The interactive version of this example is available when JavaScript loads.
Three things in there are worth sitting with. The demo does not merely fail to catch the regression, it actively endorses it, because the tweak genuinely improved the one ticket everyone looks at. An unvalidated judge does not measure a small regression badly, it does not measure it at all: it reports a change of half a point where the truth is eight, while its raw agreement reads a comfortable ninety percent. And a person reading every ticket is the most accurate scorer available and the one that cannot be used, because nobody grades hundreds of tickets by hand on every prompt change, so the run quietly stops happening and the gate stops being a gate.
The last thing is the one worth carrying into the next job. Even the finished instrument reads the regression as smaller than it is, because a judge that agrees with you seventy-one percent of the time beyond chance sees most of a change rather than all of it. A good instrument is not a perfect one. It is one whose error you know the size of.
Go deep on the two that matter
The Chapter 6 reads
- LLM Evaluation: eval-driven development, error analysis, the scorer families (code, judge, human), the golden set, the regression gate and the noise band, Goodhart's law, and the statistics that keep a number honest.
- LLM as a Judge: pointwise against pairwise scoring, the rubric as the instrument, the bias catalogue with a measured number on each, validating the judge against humans and why accuracy lies, and when not to use one.
What you built, from a prompt to a product
Look back at the whole arc. You started with a single prompt scribbled during a sprint (Chapter 1) and learned the one thing the model actually does, and how it lies. You made it fast, reliable, and affordable (Chapter 2), then made it sound like Wrenlet (Chapter 3). You taught it your own docs with retrieval (Chapter 4), sharpened that retrieval to cite the right source and prove it (Chapter 5), and now wrapped the whole system in an evaluation loop so it can change without regressing. A garage prototype became a product a business can lean on, and almost none of that work was about the model itself. It was about the system you built around it.
That is the through-line of everything ahead too. Later arcs push Wrenlet further, letting it take actions instead of only drafting words, standing up to real production scale and adversarial users, and holding quality as the surface grows. The instinct you have earned here carries the whole way: treat the model as one component, engineer the system around it, and never ship a change you cannot measure.
By GOAT Engineer. Back to The Wrenlet Saga. Privacy Policy · Contact.