simonwillison.net · Saved

Hallucinations in code are the least dangerous form of LLM mistakes

simonwillison.net/2025/Mar/2/hallucinations-in-code

What Jamie wrote

That fact that code has to be structured right and executed by interpreters or compiled is the unlock that has made LLM's work for coding. LLMs get it wrong, but their partner, the compiler, tells them when they got it wrong and allows easy iterations. This is good and bad. Good in that you get super fast feedback loops to fix it. Bad though since syntax isn't the only thing that matters. Your code may compile, but is it actually right? That still takes the developer.