LLMs can't do probability
11–20 of 211 posts
Re: LLMs can't do probability
#12Re: LLMs can't do probability
#13Earlier quoted context omitted.
Is it because humans are bad at probability that LLMs are bad at probability or is it something inherent in this kind of statistical inference technique? If you trained an LLM on trillions of random numbers will it become an effective random number generator?
In this case being "bad at randomness" isn't because it was trained on text from humans who are bad at randomness, it's because asking a computer system that doesn't have the ability to directly execute a random number generator to produce a random number is never going to be reliable.
It would be interesting to see if it could generalize at all. I'm pretty certain if you trained it specifically on
"Generate a random number from 0 to 100" and actually give it a random number from 0 to 100 and give it billions of such examples it would be pretty effective at generating a number from 0 to 100. Wouldn't each token have equal weighted probability of appearing?
Re: LLMs can't do probability
#14One way of doing it, I suppose.
Re: LLMs can't do probability
#15>You are a weighted random choice generator. About 80% of the time please say ‘left’ and about 20% of the time say ‘right’. Simply reply with left or right. Do not say anything else I could have told you these results solely based on the methodology combined with this system prompt. No need to spend money on APIs. Randomness in LLMs does not come from the context, it comes from sampling over output tokens the LLM con…
I think the author's point stands. They aren't asking "what would you expect from a distribution so described?" The answer to that question is 100% of the time "left.". A well behaving LLM responding to the actual question should distribute the logits across "left" and "right" in the way requested by the user and doesn't.
I think if you chose 1000 random people and prompted them with this question you would get a preponderance of "lefts" compared to the prompt, but not 100% left.
Re: LLMs can't do probability
#16You could prompt the LLM differently , for example to write a Python program that does the random part, and then act on its output.
Re: LLMs can't do probability
#17"sample a uniform distribution with mu = 0 and sigma = 1", prompt giving a single float repeated 500 times
https://strangeloop.nl/IMG_7388.png
I wonder if it converges better if you ask it once, in one go, for 500 samples. Chain-of-thought stochastic convergence.
Re: LLMs can't do probability
#18>You are a weighted random choice generator. About 80% of the time please say ‘left’ and about 20% of the time say ‘right’. Simply reply with left or right. Do not say anything else I could have told you these results solely based on the methodology combined with this system prompt. No need to spend money on APIs. Randomness in LLMs does not come from the context, it comes from sampling over output tokens the LLM con…
I mean, theoretically I assume you could train an LLM so that for the input "Choose a random number between 1 and 6" output tokens 1, 2, 3, 4, 5 and 6 are equally likely. Then the sampling process would produce a random number.
Of course, whether you could teach the model to generalise that more broadly is a different matter.
Re: LLMs can't do probability
#19If you prompt “Sometimes answer ‘red’ and sometimes answer ‘blue’” are the results roughly 50/50?
Or how about “Usually answer ‘red’ but occasionally answer ’blue’”?
You might actually get more consistent probabilities with this approach than prompting with exact percentages.