A parseable JSON string is not necessarily useful structured data. JSON mode can ensure well-formed syntax while omitting a mandatory key or inventing a new label. Schema-constrained output adds stronger format guarantees for supported models and schema subsets, but it does not prove that the extracted values are true. Teams should validate structure and evidence independently.
Schema first
Define required fields, explicit nullability, permitted enums, date formats and a version number. Keep objects small enough to test. For a contract extraction system, use effective_date, jurisdiction, termination_notice_days and evidence_quote, plus an unknown state where the source is silent. Store exact evidence locations separately so a reviewer can trace each extracted value.
Two kinds of failure
A model can return valid JSON with a wrong date; a separate model can answer correctly but violate the schema. Report those errors separately. OpenAI’s documentation explains that structured outputs support a subset of JSON Schema and refusal or truncation can interrupt normal output. Production parsers must handle both conditions rather than assuming every call returns the happy-path object.
Do not let tools execute unchecked
Function-call schemas are not a permission system. If the model returns a delete_customer function call with perfectly valid arguments, the server still needs to check authorization, the user intention and confirmation. Use a dry-run mode and store a normalized audit record before executing side effects.
Choosing a provider
Choose based on documented support for the exact model/version and endpoint. Re-run a conformance suite after every model migration: missing fields, nested arrays, enum edge cases, multilingual text, refusal handling and long responses. Do not infer that feature support exists on a vendor’s historical model from a 2026 page discussing its newest release.
What to verify before adopting this model or method
Use the exact release ID and API endpoint; confirm your geographic processing location, entitlement tier, model lifecycle, feature flags, context and output limits from the provider console. Run a reproducible evaluation on your own data and retain human oversight for consequential actions. Where a specification, price, commercial license or entitlement is not verified for your deployment, this article deliberately leaves it unasserted instead of filling a plausible number.
Sources & Further Reading
- developers.openai.com — documentation/reference (supplier-provided reference; not independently checked in this pass)
- ai.google.dev — documentation/reference (supplier-provided reference; not independently checked in this pass)
Source documentation establishes vendor-published facts, not independently measured model quality, tenant access, contractual rights or current prices. Use a dated pricing ledger and an account-specific entitlement check for deployment decisions.