Claude Certified Architect - FoundationsCCAR-F Learning Guide
Domain 4 · 20% of the exam

Prompt Engineering & Structured Output

Getting reliable, machine-readable results: JSON schemas via tool_use, required versus optional fields, validation and repair loops, and controlling cost with batching.

  1. 4.1Explicit Criteria and False PositivesPrecision comes from saying exactly what to report and what to skip, with severity defined by concrete examples, not from asking Claude to be conservative. Noisy categories can be switched off while they are fixed.
  2. 4.2Few-Shot Prompting for ConsistencyWhen instructions alone give inconsistent results, two to four well-chosen examples fix the format and teach judgement on ambiguous cases. Choose examples that show reasoning, cover the hard cases, and match the work being done.
  3. 4.3Structured Output with Tool Use and JSON SchemasDefine the output as a tool whose input schema is your JSON schema and read the tool_use block. Use tool_choice to require it, design optional and enum fields so the model never has to invent values, and remember schemas guarantee structure, not truth.
  4. 4.4Validation, Retry and Feedback LoopsValidate extractions for meaning, not just shape; retry with the document, the failed output and the exact errors; know that retries cannot recover information the document does not contain; and record patterns so dismissals can be analysed.
  5. 4.5Batch Processing StrategiesThe Message Batches API halves the cost of work that can wait up to 24 hours, with no latency guarantee. Use it for overnight and backlog jobs, never for blocking checks, correlate results by custom_id, and resubmit only what failed.
  6. 4.6Multi-Instance and Multi-Pass ReviewA model reviewing its own work in the same session tends to approve it, so review with an independent instance. Split large reviews into per-file passes plus an integration pass, and have findings carry confidence for routing.