In a September 2025 lab test, one prompt sent 1,000 times at temperature zero to an open 235B-parameter model returned 80 unique completions. Batch size changes the order of the arithmetic, and server load sets the batch size. Five checks, about an afternoon each, make your tests, logs and answers repeatable.
A determinism policy to keep beside your evals
# counts are planning estimates; set your own model_id: <pinned model ID, never an alias> temperature: 0 log_every_call: [model_id, seed, params, fingerprint] eval: runs_per_case: 10 # fail the build on the lowest score assert_on: parsed_fields # labels, numbers, IDs; never exact text replay: prompts: 5 # your longest production prompts runs: 100 rerun_on: [model_id_change, provider_change] cache_key: sha256 of canonical JSON [model_id, params, prompt]
The checks
Everything starts ticked. Untick what you will not do; the choice is saved on this device only, and Print keeps only what you kept.
What happened. Of the lab test's 80 unique completions, the most common appeared 78 times in 1,000. In a study of five models set to be deterministic, accuracy varied by up to 15% across runs, and parsed answers were often more stable than raw text.
The check.
- Replace exact-string asserts with checks on parsed fields: labels, numbers, IDs. Ignore wording.
- Run each case 10 times; report the lowest and highest score; fail the build on the lowest.
Source: Non-Determinism of "Deterministic" LLM Settings, paper, v5, 2 Apr 2025; Defeating Nondeterminism in LLM Inference, research post, 10 Sep 2025
What happened. One provider documents that a model ID is a pinned version and an alias resolves to the most recent dated snapshot, and that infrastructure updates can still change behaviour slightly. Another returns a fingerprint to flag backend changes, yet warns of variation when seed and fingerprint match.
The check.
- Replace every alias in config with a pinned model ID; add a test that fails if an alias appears.
- Log model ID, seed, parameters and fingerprint (if returned) on every call; alert when it changes.
Source: Model IDs and versioning, a model API provider's documentation, read 27 Oct 2026; Reproducible output, a second provider's how-to guide, updated 27 Feb 2026
What happened. Provider prompt caching saves key-value tensors for a repeated input prefix, not finished answers; new input is still processed to generate a new response. Hashing needs an invariant input format to be repeatable, which a canonical JSON form gives.
The check.
- Hash the canonical request (model ID, parameters, full prompt); on a hit, return the stored answer.
- A new model ID makes a new key; keep old entries as the record of what was answered.
import hashlib, json
def cache_key(model_id, params, prompt):
body = json.dumps([model_id, params, prompt], sort_keys=True,
separators=(",", ":"), ensure_ascii=False) # close to RFC 8785
return hashlib.sha256(body.encode("utf-8")).hexdigest()Source: JSON Canonicalization Scheme, RFC 8785, June 2020; Prompt caching guide, a model API provider's documentation, read 27 Oct 2026
What happened. In the lab test, 1,000 completions of 1,000 tokens at temperature 0 gave 80 unique answers, all identical for 102 tokens and split at token 103. One provider's guide says a larger max_tokens generally makes responses less deterministic, even with a seed set.
The check.
- Replay your 5 longest production prompts 100 times at temperature 0; count the unique outputs.
- Note where outputs first differ; repeat after any change of model ID or provider.
outs = [ask(prompt, temperature=0) for _ in range(100)] # ask: your own client call print(len(set(outs)), "unique answers in", len(outs), "runs")
Source: Defeating Nondeterminism in LLM Inference, research post, 10 Sep 2025; Reproducible output, a second provider's how-to guide, updated 27 Feb 2026
What happened. With batch-invariant normalisation, matrix-multiply and attention kernels, all 1,000 completions were identical, and a 1,000-sequence job on an 8B model took 42 s, up from 26 s. One serving engine documents such a mode as beta, needing GPUs of compute capability 8.0 or higher.
The check.
- Enable the mode on staging; replay the check 4 prompts under load and expect 1 unique output.
- Time a representative job before and after; keep it on only where an answer must not move.
Source: Defeating Nondeterminism in LLM Inference, research post, 10 Sep 2025; Batch invariance, a serving engine's feature documentation, read 27 Oct 2026
Lab figures show what can happen on one model, prompt and setup, not what every model does. Counts such as 5, 10 and 100, and the afternoon sizing, are planning estimates. Provider behaviour is as documented on 27 October 2026.
Take this list with youThe PDF is the handout: this list on one or two pages. The Markdown is for your own docs, your wiki, or an assistant you want to hand the list to. Print gives you this list only, without the navigation.
Something in your production AI broke in a way that is not on this list? Tell me what broke.