How did you solve the problem of hallucinations?

I've built a list of common gotchas in the generation prompts. Also if the compilation fails it falls back to opus with the error message and code and can try again twice.

That's not a solution to the root problem. That is duct tape.

This is built with the paradigm of "don't build for the model of today, build for the model in 6 months" It currently works, which amazes me still, but it will get much better!