Structured Output with Tool Use & JSON Schemas
Claude Certified Architect – Foundations (CCAR-F) exam practice questions · 10 flashcards
Question
Most reliable way to get schema-compliant output?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Structured Output with Tool Use & JSON Schemas practice questions and answers
- Most reliable way to get schema-compliant output?Tool use with a JSON schema (structured output).
- Does tool-based structured output eliminate all errors?It eliminates JSON syntax errors, but not semantic errors (e.g. totals that don't add up).
- Unknown document type, several schemas. Which tool_choice?any, so a tool must be called.
- Must extract metadata first. Which tool_choice?Force the specific extraction tool.
- Why make fields nullable/optional?Prevents Claude fabricating values when the source lacks the information.
- How do you handle values outside fixed categories?Add an enum value like 'other' plus a detail string field.
- Why add an 'unclear' enum value?Lets Claude signal ambiguity instead of guessing.
- How do you handle inconsistent formats in source data?Include format normalization rules in the prompt alongside the schema.
- Required vs optional fields?Required only when always present in sources; otherwise optional.
- What are schema syntax errors vs semantic errors?Syntax: invalid JSON/structure. Semantic: valid structure but wrong or inconsistent values.