Output contracts make work usable

Specify the fields, allowed values, and missing-data behavior a person or program needs from Claude’s response.

Start at the point of use

Pick the reader or import process and ask what it needs to act. State column names, data formats, and how unknown values should appear. Use explicit constraints for fields that drive filtering, notifications, or other downstream decisions.

Claude’s structured outputs documentation

Convert two triage notes into records

B12 blocks sign-in and is assigned to Priya with evidence E4. B13 reports a confusing label and has evidence E7 but no owner. Ask for columns case_id, impact, owner, and evidence_id, with ‘Unassigned’ for a missing owner.

Inspect the expected rows

B12 should map to impact ‘blocking’, owner ‘Priya’, and evidence E4. B13 should map to ‘minor’, ‘Unassigned’, and E7. If the team has no rule for mapping a label issue to minor, supply that rule or require an unknown impact.

Test what the importer will reject

Add a note referring to B14 twice with conflicting owners. Require one row per case ID and a separate conflict note. Check unique IDs and evidence before joining the output with your ticket system.

Related reading

Claude is not a search engine

Use examples when behavior is hard to describe

Check yourself: Prompting That Actually Works