An LLM hallucinates when it produces text that sounds confident and plausible but is factually wrong or invented. To understand why, you first have to understand what the model actually does.
How an LLM works (briefly)
At a high level, an LLM is a . Given the text so far, it predicts the most likely next token (word/piece) based on — not by looking facts up in a database.
