Let’s play a game
Before anything is explained, you run one small experiment on your own mind. It takes eight seconds, and the only instrument is your attention.
For the next 8.0 seconds, don’t think about a horse.
Now be honest. Did you think of a horse?
You thought of one anyway
I asked you not to think about a horse, and you probably thought of one anyway. Maybe it was galloping through a field, or standing still, or grazing. The instruction fixed what you pictured for everyone. The details were yours, a particular gait, a particular field. That is what a conditional distribution feels like from the inside.
Psychologists call this ironic process theory. A ban cannot be checked without first picturing the thing it bans, so the ban rehearses the very thought it tried to remove. Daniel Wegner's 1987 white-bear studies found the rebound in the lab. People told not to think of a white bear thought about little else. Prompts can behave the same way. Telling a model not to mention something can make the mention likelier, not less. A negated instruction is not a control.
As developers, we train ourselves to think the other way. We define the steps, anticipate the outcomes, and remove the uncertainty before it arrives. That discipline is what makes traditional software dependable. Applied to large language models (LLMs), it hardens into control. We want the model to walk our path, so we write ever longer prompts, clamp the decoding, and trim away everything it might notice along the way.
It’s like putting on a horse so it can only see the path ahead. The question is whether we need to control the path at all, or whether we only need to define how far the horse is allowed to wander.
Determinism
Traditional software is built on the expectation that the same input, under the same conditions, produces the same output. We rely on that predictability to debug failures, to test behavior, and to build systems we can trust.
When a function returns an unexpected result, we want to know why. When a workflow runs, we want to know what happens next. Determinism gives us that confidence.
Even here, determinism is managed more than given. Threads race, hash orders shift, and networks deliver out of order, and we hold the line with invariants rather than with certainty.
Over the years, uncertainty becomes something to eliminate. We define rules, validate inputs, handle edge cases, and make decisions explicit. These practices are essential when software handles money, modifies data, or triggers actions in the real world.
With LLMs, the outputs we most want are the ones we could not have written ourselves. Determinism still applies, but one level higher. The code that enforces the bounds is deterministic. The path is not.
Why the fence matters
LLMs are valuable because they explore possibilities we never programmed. Given the same prompt twice, they may take different paths and arrive at different answers, and more than one can be right. The variety comes from sampling. The network itself is a fixed function, and at the coldest setting the dice are gone, because decoding simply takes the most likely token. The last bits can still wobble across a batch, the way threads and hash orders wobble in ordinary software. Apart from that, the spread is a design choice. For open-ended work, that variability is not a flaw to squeeze out. It is the whole point. A model that returned only the answers we had already imagined would be traditional software with extra steps.
Instead of forcing the model down one path, let it explore, and hold the boundaries steady around what it may touch, what it may not, and what to do when it reaches the edge. Like a horse in a fenced field, the model is free to move in any direction.
One caveat. The fence cannot be made of words. Your eight seconds suggested why, but the mechanism is narrower than the analogy. A prompt shares its channel with untrusted data, so anyone who can write into the context can write instructions too. Compliance is probabilistic, not structural. And unless something outside the model masks the next token, every token keeps some probability, including the one you asked it to avoid. That is why constrained decoding is a fence and please output JSON is a wish.
So the fence must be deterministic code around the model. Schemas, allowlists, a sandbox, checks that run before any side effect lands. Dijkstra made the same argument in 1975, in a paper on guarded commands and nondeterminacy. A guarded command may pick any enabled branch, so a proof has to hold for every branch, not just the likely one. That is the claim the fence makes about every outcome in the distribution.
Even then, the fence buys safety, not correctness. A valid answer can still be wrong, and evals are how that gets caught. The fence does not shrink the field. The fence is what makes the field safe to run in.
A minute ago, you ran the same experiment on your own mind. Given open ground, you filled it with a horse, and with details of your choosing. A model given the same open ground does the same, with details of its own. Two runs across the same field will rarely look identical, and that is the point. The fence makes the wandering safe, and the wandering is where the answers come from. That is the beauty of non-determinism.
Now the rule is lifted. Think about horses as freely as you like. Go on, check this out.
If you want to keep digging, I keep an AI Engineering notebook on Notion.
