We don't really. It just works. I've seen so many validation libraries and techniques come and go, but most serious builders I know don't bother with them. They're essentially just nerd traps. Prompt the model well, and it'll output the right format 99%+ of the time.
Prompt engineering beats validation libraries for reliable outputs
By
–