// Spec before you generate · lesson 01

Why a prompt is not a spec

"Make me a trading bot." I typed something close to that once and got back exactly what that sentence deserves: garbage. Not because the model was weak, but because I'd handed it a wish and expected a contract. Those are different objects, and the gap between them is where almost all AI slop is born.

A prompt is a wish. It describes a direction and trusts the model to fill in everything you didn't say. A spec is a contract. It pins down what the thing must do, what must be true when it's done, and what counts as broken. The model will honor a spec with startling fidelity. It will honor a wish by inventing the missing ninety percent, confidently, in a way that looks finished and isn't.

Why does ambiguity produce garbage instead of a reasonable guess?

Because of how the machine fills gaps. Every place you leave unspecified, the model completes with the most probable token given everything else, and probable is not the same as correct. Ambiguity isn't a small quality tax. It's an invitation to hallucinate, and the model always accepts. "A trading bot" could mean a thousand things; the model picks one, commits, and builds a coherent thing around a guess you never approved.

The fix is not a longer wish. A longer wish is still a wish. The fix is to change the object you're handing over. Stop describing what you want and start defining what must be true.

The rule that comes out of it

No generation without a spec. Not because ceremony is virtuous, but because the spec is the only thing standing between you and a confident wrong answer. On real work I don't let the model write a line until I've pinned what the thing does and what would count as broken. Five minutes of that up front routinely saves an afternoon of unwinding something that looked right and answered the wrong question.

The takeaway: a prompt is a wish, a spec is a contract, and the model builds whichever one you actually hand it. Hand it the contract.