top of page

Valid JSON Does Not Mean Your AI Extracted the Right Answer

Oct 20
3 min read
Structured AI output validation showing separate checks for format, evidence and business rules.

An AI assistant returns a neatly structured object with a customer name, requested date and service category. Every field has the expected type. The date, however, was inferred from an example in the email signature rather than the actual request. The software can parse the result, but the business answer is wrong.


To validate structured AI output, separate three checks: format, evidence and business meaning. A reliable extraction workflow needs all three before its result is used to change a record.


Understand what structure provides


Structured output can make a response easier for software to consume by constraining its shape. It does not, by itself, establish that the values match the source or the business rules.


Google's Gemini documentation makes this distinction explicit: applications should validate values and handle outputs that fit the schema but are semantically incorrect. It also states that supported schema features are a subset of JSON Schema, so implementers should confirm the actual provider contract.



The workflow below is a proposed design for extracting ordinary service-request details. It is not a statement that FutureOS currently includes a particular model or extraction feature.


Define a field's evidence requirement


For each extracted field, specify what counts as support. A requested delivery date should come from the relevant request text, not the email receipt date or an unrelated quoted conversation.


A proposed extraction record can include the candidate value, source document identifier, supporting passage and a status such as found, missing or conflicting. Keep the source reference useful enough for a reviewer to locate the evidence.


Do not require a passage for a value that was deliberately calculated. Instead, record the authorized calculation and its inputs. Extraction and derivation are different operations and should be reviewable as such.


Allow the system to say information is missing


If a schema requires every field to contain an ordinary value, the workflow may encourage guesses. Define how missing or uncertain information is represented in the provider's supported format.


For a service category, an allowed “needs review” state may be better than forcing a category that the request does not support. For a date, keep “not supplied” distinct from “supplied but ambiguous.”


The receiving process must handle these states. A missing marker is not useful if a later automation silently converts it to today's date.


Check business rules independently


Consider an illustrative request that says “Please begin after the materials arrive; the arrival date is not confirmed.” A valid date-shaped value is not acceptable evidence of a start commitment.


Business checks might require that a selected category exists in the approved catalog, that a referenced account is uniquely identified and that a proposed completion date does not precede a confirmed start date. Implement deterministic checks where the rule is explicit and reserve interpretation for cases that require it.


A valid catalog entry still may be the wrong category for the request. Passing the allowed-value check should not automatically pass the evidence check.


Use a field-level review sheet


For each test case, record the expected value or expected uncertainty, the actual output and the reason for any discrepancy. Distinguish these failure classes:


  • Formatting failure: the response cannot be consumed as required.

  • Unsupported value: the field contains information absent from the relevant source.

  • Wrong-source value: the information exists, but in an unrelated passage.

  • Rule failure: the value conflicts with a defined business constraint.

  • Missed uncertainty: conflicting or incomplete evidence was presented as definite.


This classification helps the team choose a repair. Tightening the schema may address formatting while doing nothing about a wrong-source date.


Test documents that tempt a plausible mistake


Include a message with two dates serving different purposes, a quoted earlier request, a missing service name and contradictory instructions from different versions. Use approved or synthetic examples.


Ask reviewers to evaluate each important field, not merely whether the overall summary reads well. A fluent paragraph can hide an incorrect identifier that later updates the wrong record.


Keep some cases outside prompt tuning for a final check. Record the model, prompt, schema and source versions used so the result can be interpreted after changes.


Separate extraction from commitment


Save the extracted result as a reviewable proposal when the next action is consequential. Show the evidence next to the proposed fields, and identify what remains unresolved.


The final acceptance test should inspect the destination record as well as the structured response. This verifies that downstream mapping preserved the meaning and did not introduce a new default.


For document ownership and approved sources, read the AI knowledge base guide. Consult the FutureOS introduction when framing a prospective extraction project.


Editorial note: Prepared with AI assistance. Linked sources checked on October 20, 2026. The field review method and request examples are illustrative.


Comments


Commenting on this post isn't available anymore. Contact the site owner for more info.
bottom of page