The model returns valid JSON with a submission date. Your parser accepts it. Is the date actually in the document?
Structured outputs constrain the shape of a response. They do not establish that a value is true, that its source supports it, or that the user is allowed to act on it. Check those separately, especially when an incorrect amount or deadline can affect an intake workflow.
Define the extraction task
Choose a task you can evaluate. For an RFP, that might mean extracting the supplier, submission date, currency, and a reference to the source passage. Decide which fields are required, which can be unknown, and which need a reviewer.
Represent a missing value explicitly. Otherwise the model may fill the gap with a plausible guess.
Use structured response formatting when the model returns data to your application. Use function calling when it needs to request a tool or an application action.
OpenAI's guide describes the supported subset of JSON Schema. In strict schemas, it requires objects to set additionalProperties to false. Check the documentation for your model and API before relying on a schema feature.
Validate the shape and the facts
Validate twice. Schema validation checks the shape, types, and required fields. Business validation checks things such as whether a date is possible, a currency is allowed, an amount is reasonable, and an identifier belongs to the right account.
Keep the source and page or passage reference with each extracted value. When the result is disputed, a reviewer needs to see where it came from.
Give records explicit states: received, extracted, validation failed, awaiting review, approved, and applied. Save the model, schema, and prompt versions alongside the review decision. An approved schema should not silently change data when the model changes.
Treat a transient transport failure differently from invalid input or a model refusal when deciding whether to retry.
Test difficult documents
Test blank and scanned forms, conflicting dates, multilingual labels, ambiguous currencies, and repeated fields. Include text that tries to override the extraction instructions.
Score the extracted fields and their source support, not merely whether the response parses as JSON. If results differ by customer or document type, evaluate those groups separately.
Separate extraction from action
Keep the action separate from the extraction. A reviewer may correct a field, reject the document, or ask for more evidence before anything is applied.
Pass the approved record to a narrow service that checks authorization and idempotency. Log the outcome and error category without putting secrets or sensitive documents in the logs.
Use the worksheet below to record the fields, evidence requirements, failure handling, and acceptance criteria. Update it as the schema changes. Re-run your regression set when the model, prompt, document parser, or downstream business rules change.
Sources and further reading
Documentation reviewed November 9, 2026. Verify current model support, limits and pricing before implementation.