Structured outputs for Anthropic Claude models on Amazon Bedrock
aws ·
Amazon Bedrock has introduced structured outputs for all Anthropic Claude models, enabling deterministic JSON responses that strictly conform to defined schemas. This feature utilizes constrained decoding during token generation, eliminating the need for custom parsing, retry logic, or post-processing validation. Developers can leverage this capability across both the bedrock-runtime and bedrock-mantle endpoints for tasks such as data extraction, contract analysis, and intelligent ticket routing. The implementation supports two main mechanisms: JSON Schema output format for general response structuring and strict tool use for agentic workflows requiring precise parameter validation. Performance is optimized through a 24-hour grammar cache, which reduces latency for repeated schema requests while ensuring type safety and required field presence. Key requirements include setting additionalProperties to false and using descriptive field names to maximize model accuracy. Supported features encompass basic types, enums, and specific string formats, though recursive schemas and external references remain unsupported. This update makes integrating Claude into production pipelines more reliable by guaranteeing schema-compliant outputs without additional error handling.
aws