CCARF Domain D4
Prompt Engineering & Structured Output Practice Questions
About 20% of the exam. Few-shot prompting, tool_use + JSON schemas, tool_choice, validation/retry loops, Message Batches API tradeoffs, and multi-pass review architectures.
53 practice questions · Official blueprint weight 20% · Claude Certified Architect Foundations (CCAR-F)
Paper 1 · Q14A validation-retry loop still fails on the same documents after three attempts each. In which situations will further retries not help? (Select 2)
Paper 1 · Q17Your data extraction pipeline uses tool_use with tool_choice set to 'auto'. You need guaranteed structured output for every request, but some documents occasion…
Paper 1 · Q18Your extraction pipeline validates that line item amounts sum to the stated total. For Document A, the sum is £450 but the stated total is £500. For Document B,…
Paper 1 · Q25The pipeline validates each tool_use extraction against a Pydantic model with model_validate(). Validation succeeds and every field has the correct type, yet ex…
Paper 1 · Q26An extraction pipeline uses `tool_use` with a 15-required-field schema. For some document types, only 8 of those fields ever appear in the source material. The …
Paper 1 · Q28An extraction pipeline processes 50-page legal contracts in a single API call. It captures parties and dates from the first few pages but misses key financial t…
Paper 1 · Q30Your extraction pipeline correctly identifies data in structured tables but returns empty fields when the same information appears in narrative paragraphs. Deta…
Paper 1 · Q34Your extraction pipeline retries failed documents, but the retry simply resends the original document with the same prompt. Success rates on retries are only ma…
Paper 1 · Q44Your extraction pipeline uses tool_use with a JSON schema, so outputs always parse. Finance still reports invoices where line items do not sum to the stated tot…
Paper 1 · Q48An invoice-extraction pipeline mislabels fields on documents where the correct interpretation is ambiguous. Which few-shot practices should you apply?
Paper 1 · Q51Your document processing pipeline chains three steps: (1) extract raw text, (2) classify document type, (3) extract structured fields based on type. Step 2 occa…
Paper 1 · Q60Your extraction pipeline has a validation step that checks extracted financial data. When validation fails, the system retries by sending just the original docu…
Paper 2 · Q4Your CI/CD code review pipeline has a 40% false positive rate on 'documentation mismatch' findings, causing developers to ignore ALL review categories. What is …
Paper 3 · Q45[Scenario 5: Claude Code for Continuous Integration] You are integrating Claude Code into a CI/CD pipeline for automated code review, test generation, and pull-…
Paper 3 · Q46[Scenario 5: Claude Code for Continuous Integration] You are integrating Claude Code into a CI/CD pipeline for automated code review, test generation, and pull-…
Paper 3 · Q47[Scenario 5: Claude Code for Continuous Integration] You are integrating Claude Code into a CI/CD pipeline for automated code review, test generation, and pull-…
Paper 3 · Q48[Scenario 5: Claude Code for Continuous Integration] You are integrating Claude Code into a CI/CD pipeline for automated code review, test generation, and pull-…
Paper 3 · Q49[Scenario 5: Claude Code for Continuous Integration] You are integrating Claude Code into a CI/CD pipeline for automated code review, test generation, and pull-…
Paper 3 · Q50[Scenario 5: Claude Code for Continuous Integration] You are integrating Claude Code into a CI/CD pipeline for automated code review, test generation, and pull-…
Paper 3 · Q51[Scenario 6: Structured Data Extraction] You are building a structured data extraction system: pulling information from unstructured documents, validating outpu…
Paper 3 · Q52[Scenario 6: Structured Data Extraction] You are building a structured data extraction system: pulling information from unstructured documents, validating outpu…
Paper 3 · Q53[Scenario 6: Structured Data Extraction] You are building a structured data extraction system: pulling information from unstructured documents, validating outpu…
Paper 3 · Q54[Scenario 6: Structured Data Extraction] You are building a structured data extraction system: pulling information from unstructured documents, validating outpu…
Paper 3 · Q55[Scenario 6: Structured Data Extraction] You are building a structured data extraction system: pulling information from unstructured documents, validating outpu…
Paper 3 · Q56[Scenario 6: Structured Data Extraction] You are building a structured data extraction system: pulling information from unstructured documents, validating outpu…
Paper 4 · Q3The moderation system classifies hate speech accurately for explicit slurs but misses coded language and dog-whistle terms that human moderators easily recognis…
Paper 4 · Q7A moderation team introduces a severity scale ('low', 'medium', 'high', 'critical'). The same post (a user threatening to 'destroy' a competitor's product in a …
Paper 4 · Q12The moderation system uses tool_use with a JSON schema for classification output. All fields including 'sub_category' and 'target_demographic' are marked as req…
Paper 4 · Q16Your CI/CD pipeline processes code reviews using the Message Batches API. After a batch completes, you need to match each review result back to the correspondin…
Paper 4 · Q17The moderation system validates that every classification includes a 'reasoning' field explaining the decision. When validation fails (empty reasoning), the sys…
Paper 4 · Q22The moderation system's classification schema has a 'category' field defined as a free-text string. Auditors find 47 different category values in production dat…
Paper 4 · Q24A moderation classification tool includes a `detected_patterns` array where the model lists specific patterns it identified (e.g. 'repeated slur targeting ethni…
Paper 4 · Q27Your CI/CD pipeline uses a system prompt with a tool named 'check_security' and also includes instructions that say 'check the security of each function'. Devel…
Paper 4 · Q31The moderation system's prompt instructs Claude to 'be conservative when moderating and err on the side of caution.' Reviewers find that innocuous posts about c…
Paper 4 · Q32The moderation team asks a single Claude session to classify a post, then immediately asks the same session to independently review its own classification for q…
Paper 5 · Q14[Scenario: Claude Code for Continuous Integration] Your code review component is iterative: Claude analyzes the changed file, then may request related files (im…
Paper 5 · Q16[Scenario: Claude Code for Continuous Integration] Your automated reviews find real issues, but developers report the feedback is not actionable. Findings inclu…
Paper 5 · Q18[Scenario: Claude Code for Continuous Integration] Your automated review analyzes comments and docstrings. The current prompt instructs Claude to “check that co…
Paper 5 · Q19[Scenario: Claude Code for Continuous Integration] Your automated review generates test-case suggestions for each PR. Reviewing a PR that adds course completion…
Paper 5 · Q20[Scenario: Claude Code for Continuous Integration] After an initial automated review identifies 12 findings, a developer pushes new commits to address issues. R…
Paper 5 · Q22[Scenario: Claude Code for Continuous Integration] A pull request changes 14 files in an inventory tracking module. A single-pass review that analyzes all files…
Paper 5 · Q23[Scenario: Claude Code for Continuous Integration] Your automated code review averages 15 findings per pull request, and developers report a 40% false-positive …
Paper 5 · Q25[Scenario: Code Generation with Claude Code] You asked Claude Code to implement a function that transforms API responses into an internal normalized format. Aft…
Paper 5 · Q34[Scenario: Customer Support Agent] Your agent handles single-issue requests with 94% accuracy (e.g., “I need a refund for order #1234”). But when customers incl…
Paper 5 · Q36[Scenario: Customer Support Agent] Production metrics show that when resolving complex billing disputes or multi-order returns, customer satisfaction scores are…
Paper 5 · Q39[Scenario: Customer Support Agent] Production logs show the agent sometimes chooses `get_customer` when `lookup_order` would be more appropriate, especially for…
Paper 5 · Q42[Scenario: Conversational AI Architecture Patterns] Over several turns discussing investment strategy, a user stated "I have a very low risk tolerance" and late…
Paper 5 · Q48[Scenario: Conversational AI Architecture Patterns] During QA testing, Claude follows system prompt guidelines for the first 10–15 turns, but later responses de…
Paper 5 · Q49[Scenario: Conversational AI Architecture Patterns] Your AI tutor has a 2,800-token system prompt defining teaching methodology and adaptation rules. After 12 t…
Paper 5 · Q50[Scenario: Conversational AI Architecture Patterns] Your assistant must maintain an enthusiastic tone, explain its reasoning, and ask clarifying questions. Wher…
Paper 5 · Q51[Scenario: Conversational AI Architecture Patterns] Users report repetitive response openings like "Certainly!" and "I'd be happy to help!" What is the most eff…
Paper 5 · Q53[Scenario: Conversational AI Architecture Patterns] Users frequently send requests like "Book a venue for the party." The assistant asks 4+ clarifying questions…
Paper 5 · Q54[Scenario: Conversational AI Architecture Patterns] Your assistant uses a contractor-persona system prompt. Early turns follow the rules, but by turn 7 the assi…
Other domains
D1 Agentic Architecture & Orchestration · D2 Tool Design & MCP Integration · D3 Claude Code Configuration & Workflows · D5 Context Management & Reliability