---
title: "Prompt Engineering on CCAR-F: Domain 4 | Cred Farmer"
url: https://credfarmer.com/blog/prompt-engineering-and-structured-output-on-ccar-f
description: "Name the failure, then fix it at its layer: 20% of 60 items. Prompt engineering on CCAR-F, with structured output, six task statements and a worked item."
last_updated: 2026-09-17
publisher: "Cred Farmer, an independent study platform, not affiliated with or endorsed by Anthropic or Pearson VUE"
---

Claude Certification Blog

# Prompt engineering on CCAR-F, with structured output: the Domain 4 lesson

Prompt engineering on CCAR-F, with structured output, 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-F · 6 task statements · 2 of 6 scenarios

Published 17 September 2026Updated 17 September 20268 min read

By the Cred Farmer editorial team.Checked against the official sources on 17 September 2026.

Prompt engineering on CCAR-F, with structured output, 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

6 · task statements

2 of 6 · scenarios name it primary

12 · of 60 items, about

## What prompt engineering on CCAR-F covers, structured output included

The [official CCAR-F exam guide](https://anthropic-partners.skilljar.com/page/partner-certifications) (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.

| Task | What the guide names | The decision it tests |
| --- | --- | --- |
| 4.1 | Explicit criteria over vague instructions | Which rule replaces the adjective |
| 4.2 | Few-shot prompting for consistency | Is the failure a judgment boundary |
| 4.3 | Structured output via tool use and JSON schemas | Which tool_choice mode; which fields may be null |
| 4.4 | Validation, retry and feedback loops | Can a retry succeed, and what is it told |
| 4.5 | Batch processing strategies | Is anyone waiting on the result |
| 4.6 | Multi-instance and multi-pass review | Does 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](https://credfarmer.com/blog/prompt-engineering-on-the-claude-exams), 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](https://credfarmer.com/blog/ccar-f-exam-scenarios).

**Figure:** Six task statements under two scenario families, with two of them spanning both

- SIX OBJECTIVES, TWO FAMILIES
- CI code review
- Data extraction
- Explicit criteria · Task 4.1
- Multi-pass review · Task 4.6
- Schemas via tool use · Task 4.3
- Validate and retry · Task 4.4
- Few-shot examples · Task 4.2, both families
- Batch strategy · Task 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.

**Figure:** Prompt shapes judgment, a schema guarantees shape, and code checks truth

- WHERE THE GUARANTEE LIVES
- Prompt: criteria and examples · Shapes judgment, guarantees nothing
- Schema through tool use · Guarantees shape, never truth
- Code around the call · Checks 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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/be-clear-and-direct) and [multishot prompting](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/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](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) and [structured outputs](https://platform.claude.com/docs/en/build-with-claude/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](https://credfarmer.com/blog/retry-batch-and-review-on-ccar-f); which papers name a JSON schema at all (one objective in the programme) is [JSON schemas on the Claude exams](https://credfarmer.com/blog/json-schemas-on-the-claude-exams); the round trip itself is [Claude tool use and structured output](https://credfarmer.com/blog/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](https://credfarmer.com/practice/ccar-f) 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](https://credfarmer.com/guides/claude-certification-practice-exams) covers what official material exists, and [which Claude certification to sit](https://credfarmer.com/guides/which-claude-certification) owns the choice between the architect papers: the counterpart domain on [CCAR-P](https://credfarmer.com/certifications/claude-certified-architect-professional) 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](https://credfarmer.com/certifications/claude-certified-architect-foundations) domain, the [Claude certification study guide](https://credfarmer.com/blog/how-to-study-for-the-claude-certification) sets out the repair loop, and the [Message Batches documentation](https://platform.claude.com/docs/en/build-with-claude/batch-processing) 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](https://credfarmer.com/practice/ccar-f?domain=4)

Questions

## Frequently asked

Short answers to the questions this post leaves open.

**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

Article

### Claude Code on CCAR-F: configuration and workflows in twelve items, six task statements, three decisions

About twelve of 60 items turn on three decisions. Claude Code on CCAR-F: the paths and flags the exam guide prints, and a worked item to try.

Read the post →

Article

### Prompt engineering on the Claude exams: repair, not craft

Prompt engineering is named on all four Claude certification exams and is the biggest subject on none. What each track examines, and the one loop they all test.

Read the post →

Guide

### A Claude certification study guide you can follow in 30 days

A Claude certification study guide and 30-day plan: four passes a day, time sized to blueprint weights, and practice evidence used to plan the next review.

Read the post →

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.
