MikhbarMIKHBAR
Artificial Intelligence

Amazon Bedrock Adds Structured Outputs for Anthropic Claude

Amazon Bedrock has introduced native support for structured outputs across all Anthropic Claude models, enabling developers to receive reliable, schema-compliant JSON responses without relying on custom parsing or retry logic.

Amazon Bedrock Adds Structured Outputs for Anthropic Claude

Native Structured Outputs for Claude on AWS

Amazon Bedrock has rolled out native support for structured outputs across all Anthropic Claude models where they are available. Developers can now utilize this capability on both the bedrock-runtime and bedrock-mantle endpoints to receive schema-compliant JSON responses. According to the AWS Machine Learning Blog, this integration eliminates the need for custom parsing, post-processing, or application-level retry logic.

Whether interacting with Claude through Boto3 and the bedrock-runtime APIs or via the Messages API and the bedrock-mantle endpoint, the system guarantees that responses align directly with a defined data structure. Detailed implementation guidelines are available in the official Amazon Bedrock documentation.

How Constrained Generation Works

The underlying architecture uses constrained decoding to enforce JSON schemas dynamically during token generation rather than validating them after the fact. Because the model is restricted from generating tokens that violate the specified schema, output formatting shifts from probabilistic to deterministic. Comprehensive information regarding these mechanics can be found in the guide on Structured outputs.

When a request is submitted with a JSON schema, Amazon Bedrock validates it against a supported subset of JSON Schema Draft 2020-12. For new schemas, the platform compiles a grammar artifact, which may cause a slight delay on the initial request. Subsequent queries benefit from caching, as compiled grammars are stored for up to 24 hours to ensure minimal performance overhead.

Strict Tool Use and Agentic Workflows

The update also introduces strict tool use on the bedrock-mantle endpoint, which is engineered specifically for agentic applications requiring server-side tools, stateful conversations, and background inference. By setting strict schema enforcement, developers can guarantee that tool parameters match input schemas precisely.

This functionality is particularly beneficial for complex multi-step workflows where models orchestrate tasks like code interpreters or web searches. Restricting the tool input ensures that the model cannot add extraneous fields outside the pre-defined schema.

Scale and Production Deployment

Structured outputs are built to support high-volume workloads and asynchronous operations. The feature integrates seamlessly with batch inference, allowing organizations to process large quantities of requests asynchronously while maintaining strict schema compliance.

Additionally, the bedrock-runtime endpoint supports cross-Region inference for structured outputs, enabling deployment across multiple AWS Regions without extra configuration overhead. Developers requiring real-time answers can also stream structured responses as typed events.

Developer Implementation Guidelines

To ensure optimal performance and schema acceptance, AWS outlines several best practices for developers building applications with the new capabilities. Developers must set additionalProperties to false on all objects, utilize descriptive naming conventions, and leverage enumeration types for constrained values.

AWS also recommends starting with basic schemas before scaling up complexity, as simpler schemas compile faster and keep request payloads efficient. Furthermore, monitoring the stop reason in every response is essential to handle edge cases such as content safety refusals or token limits.

Sources

Continue chronologically

Related entity coverage