Design by Contract and Effects for LLMs
gavinray97.github.io
gavinray97.github.io
Another pattern related that I've found useful with multi-threaded programming is to hand code threading and signal interactions. Up to this point, I've only had at best over complexity and at worst complete failure wrt multi-threaded logic.
SoI make sure the core multi-threaded logic is sound. Then the LLM can do a resonable job once the "scaffolding" is in place.