Claude Certification Blog

Prompt engineering & structured output on CCAR-F: the Domain 4 lesson

Prompt engineering & structured output on CCAR-F is Domain 4, 20 percent of the architect foundations paper and about 12 of 60 items. Its six task statements split into a code-review family and an extraction family, each naming a mechanism, not a craft.

20% of CCAR-F6 task statements2 of 6 scenarios

8 min read

Prompt engineering & structured output on CCAR-F is Domain 4 of the Claude Certified Architect Foundations blueprint, weighted at 20 percent, about 12 of the 60 items. Its six task statements are explicit criteria, few-shot prompting, structured output through tool use and JSON schemas, validation and retry loops, batch processing, and multi-pass review. Two of six published scenarios name it as primary: CI code review and structured data extraction. Every item turns on one move: name the failure, then pick the mechanism that fixes it at the layer where it lives.

20%of the CCAR-F paper
6task statements
2 of 6scenarios name it primary
12of 60 items, about

What prompt engineering & structured output on CCAR-F covers

The official CCAR-F exam guide (version 1.0, effective July 2026) lists six task statements, each with a knowledge block and a skills block. The right-hand column is the Cred Farmer reading of what each one decides, the question to answer before you look at any option. Checked against the official sources on 17 September 2026.

TaskWhat the guide namesThe decision it tests
4.1Explicit criteria over vague instructionsWhich rule replaces the adjective
4.2Few-shot prompting for consistencyIs the failure a judgment boundary
4.3Structured output via tool use and JSON schemasWhich tool_choice mode; which fields may be null
4.4Validation, retry and feedback loopsCan a retry succeed, and what is it told
4.5Batch processing strategiesIs anyone waiting on the result
4.6Multi-instance and multi-pass reviewDoes the reviewer know what the generator knew

Notice how little of the middle column is prompting: two statements, against one schema and three about the code around the call. Of the four tracks where prompt engineering is examined, this is the one where the subject is widest, and where it is most often the wrong answer.

Six objectives, two scenario families

Section 5 of the guide names Domain 4 as primary in two of its six scenarios: Claude Code for Continuous Integration, which wants actionable review feedback with few false positives, and Structured Data Extraction, which validates against JSON schemas and must not fabricate. Lay the task statements over those two and they sort themselves. The weight stays near 20 percent whichever four scenarios your form draws; all six are mapped in the CCAR-F exam scenarios post.

Six task statements under two scenario families, with two of them spanning bothSIX OBJECTIVES, TWO FAMILIESCI code reviewData extractionExplicit criteriaTask 4.1Multi-pass reviewTask 4.6Schemas via tool useTask 4.3Validate and retryTask 4.4Few-shot examplesTask 4.2, both familiesBatch strategyTask 4.5, both families
A Cred Farmer grouping by the scenario each task statement echoes; the guide's examples for 4.2 and 4.5 cite both. Review fails by saying too much, extraction by saying the wrong thing.

Three layers, three different guarantees

Hold the domain as a stack: prompt, schema, code. Each layer guarantees something the one above cannot.

Prompt shapes judgment, a schema guarantees shape, and code checks truthWHERE THE GUARANTEE LIVESPrompt: criteria and examplesShapes judgment, guarantees nothingSchema through tool useGuarantees shape, never truthCode around the callChecks truth, retries, batches, reviews
The recurring distractor works at the wrong layer: a firmer prompt for a shape problem, a stricter schema for an arithmetic one.

The prompt layer is 4.1 and 4.2, with Anthropic's pages on being clear and direct and multishot prompting as the reference. The guide's contrast is precise: telling the model to be conservative does not improve precision; a rule about which issue types to report does. The schema layer is 4.3: tool use with a JSON schema, per the tool use overview and structured outputs, removes syntax errors and knows nothing about whether the numbers are right. The code layer, 4.4 to 4.6, checks truth, tells a retry what went wrong, correlates a batch by custom_id, and reviews with a second instance that never saw the first one's reasoning.

Few-shot prompting on CCAR-F: the key once, the distractor twice

Section 9 of the guide publishes twelve sample items, and few-shot examples appear as an option in three. They are the key where an agent escalated easy cases and handled hard ones alone: the failure was an unclear decision boundary, and examples draw one. They are a distractor where an agent skipped a mandatory identity check, because a sequence that must never be violated needs a programmatic prerequisite. And they are a distractor where an agent chose the wrong tool, because the descriptions were minimal and the first fix is the description. That option also proposed five to eight examples; the skill statement under 4.2 says two to four. Examples here are a scalpel, and a pile of them is usually demonstrating its way past a defect in a description, a schema or a hook.

Name the failure before you read the options

Judgment, consistency, shape, truth, absence, latency, attention. Every Domain 4 stem describes one of those seven, and each maps to one mechanism: criteria, examples, a schema with the right tool_choice, a validating retry, a nullable field, a batch, or a separate review pass. An option that fixes a different failure is wrong even where it would work.

Shape from the schema, truth from the code

Task 4.3 names three tool_choice modes: auto, which may answer in prose; any, which forces some tool call and fits several extraction schemas with an unknown document type; and a named tool, which forces one specific extraction. Its other half is field design: nullable fields for information a source may not contain, so the model returns null rather than an invention, and enums with an unclear option and an other-plus-detail pattern. Task 4.4 draws the line the exam most likes to test: a retry that appends the validation error can repair a format mistake and cannot repair an absence. Where that line runs into batch handling and independent review is what a retry knows on CCAR-F; which papers name a JSON schema at all (one objective in the programme) is JSON schemas on the Claude exams; the round trip itself is Claude tool use and structured output.

A worked item

Written for this article · single response

A freight broker extracts line items and totals from 3,000 supplier invoices a night through a tool_use extraction schema. Every response validates, yet a reconciliation job rejects 6 percent of extractions because the stated total does not equal the sum of the line items. Which change most directly addresses the failure?

  • A. Force the named extraction tool with tool_choice so the model can never answer in prose.
  • B. Extract a calculated_total beside the stated_total, compare them in code, and on a mismatch resend the document with the failed extraction and the specific discrepancy.
  • C. Mark the total field required and expand its description to say it must equal the sum of the line items.
  • D. Move the nightly run to the Message Batches API so every document gets a second, cheaper pass.

Answer: B

Every response already validates, so the failure is semantic and lives in the code layer. A fixes a shape problem the stem does not have. C asks a schema to enforce arithmetic, which it cannot, and a required field invites fabrication. D changes cost and latency, not accuracy. B checks truth outside the schema and gives the retry the one thing that lets it correct: the error.

How to prepare for it

Classify the failure before the options, then check the layer. Take a free timed CCAR-F mock exam with the Domain 4 filter on and write the failure type beside every item; where the miss log repeats a word, reread that task statement. A practice percentage is practice evidence; it does not predict the 720 scaled cut. The practice exams guide covers what official material exists, and which Claude certification to sit owns the choice between the architect papers: the counterpart domain on CCAR-P names zero-shot, few-shot and chain-of-thought inside 13 percent and never mentions a schema. If Domain 4 is your weakest CCAR-F domain, the Claude certification study guide sets out the repair loop, and the Message Batches documentation is the primary source for the figures most often misremembered.

Key takeaways

  • Domain 4 is 20 percent of CCAR-F, about 12 of 60 items. Tied second-largest behind the 27 percent agentic domain.
  • Two of six task statements are prompting. One is a schema; three are code around the call.
  • Two scenarios name it primary. CI review fails by saying too much; extraction by saying the wrong thing.
  • Few-shot is the key once and the distractor twice in the guide's sample items. Examples draw a boundary; they cannot enforce an ordering.
  • A schema guarantees shape, never truth. Arithmetic and absence are checked in code, and a retry only helps when the source held the answer.

Twelve items, seven failure types, one habit

A free, timed CCAR-F mock exam, no account, filtered to Domain 4, a reason beside every option. Practice evidence, not a pass prediction.

Practise CCAR-F Domain 4 free

Questions

Frequently asked

The follow-up questions people search next.

How much of CCAR-F is prompt engineering and structured output?

Domain 4 is weighted at 20 percent of the Claude Certified Architect Foundations exam, about 12 items on a 60-item paper. It ties with Claude Code Configuration and Workflows as second-largest, behind Agentic Architecture and Orchestration at 27 percent. Weights are approximate shares of scored items.

Is few-shot prompting on CCAR-F the answer to inconsistent output?

Often, yes. Task statement 4.2 names few-shot examples as the most effective technique when instructions alone produce inconsistent output, and asks for two to four targeted examples. It is the wrong answer when the failure is a mandatory tool ordering or a thin tool description, which need a programmatic check or a better description.

Does a JSON schema guarantee correct structured output extraction on CCAR-F?

No. The guide says strict schemas through tool use remove JSON syntax errors but do not prevent semantic errors, such as line items that fail to sum to the stated total. The schema guarantees shape. Truth is checked in code and, where the source holds the information, by a retry that carries the specific error.

When is the Message Batches API the wrong answer on CCAR-F?

Whenever someone is blocked on the result. The guide gives the batch API a 50 percent cost saving, up to 24 hours of processing and no latency guarantee, and it cannot run multi-turn tool calls inside one request. Overnight reports fit; a pre-merge check does not.

Keep reading

Related posts

Not affiliated with, or endorsed by, Anthropic or Pearson VUE. Details are summarised from publicly published program information and can change. Always confirm against the official exam guide before booking.

We use cookies and privacy-friendly analytics to understand usage and improve Cred Farmer. Essential features work either way. See our Cookie Policy.