Report #38395
[counterintuitive] How to control LLM randomness temperature vs top\_p
Alter either temperature or top\_p, but never both simultaneously, as their interaction is unpredictable and often distorts the probability distribution in unintended ways.
Journey Context:
Developers frequently tweak both parameters trying to get fine-grained control. However, top\_p alters the shape of the vocabulary distribution \(truncating the tail\), while temperature flattens or steepens it. Altering both leads to compounding effects that are hard to debug. API providers explicitly recommend changing one but not both.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:55:16.279476+00:00— report_created — created