AnthropicPrompt Engineering and Structured Output

Structured Output & Schema — CCAR-F Practice Question

A representative Claude Certified Architect - Foundations (CCAR-F) exam question on Structured Output & Schema. Work through it below, then read why each option is right or wrong.

This question is part of the free Claude Certified Architect - Foundations practice test.

Short answer

The correct answer is A. Define a strict schema with enumerated statuses and evidence fields, add edge-case examples, and validate.

A constrained schema makes valid states explicit and supports deterministic validation. Examples clarify edge cases without replacing the contract.

The Question

A compliance extractor must return one of three statuses and cited evidence spans. Which prompt/output design is strongest?

ADefine a strict schema with enumerated statuses and evidence fields, add edge-case examples, and validateCorrect
BAsk for CSV output without defining the columns or the allowed values for each status
CInfer each status from the tone of the response text instead of reading a defined field
DRequest a persuasive essay that argues for a status in prose and extract the answer later

Why A is correct

A constrained schema makes valid states explicit and supports deterministic validation. Examples clarify edge cases without replacing the contract.

Why the other options are wrong

Option B: Ask for CSV output without defining the columns or the allowed values for each status

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option C: Infer each status from the tone of the response text instead of reading a defined field

Option C does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Option D: Request a persuasive essay that argues for a status in prose and extract the answer later

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (A) is the only one that fully meets every constraint stated in the question.

Key idea: Structured Output & Schema

A constrained schema makes valid states explicit and supports deterministic validation. Examples clarify edge cases without replacing the contract. On the CCAR-F exam, questions in the "Prompt Engineering and Structured Output" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Claude Certified Architect - Foundations domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Claude Certified Architect - Foundations Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.