Non-determinism became the word of the year the moment GenAI went mainstream. It is in the vendor decks, the conference abstracts and the job adverts. I have used it on a slide myself, which is how I know it was doing no work there.
I chose to say Non-Deterministic in the title because it is the word you would have typed.
Now I would like to take it back off you.
It is the least precise of four words you could have reached for, and the one you pick quietly decides which tests you are allowed to write. Choosing this one usually costs you the good ones.
The four words you could have used
Here are four alternative words you could have used in plain language.
Word | What it says |
| Deterministic | Same input, same output, every time. Change nothing and you get the same thing back. |
| Probabilistic | The behaviour is described by a distribution. You can say how likely each outcome is. |
| Stochastic | It varies because something inside it picks at random. There is a step doing the picking, and it can be found. |
| Non-deterministic | Same input, possibly a different output. It tells you what cannot be promised. It says nothing about how the variation behaves, or how often. |
One honest note before that table gets used against me. Probabilistic and stochastic are used almost interchangeably by people who know exactly what they are doing, and I am not going to invent a crisp boundary the field does not hold. The usable difference is what each word points at. Think of a die. The six faces and their one-in-six chances are the probabilistic part, because that describes what comes out. The throwing is the stochastic part, because something is being tossed. One die, two things to talk about. That is about as far as the distinction goes, and anyone offering you a sharper line is selling something.
What matters more is how the four sit together. Deterministic and non-deterministic are the real divide: either the same input gives the same output, or it does not. Probabilistic and stochastic describe the variation rather than sorting systems into a third and fourth pile. They overlap each other, and either can sit on the deterministic side as well as the non-deterministic one. A random number generator with a fixed seed picks at random and returns the same sequence every run: stochastic and deterministic at once. Which word fits says something about your own information rather than about the system, and that is why two engineers can look at the same feature and honestly disagree.
Take the diagram below as a simplification rather than a taxonomy. A system can be non-deterministic and neither probabilistic nor stochastic, which is why the left side is larger than the shapes sitting in it. And the two shapes overlap on purpose: something can draw at random without your being able to state the odds, and you can state odds about something that never draws. It is a good way to see how the words connect. It is a poor way to settle an argument about where one of them ends.
[image]
Deterministic is the far side: the same input, the same output, nothing left to describe. Probabilistic means you can put numbers on what comes out. Stochastic means you can see the thing doing the picking, and a thing you can see is a thing you can hold still. Non-deterministic is where you start: variation, and nothing further. Not knowing how something varies also means not knowing what kinds of variation are possible, so this is where the unknown unknowns live.
Knowing more narrows what the output could be, which is what the arrow is measuring. Each step right leaves less of the variation unexplained. At the far end there is none left to explain.
That makes non-deterministic a confession of ignorance. Sometimes an honest one. Often a lazy one, because the structure was sitting right there and nobody went to look.
You have met all of these before
In the light of the above explanation, if you put the vocabulary aside, these concepts should not sound new. A test that fails when the clock rolls past midnight, or on a machine with a different locale, was never non-deterministic. The clock and the locale are inputs, and you were not counting them. Same input, same output, once you admit what the inputs were, and that is most of what gets filed under flakiness.
Then there is variation that does come from outside you. Thread scheduling. Which instance behind the load balancer answered. Garbage collection. Message ordering across a network. A database choosing a different query plan as its statistics move. You cannot describe those from where you stand, and looking harder will not help.
Until recently you could go a whole career without choosing between those words. The systems you tested were meant to give the same answer twice, so variation was a defect, usually in your own harness, and the job was to remove it. Sampling, distributions and seeds belonged to the people building the model, not to the people testing the product it went into.
A GenAI feature moves that boundary. Its variation is deliberate and permanent, and you cannot engineer it away, because the customer is paying for it. So the vocabulary stops being pedantry and starts deciding your test strategy. The four words describe four different places inside a language model, and if you do not know which place your problem is sitting in, you will reach for a control that was never attached to it.
Which one is relevant to an LLM?
All four, at different points in the pipeline. The phrase "the model is non-deterministic" collapses them into one, and I confess, I am guilty of this way of phrasing in the past.
Four things happen between your prompt and the word you see.
The forward pass turns the prompt into logits, one raw score for every token in the vocabulary. Nothing random happens here. Given identical weights, identical input and identical arithmetic, you get identical scores.
Temperature reshapes those scores into a probability distribution. The scores are divided by the temperature and then normalised, so a low value sharpens the peaks and a high value flattens the field. Temperature is a control on the distribution. It is not a randomness dial, and most of the confusion in this area starts by assuming that it is.
Top-k and top-p then decide which candidates remain eligible. Top-k keeps a fixed number of the highest scorers. Top-p keeps the smallest group whose probabilities add up to p, so the number of survivors changes at every step. Still nothing random.
The draw picks one token from whatever survived. This is the only randomness in the pipeline, and the seed is the only thing that governs it. Fix the seed and you fix the path the sampler walks through the distribution it is handed. Hold on to that last clause. It carries more weight than the rest of the sentence.
So turn the temperature down to zero and the distribution collapses onto a single token. Temperature does not delete the draw. It starves it. The draw is still there, holding one candidate, with nothing left to decide.
Strictly, nobody divides by zero. Some stacks short-circuit and take the top-scoring token directly. Others clamp the temperature to something very small and carry on sampling, which is not quite the same thing, because two tokens scoring almost identically can still come out differently from one run to the next. Either way you have pushed the sampler as far down as the request lets you push it.
That leaves a prediction anyone can check. With the draw starved, and no other stage in the pipeline making a choice, the same prompt at temperature zero should come back with the same answer every time. It does not, and the gap is not small.
Let's settle the concepts with an analogy
Put all of that on a bookshop website, because the counter is easier to see than the pipeline.
You type an ISBN into the search box and one book comes back. It comes back tomorrow too. Deterministic.
You type "books about testing" twice and get two different pages, with nothing on the site telling you why. An experiment might be running. The index might have rebuilt overnight. You cannot say, and that inability is the whole content of the word non-deterministic. It describes where you are standing, not how the shop works.
Now suppose the site admits it shuffles between results of equal rank, and that the shuffle has a setting. You have found the step that does the picking, which is what stochastic means. And if it prints a relevance score beside every result, you can say how likely each one is to be the book you meant. That last one is probabilistic, and it is the only version where you can write a useful assertion without running the search a hundred times.
The four settings sit on the same counter.
Temperature is how heavily the shop favours its top match. Turn it down and the best result towers over everything below it. Turn it up and the also-rans crowd in. Either way it is changing the scores on the page rather than choosing anything.
Top-k is an instruction never to show more than ten results. Top-p is an instruction to show however many results it takes to cover ninety per cent of the relevance, so the number changes with the query. Both decide what stays on the page.
The seed decides which of the shortlisted books lands in your basket. Of the four, it is the only one that touches the choosing, which is why it is the only one a fixed value can pin down.
Now the places it gives out, because an analogy you cannot see the end of is worse than no analogy.
A bookshop ranks once per search. A model ranks once per word, and the word it picks rewrites the shortlist for the next one, so there is not one search here but a few hundred, each conditioned on the last. The shop also shows you the whole page; a model hands you one result and discards the rest unless you specifically ask to see them.
And the last gap is the one this article is about. Nothing in a bookshop changes your ranking because somebody else is searching at the same moment. Inside a model on shared hardware, other people's requests are in the room with yours. No version of the shop will carry that, which is why I stopped explaining and went to measure it.
How far can you get?
Determinism is a journey, and the direction is knowledge and control. Every step you take is something you learned about the variation and something you can now hold still. Probabilistic and stochastic are names for how far you got.
So I measured how far the settings would take me. I sent one prompt to gpt-4.1-mini, pinned to a single snapshot, a hundred times at temperature zero with the seed fixed at 42. Thirty of the hundred replies came back different from one another.
Nothing in the four stages accounts for that. Nothing in the four stages accounts for that. The draw is the only one of them that was ever random, and at temperature zero it is down to a single candidate with nothing left for the seed to govern.
Where the rest of it comes from, how far down the settings can push it, and what happens when you turn every knob the API gives you, is the next article: I Tried to Make a Language Model Repeat Itself. That is the one with the charts in it.
What this one was for is the vocabulary. Before you call your feature non-deterministic, the question worth asking is whether that word is describing the feature or describing what you have not looked at yet.
---------------------------------------------------------------------------
How this was researched and written
I write with models, and it would be a strange article that argued for precision about evidence and then went vague about its own.
Claude (Opus 5) helped me draft this article against a position I wrote first, which set out what the piece argues, what it refuses, and what it will not claim. Claude ran the experiment and drew the charts. Seven other models then read the finished article and were asked one question: what is wrong with it. Not how to improve it, and not a word of their prose was used.
They found things. One noticed I was explaining the seed in a way my own measurements contradicted. Another noticed I had presented a borrowed explanation as though I had measured it. A third noticed a rounded figure that looked like it summed to more than one. Those corrections are in what you have just read, and the article is more careful for them.
That is the part I would keep if I kept nothing else. The useful work was criticism, not generation.
An LLM is a complex piece of technology. I, like most of us, am trying to form the intuitions and mental models that make sense of its complexity. Writing this article in collaboration with these models, working with me day and night, helped a lot with that. Some bits I can see more clearly now, and I got past a few of my own blind spots. I am a student of testing and of intelligence, and I feel I have taken some more steps in the right direction of learning.
The positions here are mine, and so is anything still wrong with them.
With thanks to Claude, and to GPT-5.6 Luna, Gemini 3.1 Pro, Grok 4.5, DeepSeek V4 Pro, GLM-5.2, Kimi K3 and Qwen3.7 Max, who between them made this harder to publish and better to read.