All Lessons
What format is used to define schemas for structured outputs?
1 / 2
intermediate 20 min
Schema Definition
Based on Anthropic Claude documentation and the CCA-F exam blueprint. Updated June 2026.
Loading lesson content...
A JSON Schema defines age as {type: 'number'}. The model sometimes outputs 25.5 for age when the valid range should be integers only. What's missing?
1 / 2
A schema uses enums for a status field: ['pending', 'active', 'completed', 'failed']. The model outputs 'in_progress' which is not in the list. Using constrained decoding should prevent this. What might still go wrong?
1 / 2