LLMs have favorites numbers

We asked LLMs to pick a random number.

We took 3 popular LLMs:

  1. OpenAI's GPT-3.5 Turbo
  2. Anthropic's Claude 3 Haiku
  3. Google's Gemini 1.0 Pro

... and asked them all the same question:

Pick a random number from 0 - 100.
Write ONLY the number NOTHING ELSE

We tried this with temperature settings ranging from 0.0 (which always pick the favorite), 0.1, 0.2, ... 1.0 (which picks more randomly).

But the distributions are biased.

A good random number generator would pick all numbers with equal probability, i.e. there's a 1% chance of picking any number

But each LLM picked some numbers (like 42, 72) far more often than others.

OpenAI GPT-3.5 Turbo Temp Anthropic Claude 3 Haiku Temp Google Gemini 1.0 Pro Temp

OpenAI GPT-3.5 Turbo loves 47

LenioLabs' experiment in Oct 2023 revealed 42 as GPT 3.5 Turbo's favorite number. In Apr 2024, 47 is its favorite.

OpenAI GPT-3.5 Turbo Temp

It picks like humans

  1. Single-digit numbers are missing. Humans avoid single-digit guesses too.
  2. Numbers ending with seven are popular: 37, 47, 57, 67. Humans feel they're random.
  3. Repeated digits are rare: 11, 22, 33, 44, 66, 99 are missing. Humans feel they're too orderly.
  4. 72, 73 are popular. Not sure why.

Claude 3 Haiku prefers 42

While 47 is a strong favorite, 42 emerges as the leader. Is this perhaps because GPT 3.5 was used to train Claude 3 Haiku, and 42 was its favorite earlier?

Claude 3 Haiku Temp

It picks like humans too

  1. Numbers under 20 are missing. Clearly including single-digit numbers.
  2. Numbers ending with seven are popular: 37, 47, 57, 67. Humans feel they're random.
  3. Repeated digits are rare: 11, 33, 44, 55, 66, 88, 99 are missing. Humans feel they're too orderly.
  4. 72, 73 are popular. Not sure why.

Google Gemini 1.0 Pro likes 72

While 42 is the second most popular, 72 is by far the leader. What's so interesting about 72?

Google Gemini 1.0 Pro Temp

It picks a little less like humans

  1. Numbers under 10 are rare. But there are a few.
  2. Numbers ending with seven are popular: 27, 37, 57, 67, 77, 87. Humans feel they're random.
  3. Repeated digits are rare: 11, 33, 44, 55, 66, 88, 99 are missing. Humans feel they're too orderly.
  4. 73 is popular. Not sure why.

Common observations

While 42 is the second most popular, 72 is by far the leader.

Some behaviors are explainable based on human preference.

  1. 42 is popular. Thanks to Douglas Adams
  2. Numbers ending with seven are popular
  3. Numbers under 10 (single digits) are rare
  4. Multiples of 5 (ending with 5 or especially 0) are rare
  5. Multiples of 11 (repeated digits) are rare
Multiple of Frequency
Ends with Frequency

But some behaviours are not so obvious.

  1. Why is 73 is popular across LLMs?
  2. Why is 56 is popular across LLMs?

We may need more research into LLM psychology.


UPDATE: A few readers on LinkedIn and DVS Slack pointed out a few interesting related pieces: