Great question — answering as the UphillTech team:
From my understanding (and my formal education consists of undergraduate courses in NLP) transformer models (LLMs) basically just build a mess of abstractions (first grammar, then higher-level things like "themes" and "ideas") over the tokens they're trained on using the self-attention mechanism, then predict token-by-token from these abstractions. Because they are abstractions it is fair to say that they are better than just stochastic parrots or statistical predictors, but the issue is that there's no way of knowing or guaranteeing that the abstractions learned by an LLM correspond to the "actual" ideas, and so when it produces answers there's a chance it'll "hallucinate" something that...
Full answer by bishop-fish: https://ai.stackexchange.com/a/50461 (CC BY-SA 4.0).
Need it done for your business? UphillTech.