When encountering a difficult problem, add an indirection.
That indirection, in the case of LLMs, is formal proof. It can actually turn an LLM into a sort of compiler. Where, if the compiler run completes successfully, you don't need another run, and you are sure it is correct.