We baked a batch of cookies that refused to become cookies.

They spread, they browned, they smelled right — and the middle stayed a gloss of raw dough at nine minutes, at eleven, at fourteen. More time didn’t fix it. More heat didn’t fix it. We had made something that was not, structurally, going to set, and no oven was going to argue us out of it.

The recipes we were working from came from two kinds of place. A couple were from bakers with a real track record — published, tested, the genuine article. Several others had been generated by an AI, in the confident, well-formatted way AI generates everything. You can already guess which ones failed. What’s interesting is why, and how cheaply we could have known in advance.

A recipe is a set of ratios, and ratios have limits

A cookie is mostly an argument between fat and flour. The flour builds structure; the fat fights it. Butter melts, the chocolate quietly adds its own fat (cocoa butter is roughly a third of a chocolate chip by weight), and all of it has to stay under what the flour can hold together while the starch sets. Past a certain fat-to-flour ratio the fat just wins — it liquefies before the starch can gelatinize, and you get the glossy raw middle that no bake time will rescue. That’s the difference between fudgy (sets dense and moist) and gooey (never sets at all). One is a texture. The other is a failure.

The useful part: you can count this before you bake anything. Add the butter’s fat to the chocolate’s hidden fat, divide by the flour, and you get an “effective fat-to-flour” number. Under about 80% is the safe zone. Over 90% and the thing physically cannot set, regardless of technique. It’s a validation range — the same kind of rule I’d write to reject a bad row before it reaches a table, except here the bad row is a cookie and the rejection notice is “this will be soup.” (I now have opinions about baking soda, which is not a sentence I ever expected to write.)

So we did the boring thing and wrote the ranges down — butter-to-flour, chocolate-to-flour, effective-fat-to-flour, cornstarch, leavening per hundred grams — and ran the recipes through them.

The AI recipes were the ones out of range

Every recipe that failed the check was AI-generated. Not most of them. All of them.

The pattern was almost funny. One recipe called for 280 grams of chocolate against 290 grams of flour — chocolate at 97% of the flour weight. Run the numbers and its effective fat-to-flour came out at 105%: past the point where a cookie can set, before you even turn on the oven. That was the batch that stayed gooey at twelve minutes. It wasn’t underbaked. It was impossible. Cutting the chocolate alone wasn’t enough — dropping it to 175 grams only brought the ratio to about 93%, still over the line. It took both levers: 175 grams of chocolate and the flour raised to 355, which finally pulled it down to 76%, inside the range, and it set. Another AI recipe ran 97% chocolate-to-flour and had no baking powder at all. A third put both the butter and the chocolate over the line at once. Meanwhile the two recipes from actual bakers passed clean on the first look — because someone with real feedback had already tuned them into range without ever writing a ratio down.

Here’s the part that lands for me. The AI wasn’t being lazy; it was being confident about two things it had no way to check. It assumed a flour protein around 10.8% — the textbook number for US all-purpose. The flour we actually had, a Canadian all-purpose, is 13.3% protein (it’s printed on the bag) and behaves almost like bread flour. And it picked chocolate quantities that read generous and were physically impossible. Nothing in how it wrote the recipe could catch either mistake, because it had no way to test its output against a real oven. We caught both in an afternoon, because we could. That’s the split that matters: the model is fine at the parts you can check, and dangerous at the parts you can’t.

I’d like to say the humans came out of this looking good. We did not.

I’d built a little tool to scale the recipes down to a test batch — six cookies instead of twelve. Eggs are the hard part, because you can’t use 0.43 of an egg, so the code rounded to the nearest half and, if it landed low, rounded up to one. Reasonable. Except it applied that rule to the whole egg and the extra yolk separately. Scale a recipe to a four-cookie batch — a factor of about a third — and both the egg and the yolk rounded up to a full one. The tool cheerfully instructed us to put one whole egg plus one whole yolk into a batch with a third of the flour and butter.

That is three times the egg the dough could carry. And the cookie it produced was gooey at twelve minutes — the same failure as the AI’s fat problem, reached from the opposite direction. A rounding error you could taste. I have since rewritten that function with feeling.

Two people, one set of ratios

The reassuring beat came from my wife, who had been developing these recipes and has no patience for my spreadsheets. Working from her own notebook and first principles — no ratio sheet, no code — she corrected the worst recipe on her own: more flour, less chocolate, drop it to a single yolk. Directionally, almost exactly what the numbers said. She raised the cornstarch to about the same 5% I’d flagged, off a completely different chain of reasoning.

That convergence is the tell. When two people reach the same number down two unrelated paths — one from baking intuition, one from a fat-to-flour formula — it’s probably a real constraint and not a preference. The cookie was never going to negotiate. It was only ever going to set, or not.

Which is the thing I keep turning over, and it isn’t a grand one. Most of my work isn’t this honest. A pipeline can produce a wrong number and look completely fine. A bad call can pay off for the wrong reasons. A demo can hide a hole for months. A cookie can’t. It sets or it doesn’t, in eleven minutes, on a sheet pan, in front of you — and some afternoons it’s a genuine relief to work on a system that can’t lie to you.

Try it

Drag the sliders, or hit The AI’s impossible one to watch a real recipe cross the line into soup. (Open it full-page.)


Companion code: ramwise-examples/recipe-ratios — the effective-fat-to-flour check that flags the impossible recipe before the oven.