Skip to content
Launchr Space Journal

Engineering Analysis · Global

Structured output still needs a failure path

For AI-assisted intake, keep incomplete or refused Responses API results out of the business record.

By Launchr Space ·

Illustration: Inspect result → Validate fields → Commit or review.
Illustration: Inspect result → Validate fields → Commit or review.

Imagine a customer submits a request for a quote. The extraction produces a neatly formatted object with the contact name and half the requirements, then stops. If your application trusts any object it can parse, it can turn an incomplete model response into a valid-looking sales record. The first test should be whether an interrupted extraction can update the record at all.

OpenAI’s Structured Outputs guide distinguishes output that follows the supplied schema from exceptions your application must handle. A refusal can be represented separately from normal output. A Responses API result can also be incomplete, for example when the output-token limit is reached. Neither condition belongs in the same path as a completed extraction.

Check status before interpreting fields

We recommend keeping the original input unchanged and storing a separate extraction result with a short status such as completed, incomplete or needs review. Inspect response status and the output content type before using parsed fields. Recognise an explicit refusal, and decide whether to offer a manual form or a human review. A bounded retry can make sense for an output-length limit when a shorter response or revised budget is appropriate. Unchanged repeated retries are not a recovery plan.

Validate against what the business accepts

A correct schema can still contain the wrong currency, an unsupported date, or a contact address assigned to the wrong party. Check fields that would affect pricing or commitments against the original request before acting. If information is missing, retain that fact rather than inserting plausible defaults. Route high-impact or ambiguous fields to a person; let the application display which information it could not confirm.

Test the cases that should write nothing

In staging, send representative input and inject a normal result, a refusal, an incomplete result and a syntactically valid result with an impossible delivery date. Verify which response can update the business record. Record outcomes with minimal metadata so the team can spot a rising failure rate without keeping unnecessary customer text in logs. If the happy path is the only test with a clear expected outcome, define the fallback before releasing the automation.

Sources

Keep reading