this post was submitted on 26 Feb 2025
693 points (98.1% liked)
Programmer Humor
20800 readers
1742 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
No, it's just that it doesn't know if it's right or wrong.
How "AI" learns is they go through a text - say blog post - and turn it all into numbers. E.g. word "blog" is 5383825526283. Word "post" is 5611004646463. Over huge amount of texts, a pattern is emerging that the second number is almost always following the first number. Basically statistics. And it does that for all the words and word combinations it found - immense amount of text are needed to find all those patterns. (Fun fact: That's why companies like e.g. OpenAI, which makes ChatGPT need hundreds of millions of dollars to "train the model" - they need enough computer power, storage, memory to read the whole damn internet.)
So now how do the LLMs "understand"? They don't, it's just a bunch of numbers and statistics of which word (turned into that number, or "token" to be more precise) follows which other word.
So now. Why do they hallucinate?
How they get your question, how they work, is they turn over all your words in the prompt to numbers again. And then go find in their huge databases, which words are likely to follow your words.
They add in a tiny bit of randomness, they sometimes replace a "closer" match with a synonym or a less likely match, so they even seen real.
They add "weights" so that they would rather pick one phrase over another, or e.g. give some topics very very small likelihoods - think pornography or something. "Tweaking the model".
But there's no knowledge as such, mostly it is statistics and dice rolling.
So the hallucination is not "wrong", it's just statisticaly likely that the words would follow based on your words.
Did that help?