# LLM Non-Determinism

> The same prompt can give a new answer each time you ask.

**Field:** Artificial Intelligence  
**Category:** LLMs  
**Also known as:** Non-Deterministic Output (LLM), LLM Nondeterminism

## Think of it like

It is like asking a friend the same riddle twice. Most days you hear the same answer, but not always.

## Definition

LLM non-determinism means the same prompt can give different answers, even with the same settings. Most of it comes from sampling, which picks words with some chance on purpose. But even at temperature 0, hosted models often do not give the same answer twice. How busy the server is changes how requests are grouped, and that can shift the math just enough to tip a close choice. Once one word differs, the rest of the answer can drift.

## Example

Emma sends one prompt twice at temperature 0 and gets two answers. They match until the third sentence, then go different ways.

## Why it matters

Tests that expect the exact same text will break. Checks need to judge the meaning, not the exact words.

## Common mistake

Thinking temperature 0 always gives the same answer. Providers say it does not.

## Three principles

- **Sampling adds chance.** On purpose.
- **Temperature 0 is no lock.** Server math still varies.
- **One word drifts.** The rest can follow.

## Related terms

- [LLM Sampling](https://learn.benibix.com/term/ai/sampling)
- [LLM Temperature](https://learn.benibix.com/term/ai/temperature)
- [Greedy Decoding](https://learn.benibix.com/term/ai/greedy-decoding)
- [Model Snapshot](https://learn.benibix.com/term/ai/model-snapshot)
- [Regenerate Response](https://learn.benibix.com/term/ai/regenerate-response)
- [Log Probabilities (Logprobs)](https://learn.benibix.com/term/ai/logprobs)

## Taught in

- [Temperature and Sampling](https://learn.benibix.com/learn/ai-llms/temperature-and-sampling): LLMs, 3/15

![The same prompt goes to a model twice at temperature 0. Both answers start with the same words. At one close choice, the two answers take different words and drift apart.](https://learn.benibix.com/diagrams/ai9-non-determinism.svg)

---

Source: https://learn.benibix.com/term/ai/llm-non-determinism
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
