01 / DECIDE
Architecture decision
Use it for extraction, classification, UI state, and any workflow where the next step consumes typed data.
Structured Outputs reduce parsing ambiguity, but product code must still handle refusals, incomplete results, and domain-invalid values. Map input, output, state, and side effects as one observable path before deciding which layer owns use schema as the output contract.
02 / BUILD
Three-step implementation
- 01
Frame the contract
Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use it for extraction, classification, UI state, and any workflow where the next step consumes typed data.
- 02
Build one narrow path
Implement one end-to-end path with request correlation, typed state, and reversible failure handling. Structured Outputs reduce parsing ambiguity, but product code must still handle refusals, incomplete results, and domain-invalid values.
- 03
Prove the outcome
Turn acceptance into a repeatable fixture, contract test, or browser test. Tests cover valid output, refusal, truncation, malicious input, and every business-rule failure branch.
03 / BOUND
Production boundary
Schema conformance is not factual correctness; validate identifiers, permissions, totals, dates, and cross-field invariants.
04 / PROVE
Acceptance evidence
Tests cover valid output, refusal, truncation, malicious input, and every business-rule failure branch.
SOURCE / HTTP
Reproducible source probe
curl -fsSI 'https://developers.openai.com/api/docs/guides/structured-outputs' | sed -n '1,5p'