Claude Certification Program · v1.0 · Effective July 2026 · All four tracks open

Home › Study guides › CCAR-F › Domain 4

CCAR-F · Domain 4 of 5 · 6 lessons · about 122 min

Domain 4: Prompt Engineering & Structured Output

Explicit criteria over vague instructions, few-shot examples, guaranteed JSON via tool use, retry loops, the Batches API and independent review. 20% of CCAR-F.

20%Of the exam
~12Questions on exam day
6Free lessons
72Practice questions here

A prompt is everything you send Claude before it answers: the system instructions, any examples, and the request itself. Structured output is the answer coming back in a fixed shape, usually JSON that another program will read, instead of free prose. This domain covers how to write the first so that the second is reliable.

Three ideas carry most of the marks. First, specific beats vague: "flag a comment only when the behaviour it claims contradicts the code" works where "be careful" does not. Second, examples beat instructions when the instruction keeps being interpreted differently: two to four worked examples of the hard cases fix what a paragraph of rules cannot. Third, tool use with a JSON schema is the way to guarantee well-formed structured output, and the tool_choice setting decides whether Claude may answer in prose, must call some tool, or must call one named tool.

The rest is about what happens after the first answer: retrying with the validation error attached, knowing when a retry cannot help because the information is not in the document, sending large non-urgent jobs through the Message Batches API at half price, and using a second, independent Claude instance to review what the first one produced.

This domain is 20% of the exam, about 12 questions, drawn from the structured data extraction scenario (invoices, contracts, research papers into JSON) and the CI/CD scenario (code review findings with low false-positive rates). The recurring test: which lever actually addresses the failure described? More instructions, more examples, a schema, a retry, or a second reviewer.

What the exam guide tests

The official CCAR-F guide lists 6 task statements for this domain. Exam questions are written against them, and so are the lessons: each row says where it is covered.

#Task statementLesson
4.1Design prompts with explicit criteria to improve precision and reduce false positives4.1
4.2Apply few-shot prompting to improve output consistency and quality4.2
4.3Enforce structured output using tool use and JSON schemas4.3
4.4Implement validation, retry, and feedback loops for extraction quality4.4
4.5Design efficient batch processing strategies4.5
4.6Design multi-instance and multi-pass review architectures4.6

Lessons

  1. 4.1 Explicit criteria: precision and false positivesWhy "be conservative" does not cut false positives in an automated code review, how one noisy category costs trust, and how explicit criteria fix it.20 min
  2. 4.2 Few-shot prompting for consistent, well-judged outputTwo to four targeted examples fix what detailed instructions cannot: consistent review findings, fewer false positives, extraction without blanks or guesses.20 min
  3. 4.3 Structured output with tool use and JSON schemasWhy an extraction tool with a JSON schema beats asking for JSON, what tool_choice any and forced guarantee, and schema design that stops invented values.20 min
  4. 4.4 Validation, retry and feedback loops for extraction qualityRetry an extraction with the validation error attached, know when a retry cannot help, and add calculated_total, conflict_detected and detected_pattern.21 min
  5. 4.5 Batch processing with the Message Batches APIWhen the Batches API's 50% saving is worth a wait of up to 24 hours, how custom_id matches results, and how to plan an SLA and resubmit only what failed.20 min
  6. 4.6 Multi-instance and multi-pass reviewWhy the session that wrote code is a weak reviewer of it, how per-file and integration passes fix large reviews, and how confidence routes findings.21 min

Practice question

From the CCAR-F bank, tagged to this domain. Every answer option is explained. Nothing is stored, nothing to sign up for.

72 CCAR-F questions on this domain, free

The domain quiz in the question bank draws 10 random questions from the 72 tagged to Prompt Engineering & Structured Output, scores them and explains every option. Repeat it until the weak spots are gone, then sit the 60-question timed simulator.

Open the CCAR-F question bank → Start lesson 4.1 →

The question bank is free. It asks for an account only because the quiz engine has to store answers to score them and show which domains are weak. The questions on this page need nothing.