Yes, randomness is involved, except you're destroying the snot out of it by biasing it to hell and back with those billion-trillion parameter models in front of the sampler.
Alternatively, check the difference between a typical ChatGPT prompt response, and the output of the following:
import tiktoken, secrets
enc = tiktoken.get_encoding("o200k_base")
tokens = tuple(enc._mergeable_ranks.values())
msg_len = 128 + secrets.randbelow(2048 - 128)
token_ids = [secrets.choice(tokens) for _ in range(msg_len)]
print(enc.decode(token_ids))
You'll note that they're not much alike. You may also note that with LLMs you can set the "temperature" parameter to zero, in which case the sampling is no longer randomized. So much so, that given various runtime conditions, passing in the byte exact input will return the byte exact output, every time. Possibly across machines, depending on the inference engine used.Even if you mean it on a "higher level", imbued into the language emitted, do feel free to ask a model with disabled tool calling to give you some random numbers / words. You'll find that it isn't very random. Certainly wasn't when I last tried this for entertainment.
Do you know what I mean?
The model emitting nonsense is mostly the model just being terrible in general. The model answering slightly different each time is inference details, like temperature, seed, batching, hardware, etc. The model responding to the same inquiry very differently is the model being semantically unstable. These all exist but they are distinct, and social media isn't kind to nuance to begin with.
You gestured at the second previously, but what you describe now is mostly the former. I don't really experience this anymore, but I do typically use Opus, and work an area where it's clearly excelling in, so that's probably why. Every time I go back to Sonnet, the bullshit parade begins, no matter the amount of context provided, or the thinking effort level configured. Mostly tolerable, but I wouldn't leave it unattended, like you say.
The third I only recently got into testing, cause it's kind of rich to re-run the same task many times just to eval stochastic variation, and not even always viable. Tested Luna, Terra, and Sol at various thinking levels, multiple runs each on the same problem, perturbing it with a (genuinely) random bit of text injected each time. The famed stochastic parrot effect didn't really materialize, I got normal parrots. I wouldn't necessarily say this was a clear win in semantic stability though, cause the random bit of text wasn't semantically relevant. Maybe if I reworded the prompts proper each test, it'd have been a different story. But then that's not a clean test per se. Controlling for variables is hard enough even in normal research, try controlling for billions reacting who knows how, which is the whole issue to begin with, after all. So you can't properly test without better understanding, but you can't gain the understanding without proper testing. Catch 22.
It's the highly non-uniform nature of the distribution before sampling that allows the LLM to produce coherent results. That non-uniformity is the result of complex dependencies in the model weights, which allow it to produce context-dependent sequences.
Since you're being snarky about asking an LLM, I'll note that your comment above is closer to gibberish, for the reasons I've described, than anything a frontier LLM would produce. If we were to extrapolate from this one data point, we might conclude that an LLM is a more trustworthy choice to flash a router than a human that produces such comments.