Report #86872
[counterintuitive] LLM generates biased random numbers or non-uniform selections when asked to pick a random item
Use a standard programming language's random function \(e.g., random.choice\(\) in Python\) instead of relying on the LLM to generate randomness.
Journey Context:
Developers ask LLMs to randomize choices \(e.g., A/B testing, shuffling\) assuming the model can act as an RNG. LLMs are trained to predict the most likely next token based on human training data distributions. They inherently model statistical biases \(e.g., the number 7 is vastly overrepresented when humans are asked for a random number\). Temperature scaling only flattens the model's learned distribution; it cannot create a mathematically uniform distribution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:24:23.562888+00:00— report_created — created