Can OpenAI Structured Outputs Return Valid JSON With Incorrect Facts?

Asked 4 hours ago 16 views

0

I’m considering OpenAI Structured Outputs for extracting invoice details into a fixed schema. I understand the appeal of getting predictable fields and types, but I’m less clear about what that guarantees for the values themselves.

Suppose the response matches my schema perfectly, yet the model selects the wrong date from an invoice or supplies a tax amount that isn’t actually shown. Would that still count as a successful structured response?

Where should validation happen?

I want to distinguish schema compliance from invoice data validation. Would a sensible workflow separately check totals, compare extracted values with the source, and flag missing information for review?

Also, if a field is unreadable or absent, how should I design the schema so the model can represent uncertainty instead of being pushed to fill every field? I’m looking for the boundary between what the output format enforces and what my application still needs to verify.

0 Answers


Write Your Answer