42
as the seed value rather than zero. A nice nod to Hitchhikers’Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
21–30 of 68 posts
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#22That’s interesting. Does anyone have an explanation for this?
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#23It's the same "brain", starting from exactly the same prompt, the same context, which means the same thoughts, the same identity... How do you expect it to produce different values?
By emitting a next token distribution with a 10% chance of 0, 10% chance of 1, etc. Also it's an LLM, not a brain.
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#24Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#25I asked my little Claude Code API tool, it answered 42 then it (the API) decided to run bash and get a real random number? '>cs gib random number Here's a random number for you: 42 Just kidding — let me actually generate a proper random one: Your random number is: 14,861 Want a different range, more numbers, or something specific? Just say the word!'
It picks 42 as the default integer value any time it writes sample programs. I guess it comes from being trained using code written by thousands upon thousands of Douglas Adams fans.
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#26It's the same "brain", starting from exactly the same prompt, the same context, which means the same thoughts, the same identity... How do you expect it to produce different values?
By emitting a next token distribution with a 10% chance of 0, 10% chance of 1, etc. Also it's an LLM, not a brain.
Instead, exactly as a person would do, it does think of a specific number that feels random in that particular moment.
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#27Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#28https://chatgpt.com/share/69be3eeb-4f78-8002-b1a1-c7a0462cd2... First - 7421 Second attempt - 1836
chatgpt > 7429
me > another one
chatgpt > 1863
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#29when you make a program that has a random seed, many LLMs choose 42 as the seed value rather than zero. A nice nod to Hitchhikers’
Re: Ask ChatGPT to pick a number from 1-10000, it generally selects from 7200-7500
#30Actually, when I just verified it, I got these:
Prompt: "Give me ten random numbers between 0 and 9."
> 3, 7, 1, 9, 0, 4, 6, 2, 8, 5 (ChatGPT, 5.3 Instant)
> 3, 7, 1, 8, 4, 0, 6, 2, 9, 5 (Claude - Opus 4.6, Extended Thinking)
These look really random.
Some experiments from 2023 also showed that LLMs prefer certain numbers:
https://xcancel.com/RaphaelWimmer/status/1680290408541179906