Begin with the decision hidden inside the object
Imagine a hypothetical Philippine distributor whose assistant turns a customer request into a proposed replacement order. The output includes a customer identifier, product code, quantity and delivery date. Every field is present. The quantity is an integer. Yet the product may belong to a different account, the requested date may be unavailable, or the customer may have asked only for a quotation.
Kooya recommends writing the business decision before designing the schema: what is the system proposing, which facts support it, and what must be true before it can proceed? This prevents a successful parse from becoming an accidental permission to create a real commitment.
Keep the proposal separate from execution. The assistant can produce a candidate object for review or checking; the application decides whether it is acceptable to act on. Give each rejected proposal a visible reason so staff can resolve missing information instead of repeatedly asking the model to try again.
Understand what structured output actually contributes
Anthropic’s documentation describes structured outputs as a way to constrain responses to a schema and provide parseable data. It distinguishes JSON output formatting from strict validation of tool names and inputs, and documents limitations in its supported schema features. Teams should check the exact provider route and supported constraints rather than assume every schema keyword is enforced.[1]
JSON Schema’s own reference illustrates another implementation detail: the format keyword is an annotation by default, while validators can optionally enforce it as an assertion. Supported formats and checks can differ. A field labelled as a date or email therefore deserves an explicit test of the actual validator configuration.[2]
Kooya’s practical conclusion is to specify the integration contract precisely: schema version, required fields, allowed extra fields and actual validation behaviour. Those checks reduce a class of integration errors. They do not replace the domain checks needed to decide whether this particular order should exist.
Check the references and relationships behind each value
For the replacement-order example, resolve the customer identifier against the authorised customer record. Confirm the product code exists and belongs in the relevant catalogue. Then check the relationship: is this product connected to the original order being discussed? Individually valid identifiers can still form an invalid combination.
Kooya recommends attaching evidence references to material extracted values, especially where the next action changes a commitment. A reviewer should be able to find the customer’s request or the approved record that supports the quantity. A model-written explanation of why a value looks reasonable is not a substitute for that source.
Represent absent or conflicting information explicitly. If the customer did not state a delivery date, do not convert silence into tomorrow’s date merely because the schema requires a string. Design a missing-information route, such as an incomplete proposal with a question for the customer, rather than rewarding plausible completion.
Apply business rules without asking the model to authorise itself
Kooya recommends putting stable rules in application logic or another governed decision service. In this example, verify permitted quantities, replacement eligibility and the current delivery options. Keep the rule owner and version identifiable so a rejected request can be explained and an approved policy change can be implemented deliberately.
Separate rule eligibility from authority. A replacement may qualify under policy while the current caller lacks permission to approve it. Use the authenticated identity and the application’s permission model for that decision. A boolean field called approved, supplied by the model, should not itself establish who authorised the action.
Where judgment is required, show a person the proposed change, supporting facts and unresolved question. Approval should apply to that proposal. If later checking changes the quantity or customer commitment, obtain the relevant renewed approval rather than silently substituting a different object under the earlier decision.
Use our AI agent approvals guide to define who may authorise each proposed action.
Test objects that look good and should still fail
A useful acceptance set includes well-formed objects with the wrong customer relationship, a nonexistent product, an unsupported date and a request from an unauthorised caller. Include a genuinely incomplete request too. Ask the supplier to show which check rejects each case and how the exception reaches the right person.
Also test a correct proposal from end to end. Rejection-only tests can hide a workflow that blocks everything. The accepted case should retain its source references and decision evidence through to the destination record, while rejected cases must not create an external change before review.
Kooya recommends measuring these outcomes separately: structurally invalid responses, unsupported facts, rule failures, permission failures and accepted actions. A single success percentage hides which layer needs improvement. These are proposed evaluation categories, not claims about results achieved by a particular model or client.
Make the final handover readable by the operations owner. It should explain what the machine checks, what a person decides and how missing information is resolved. That gives structured outputs their proper role: a dependable interface inside a controlled business process.

