
So LLM’s are basically fancy auto correct. You type a phrase and it guesses what comes next, based on training and weights, etc.
Hallucinations happen when the guess is wrong. And then you iterate on the wrong guess. So the initial guess can be minor, it can guess “how can I drive a car” instead of “how can I drive a tractor”. Which on its own is a small deviation, but after looping on that wrong guess, the outcome is much different.
This is a high level view but I hope it makes sense.

If you enforce syntax instead of using natural language, then what you’re making is a programming language.
There are strategies to reducing hallucinations but you’re just kicking the can down the road. They will still happen.
The only true fix is human confirmation of output. This will always be the limit of LLMs