Oh OpenAI finally offered constrained generation e.g. supply the regex the output should match (something llama.cpp had). I get much better results for coding LLM if the output is XML, so now I can have a custom too output valid XML trivially.
cookbook.openai.com/examples/gpt-5/gpt-5_new_params_and_tools#3-contextfree-grammar-cfg
Tom Larkworthy 2025-11-17 19:44:16
this is really great actually, you don't need to even explain what the output format should be, it is railroaded into producing conforming output