Exam CCAR-F Topic 1 Question 161 Discussion

Actual exam question for Anthropic's CCAR-F exam
Question #: 161
Topic #: 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.
Your system must extract event details from calendar invitations and output JSON that strictly conforms to a schema with fields for title, date, time, location, and attendees. Downstream systems reject any malformed or non-conformant JSON.
What approach provides the most reliable schema compliance?

Suggested Answer: C Vote an answer

A tool definition converts the desired extraction structure into an explicit machine-readable contract. Claude returns the event information inside a tool_use block, with the tool arguments corresponding to the properties defined by the tool's input_schema . Anthropic specifies that custom tool parameters are described using JSON Schema, allowing the application to extract the structured arguments directly rather than attempting to recover JSON from ordinary prose. For current implementations, adding strict: true to the tool definition provides guaranteed conformance of tool-call inputs to the declared schema. ( https://docs.anthropic.com/en
/docs/agents-and-tools/tool-use/implement-tool-use )
Options A, B, and D remain prompt-based formatting techniques. They may improve the probability of valid JSON, but none creates the same schema-enforced interface. Prefilling an opening brace constrains the beginning of the response without guaranteeing valid field names, required properties, or data types. Retry logic detects failures only after generation and adds latency. Detailed formatting instructions can still produce malformed or structurally incorrect output.
Anthropic now also provides Structured Outputs for direct, schema-validated JSON responses. Within the options presented, however, a schema-defined tool is the only approach that establishes an explicit structured- output boundary rather than relying primarily on text-generation compliance. ( https://docs.anthropic.com/en
/docs/test-and-evaluate/strengthen-guardrails/increase-consistency )
Official references/topics: Tool Definitions, JSON Schema Input Contracts, Strict Tool Use, Structured Outputs.

by Jesse at Sep 03, 2026, 02:43 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10