In 2023 we prayed for clean JSON. In 2026 we force it.

Three techniques

  1. Schema-guided generation — native in OpenAI/Anthropic APIs, 100% guaranteed with strict mode.
  2. Tool use as surrogate — force a specific tool call with your desired schema.
  3. Instructor / constrained decoding — validate + retry pattern for open-source models.