OAI-SE Structured Outputs & Strict JSON Schemas MEDIUM
PRODUCTION SCENARIO
Aldergate's intake service requests a strict structured object for insurance claims. On a small share of documents the response carries a refusal instead of the claim object, and the parser throws.

Which check should the client make before reading the claim fields?

Answering here is anonymous. Nothing is saved unless you sign in.

Show answer and explanation

Answer: Branch on the refusal property before reading any business field value

A refusal is a separate, programmatically detectable outcome: the output carries a refusal property in place of the requested object, so the client branches on that before touching any business field. A refused response still completes, so status says nothing useful; output_text can be empty for a truncated response as well as a refused one; and a parse failure is a symptom shared with truncation rather than a cause.
Free

Keep practicing OAI-SE

24 original OAI-SE practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free