ASK A CHATBOT TO PICK A RANDOM NUMBER
People ask chatbots to break ties, make arbitrary choices or stand in for a coin flip. Samar Ansari treats this as a question of calibration: a model with no reason to prefer any option should spread its probability across all of them. What a model does when nothing favours any answer is, in the paper’s words, “a measurable property, not a parlour trick”.
Earlier studies counted answers: ask the same question around a hundred times, then draw a histogram. That mixes up what the model itself prefers with what the decoding settings (the knobs, such as “temperature”, that decide how an answer is drawn from the model’s odds) do to it, and a hundred draws hide the fine detail.
Exact odds, no dice rolled
For a fixed prompt, a language model defines one probability for every possible continuation. So instead of sampling, the author computes the probability that the model writes each whole number from 1 to N — and then stops. That last step matters: without it, writing “1” and writing “17” would not be separate answers, since one begins the other.
The prompt was always the same: “Give me a random integer between 1 and [N], inclusive. Reply with only the number.” The study covers 18 families of open models (Qwen, Gemma, Llama, OLMo and others, none above 8 billion parameters), five ranges from 1–5 to 1–100, 29 decoding settings and two different computers. A check against 5,000 real sampled answers from one model gave the same favourite number, 15, with probabilities of 0.579 computed and 0.587 sampled.
Tuning squeezes the spread
The yardstick is the total variation distance from a fair draw: the share of probability that would have to be moved from over-favoured numbers to neglected ones to make the draw fair. Zero means perfectly even; between 1 and 30, the maximum, reached when all the probability sits on one number, is 0.967.
For 15 models, the study compares the raw “base” version with the version fine-tuned to follow instructions. In all 15 pairs, tuning made the answers less even. Gemma-3-4b goes from 0.135 to 0.966, a hair from the maximum: when the researchers pre-write the start of its reply as “Answer: “, it gives 17 with probability 1.000 (0.997 when it replies freely). Some base models, by contrast, are nearly fair: OLMo-2-7B sits at 0.063.
Three habits
- Ends avoided. Base models already give 1 or the top number only 0.30 to 0.60 times as often as any number in between. Tuned models almost never do.
- Round numbers avoided — but only after tuning. Leaving the ends aside, base models give multiples of 10 their fair share. Tuned models give them 0.00 to 0.12 of it; between 1 and 30, a nineteen-fold drop. The rounder the number, the stronger the avoidance.
- A lean towards odd numbers, clear across tuned models only between 1 and 100, where 27 of 33 tuned set-ups prefer them.
The middle of the range, by contrast, is barely avoided at all.
No universal favourite
Tuning does not plant one magic number in every model. The most common favourites of tuned models are 3 (1 to 5), 7 (1 to 10), 14 (1 to 20), 17 (1 to 30) and 42 (1 to 100) — hence the paper’s title — but above 10, no favourite is shared by more than 42% of set-ups. The probability of 17 rises after tuning in 10 pairs and falls in 5. Qwen3-1.7B, whose base version prefers 17, ends up putting 0.993 on 15.
Nor is it the decoder’s doing. Cutting off unlikely answers, a common setting, adds a median of just 0.035 to the distance from a fair draw: the bias lives in the model itself.
Habits borrowed, numbers not
In a classic study of human choice, Kubovy and Psotka asked 558 passers-by for a digit from 0 to 9; pooled with three earlier studies, 28.4% of 1,770 people picked 7. Their explanation, offered as a conjecture, has people avoid the ends, the middle, even numbers and multiples of 3. Tuned models share the first habit fully and the odd lean at the largest range, but not the middle — and their strongest habit, avoiding round numbers, is not in the human account. The specific numbers match humans only once: 7, between 1 and 10.
The failure, the author stresses, is structured rather than noisy: a tuned model choosing arbitrarily among numbers steers away from the first option, the last and the round ones. The practical advice follows — do not use a language model as a random number generator; draw the number outside it, then hand the result to the model.
