Why it matters
Validate JSON schema before side effects; repair carefully.
Practical steps
- Define input/output schemas for ai json mode and keep prompts versioned in git.
- ACK the chat platform first; run model calls asynchronously for validate JSON schema before side effects; repair carefully.
- Cap tokens/timeouts; treat tool/function results as untrusted until validated.
- Add eval fixtures that catch regressions in ai json mode without calling production keys.
- Document model fallback and redaction rules operators need for ai json mode.
Watch out for
- Copy-pasting outdated snippets for ai json mode without re-reading current official docs.
- Shipping ai json mode to production without a staging rehearsal and a documented rollback.