The same prompt gives different outputs because generative models sample each token from a probability distribution, and hosted inference adds noise from batching and hardware. Temperature and seeds narrow the variation but rarely remove it. Reproducibility in production means recording every condition, pinning versions and testing for equivalent meaning rather than identical text.
- Sampling is the first source of variation, and temperature controls how wide it is.
- Temperature 0 is not a guarantee. In a September 2025 experiment, Thinking Machines Lab got 80 different completions from 1,000 identical requests at temperature 0.
- Seeds are best effort. OpenAI's documentation says determinism is not guaranteed, and PyTorch warns that results can differ across releases and hardware even with identical seeds.
- Pin what you can control: model version, settings, prompt, attached files and code dependencies.
- Decide in advance whether a step needs identical output or equivalent meaning, and test for that.
- Variation is useful for ideas and drafts. Contain it where stability is required.
Deterministic vs probabilistic generation
Deterministic generation means the same input produces the same output every time. Add two numbers and the result never changes; convert a file with the same rule and the output is identical byte for byte. Reproducibility comes almost free, because there is no variation to manage.
Probabilistic generation works differently. A language model does not look up one correct answer. At each step it computes a probability for every possible next token, then picks one. The same prompt yields the same distribution, but the token drawn from it does not have to be the same on every run, and one different early choice sends the rest of the answer down another path. Variation is a property of the design, not a malfunction.
Missing this distinction creates wrong expectations. "It worked once, so it is correct" is a conclusion drawn from a single sample. The reverse holds too: one bad run does not prove the system is broken; it may be an unlucky draw. Most real products are hybrids, with deterministic code wrapped around a probabilistic core. The first job is to make that boundary visible, because until you know which parts can vary, you cannot tell where a difference came from.
How temperature and seed affect output stability
Temperature controls how much of the probability distribution the model is allowed to explore. At low temperature, sampling concentrates on the most likely tokens, and outputs become more stable, more predictable and often blander. At high temperature, less likely tokens get a chance, and outputs become more varied and less stable. Many APIs also offer related settings, such as top-p, that cut off the unlikely tail of the distribution.
A seed is the starting value for the random number generator used during sampling. Fixing it is meant to make the random choices repeat, so the same prompt with the same settings follows the same path. Temperature sets how wide the range of possible paths is; the seed picks which path is taken.
The catch is the phrase "with the same settings". A seed only repeats a result if everything else is identical: the model weights, the software, the hardware and the way the request was processed. Change any of them and the same seed can produce a different answer. OpenAI's guidance on its seed parameter says the system "will make a best effort to sample deterministically" and that "Determinism is not guaranteed". Each response also carries a system fingerprint, which "represents the backend configuration that the model runs with", so a changed fingerprint warns you that identical results are less likely (OpenAI cookbook on reproducible outputs).
Why temperature 0 is still not deterministic
Setting temperature to zero tells the model to always pick the most likely token, which should make the output repeatable. In practice it often is not, especially on hosted services.
A detailed investigation by Horace He and colleagues at Thinking Machines Lab, published in September 2025, shows why. They sent the same prompt, "Tell me about Richard Feynman", to an open-weight model 1,000 times at temperature 0 and got 80 unique completions. The most common appeared 78 times, and the outputs first diverged at the 103rd token. The main cause was not sampling but the server: the numerical kernels were not batch invariant, so results depended on how many other requests were being processed at the same moment, and that load varies unpredictably. With batch-invariant kernels, all 1,000 completions were identical (Defeating nondeterminism in LLM inference).
Lower-level software adds its own caveats. PyTorch, one of the most widely used machine learning frameworks, states that "Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms," and that results may differ between CPU and GPU "even when using identical seeds" (PyTorch reproducibility notes).
The practical conclusion: on a service you do not control, treat bit-for-bit repeats as unlikely, whatever the settings, and design your checks around that.
Version pinning: freezing the environment
To reproduce an output, everything that produced it has to stay the same. Version pinning means fixing each component of the environment to a specific, recorded state: the exact model version rather than a moving alias, the prompt template, the settings, the attached files and the code libraries around the model.
Many providers offer both dated model snapshots and aliases that move to newer versions over time. An alias is convenient but works against reproducibility: yesterday's output may not come back today, and the reason will be invisible. A dated snapshot keeps the model fixed until you choose to move.
The real value of a frozen environment is diagnostic. If the output changed while the environment was frozen, the change can only come from what you deliberately changed. If the environment drifts, the same difference has many possible causes, and none can be ruled out.
Freezing has a cost. A pinned environment misses improvements and eventually has to be updated, and providers retire old versions. A sensible pattern is to pin the parts that need reproducibility, move them forward on purpose and on a schedule, and re-run your tests each time you do.
What counts as the same: exact match vs semantic equivalence
The first idea of reproducibility is that two outputs should be identical, character for character. With probabilistic generation that standard is often unreachable and usually unnecessary. The real question is whether two outputs do the same job equally well.
| Approach | What it accepts | Strength | Weakness |
|---|---|---|---|
| Exact match | Only byte-for-byte identical output | Unambiguous and easy to check | Often unreachable with generated output |
| Semantic equivalence | Different wording with the same meaning and facts | Realistic for language tasks | The test must be defined and can be subjective |
| Pinned version | Same conditions in a frozen environment | Makes the source of a difference traceable | Ages and needs planned updates |
| Floating version | An environment that updates itself | Stays current with little maintenance | Past outputs become hard to recreate |
Choose by task. A step that computes a total, issues an identifier or checks a rule needs exact results, so do not leave it to a generator at all: put it in ordinary code. A step that summarises, rewrites or suggests can accept equivalent answers. Forcing the wrong standard either chases a problem that does not exist or hides one that does.
Semantic equivalence needs a written definition. Typical tests: the output passes a schema check, contains the required facts, contains none of the forbidden ones and scores above a threshold on a rubric. Without that definition, "close enough" changes from reviewer to reviewer. Building those tests is the core of eval discipline.
How to make an AI output auditable and reproducible
Being able to explain an output later depends on recording, at the time, the conditions that produced it. This sequence works for a single prompt in a notebook as well as for a production pipeline.
- Record the conditions. Save the full prompt, attached files, model version, temperature, seed and any fingerprint or version identifier the service returns.
- Choose the standard in advance. Decide whether this step needs an exact match or semantic equivalence, and write the equivalence test down.
- Restore the environment. Re-run with the pinned versions, not whatever is current.
- Compare against the standard. Judge the new output with the test you chose, not by eye.
- Isolate deviations. If results differ, change one factor at a time to find which condition caused it.
- Store the record with the output. An output without its conditions can only be hoped to repeat, never explained.
Three terms keep the discussion precise:
- Auditability
- The ability to trace and explain the conditions under which an output was produced.
- Semantic equivalence
- The acceptance that two outputs that differ in wording can carry the same meaning and serve the same purpose.
- Variable isolation
- Finding the cause of a difference by holding everything constant and changing one factor at a time.
The sequence turns a mystery into bookkeeping. When conditions are recorded and the environment is frozen, the cause of a deviation shrinks to a handful of possibilities. Writing the intended behaviour down as a specification makes the record stronger still, as spec-driven development argues. And because the prompt is only one of the conditions, the discipline overlaps heavily with context engineering.
When variation is a feature, not a defect
It is easy to treat reproducibility as an absolute virtue, but not every task wants it. Calculations, identity checks and rule enforcement need stability. Brainstorming, offering alternatives and exploring drafts benefit from variety: if you ask for ten headline ideas, ten copies of the same headline is a failure.
So the mistake is variation in the wrong place, not variation itself. Forcing stability where variety is wanted makes the output poorer. Allowing variety where stability is required destroys trust. The skill lies in deciding which each step needs.
Variation and auditability also work together. Even where you allow variety, record the conditions for each version you generate, so the one you liked can be found and built on later. A useful pattern is to explore with variety, pick a winner, then freeze it: store the approved output and reuse it, instead of regenerating it and hoping for the same result.
Reproducibility when you build with WisyLink
WisyLink builds websites and web apps from a chat, so the same principles apply. Each build is generated: ask for the same site in two new chats and you will get two different designs. What you can rely on is the version that is live.
- The live version is your pinned release. A built app keeps serving the same version until a new build replaces it. A build that fails leaves the current version in place, because a deploy either replaces it completely or does not ship.
- Content changes need no rebuild. New records and uploads reach visitors within about a minute without regenerating the app, so day-to-day content does not reintroduce variation.
- Iterate, don't restart. Make changes as follow-up messages in the same chat, so each build starts from the version you already like. Change one thing per message when you can: variable isolation in practice.
- Keep your conditions. Save the messages and reference files that produced a version you are happy with, in your own notes as well as in the chat.
- Test before launch. Check every form, booking and payment on the live link after each change.
How releases reach visitors is described on the product page. Our prompt templates help you write a first message worth keeping, and the website launch checklist covers what to test. When you're ready, start free and build a first version you can refine rather than regenerate.
F.A.Q.
