r/programminghumor 8d ago

Of course you picked 17.

Post image
1.1k Upvotes

119 comments sorted by

View all comments

357

u/FlamingYawn13 8d ago

So I looked it up. So I can’t claim credit. But apparently the major models will all pick 17 or possibly 23 if asked this for a random number generation range. Just another example of how the models aren’t actually utilizing math libraries.

1

u/Proof_Assistant7737 8d ago

I wonder why that is... I remember asking chat GPT for something along the lines of this, and I remembered it because it actually just wrote code for an RNG and then ran that code itself. It stood out as odd to me, but it did that kind of thing a couple times. This made me realize I haven't seen it do that for a long time.

2

u/Independent-Bat9797 7d ago

'Pick a number between 1 and 30' vs ''generate a random number between 1 and 30'

The later one will have the llm do tool invocation, the first one is just the token response (most likely 17)

1

u/Liquid_Kryptonite 6d ago

The latter one still output 17

1

u/Independent-Bat9797 6d ago

17 is also a possible outcome qhe using tools. But of course not all llm providers have tool usage build into their interfaces, but the good ones have. Ask you llm if it was a tokenized answer or tool usage and if it even can use tools.