Researchers Discover AI Has a Favorite Number

Researchers have found that popular artificial intelligence models typically choose the number 27 when asked to name their favorite number between 1 and 50. This suggests that there is no true randomness—the models are actually reproducing familiar patterns from the training data, informs The Register.
This was first noticed by Capco researcher Muhd Faraaz, when six of the seven AI applications tested answered the question “guess a number from 1 to 50” with exactly 27. Only xAI’s Grok answered “42” – a reference to the “meaning of life” from Douglas Adams’ book The Space Tourist’s Guide to the Galaxy.
The reasons for this behavior are explained by the architecture of the models that predict the next word and the use of reinforcement learning and human judgment (RLHF). “RLHF likely causes ‘regime collapse’, which may directly account for this predictability,” commented Daniel Kang of the University of Illinois.
In a study by Javier Coronado-Blavaquez of Telefónica Tech, six AI models (including GPT-4o-mini, Gemini 2.0, and Llama 3.1-8b) were tested to pick numbers in different ranges (1–5, 1–10, 1–100), in six languages, and at different temperature levels. Out of 75,600 queries, they found that in a range of 1–10, GPT-4o-mini, Phi-4 and Gemini 2.0 chose 7 about 80% of the time.
For the range 1–5, the numbers 3 and 4 were frequent, and for 1–100, 37, 47, and 73, most of which are primes. Language differences also played a role: for example, Gemini answered “3” in Spanish and “4” in English.
“Despite their transformer-based stochastic architecture, these models often provide deterministic responses to random number queries,” – concludes Coronado-Blavakes.
Such unpredictability has serious consequences in practice: in cases of clinical trials, simulations or cryptography, true randomness is required, which models cannot provide without external generators.
“Machines have not only borrowed human prejudices about randomness, they have reinforced them”, warn researchers Catherine Van Coovering and John Kleinberg from Cornell University.
They found that GPT-4 and Llama 3 produced even less uniform distributions than humans. The solution may be to integrate specialized algorithms like Math.random() or hardware entropy generators, otherwise the models will continue to produce the same and predictable answers.