Prompt Engineering
20%Prompt Engineering is 20% of the CCA-F blueprint. It tests production prompt decisions — XML structuring, few-shot examples, extended thinking, system-prompt architecture, and tool_use schemas with nullable fields that stop Claude hallucinating values.
Prompt Engineering is 20% of the CCA-F blueprint — roughly 12 of the 60 official-simulation questions come from this domain. It is the second-largest scoring area after Agentic Architecture, and the one where candidates most often confuse 'good general prompt advice' with the specific, production-grade patterns the exam rewards.
The questions in this domain are not about cleverness, persona tricks, or 'jailbreak' tactics. They are about predictable decisions a working Claude architect makes every day: do I include three actual examples or a one-paragraph description of the style? Do I put the schema in the system prompt or in tool_use? Should this field be required, or nullable? Do I tell Claude to 'think carefully', or do I use extended thinking? Should the rule live in the system prompt where it persists, or in the user turn where it can be ignored?
The exam consistently rewards answers that match documented Claude behaviour: XML tags for unambiguous parsing, few-shot examples for format and style, tool_use with a strict JSON schema for structured output, nullable fields to prevent fabrication on missing data, and extended thinking when a task genuinely needs deeper reasoning. It consistently punishes answers that sound smart but rely on vague instructions, summarised style, or out-of-scope techniques like fine-tuning.
What the exam tests in this domain
- ·Few-shot examples vs. summarised style — when concrete examples are required
- ·Extended thinking and chain-of-thought — when to enable, when not to
- ·XML tags for unambiguous prompt structure and reliable parsing
- ·Structured output via tool_use with a strict JSON schema
- ·Nullable schema fields to prevent hallucination on optional data
- ·System prompt vs. user prompt placement for rules, persona, and per-task input
Key concepts
Few-shot examples vs. summarised style
When you need Claude to match a specific output format, tone, or level of detail, include actual examples in the system prompt. Three concrete examples of the exact thing you want — a code review, a triage note, a customer reply — shape Claude's output far more reliably than any description. Summarising the style ('write reviews in a constructive, senior-engineer tone') loses the concrete patterns the examples carry: line-by-line cadence, where to suggest vs. mandate, how long sections run. The exam routinely contrasts 'include the actual examples' against 'describe the style', 'put them in CLAUDE.md and let Claude read them on demand', or 'fine-tune the model'. The first is correct. Fine-tuning is explicitly out of scope for Foundations.
Extended thinking and chain-of-thought
Extended thinking is a first-class feature: Claude is given budgeted reasoning tokens before its final answer, and you opt into it with a parameter. It is the right tool when the task is hard, multi-step, or analytical — debugging, planning, math, complex synthesis. It is not the right tool for short factual recall or pure formatting tasks, where it adds latency and cost for no quality gain. A common exam distractor is 'instruct Claude to think carefully step by step' as a substitute for enabling extended thinking. That is vague chain-of-thought prompting; it can help, but it is not the structured feature the exam is asking about. Know the distinction.
XML tags for structured prompts
Claude is trained to recognise XML-style tags as structural delimiters. Wrapping inputs in tags like <document>, <examples>, <instructions>, and <format> makes parsing unambiguous: Claude knows where the source material ends and where the instructions begin. This matters most when prompts mix several roles of content — a long document plus the question about it, or instructions plus few-shot examples plus the live input. The exam rewards answers that use explicit tag structure over answers that rely on prose separators ('here is the document, now answer this question'). Tags are not magic syntax; they are a contract that reduces ambiguity, which is exactly what production prompts need.
Structured output via tool_use with a strict schema
When you need machine-readable output, the production pattern is tool_use with a JSON schema, not 'ask Claude to reply in JSON'. Defining a tool with a strict input_schema forces Claude's response into a validated shape: typed fields, enums, required keys. Free-form 'reply in JSON' prompts are fragile — they break on stray prose, code fences, or edge cases. The exam treats tool_use as the canonical structured-output mechanism. Expect questions that frame extraction, classification, or form-filling tasks and offer tool_use with a schema as one option against prose instructions or regex post-processing.
Nullable fields and system vs. user prompt placement
Two production patterns the exam loves. First: in a tool_use schema, mark optional fields as nullable (type: ['string', 'null']) and reserve required only for fields that must always be present. If you mark a field required when the source might not contain it, Claude will fabricate a plausible value rather than violate the schema — that is hallucination by design. Nullable fields give Claude a legitimate way to say 'not present'. Second: rules that must hold across every turn (persona, policy, format, refusal behaviour) belong in the system prompt. Per-task content — the document, the question, the user's request — belongs in the user turn. Mixing them is a frequent exam trap.
Common traps and distractor patterns
Trap 1 — 'Tell Claude to think carefully' instead of extended thinking
Distractors that say 'add the phrase think step by step' or 'instruct the model to reason carefully' are vague chain-of-thought prompting dressed up as a feature. When the question is about a hard reasoning task and one option enables extended thinking with a token budget while another just asks Claude to think harder, the structured feature is the right answer.
Trap 2 — 'Make all fields required' in a tool_use schema
This sounds like strictness but causes hallucination. If a document does not contain a phone number and the phone field is required, Claude must produce something — and it will. The correct pattern is nullable fields for optional data with required reserved for fields that genuinely must appear.
Trap 3 — 'Summarise the style' instead of including the examples
When you have actual gold-standard examples — code reviews, triage notes, support replies — the exam wants you to include them as few-shot examples. Summarising the style in prose loses the concrete patterns Claude needs to match. 'Describe the tone in the prompt' is almost always the wrong answer when 'include three real examples' is on offer.
Trap 4 — 'Fine-tune Claude' for style or format
Fine-tuning is explicitly out of scope for CCA-F. If a question is solvable by few-shot examples, system-prompt rules, or tool_use schemas, those are the right answers — not fine-tuning. Any option that proposes fine-tuning to enforce a style, format, or behaviour at Foundations level should be treated as a distractor.
Sample questions with explanations
Question 1
When using tool_use to extract structured data from documents, which JSON schema design best prevents Claude from hallucinating values for fields that may not be present in the source?
- A.Use nullable fields (type: ['string', 'null']) for optional data and set required only for fields that must always be present✓ Correct
- B.Use anyOf schemas with multiple type options for every field
- C.Add a 'confidence' field next to each extracted value
- D.Make all fields required with strict types
Why A is correct: Nullable fields (type: ['string', 'null']) allow Claude to return null when a value is not present in the document, rather than fabricating a plausible-sounding value. This is the primary technique for preventing hallucination in structured extraction. Making all fields required forces Claude to fill them even when data is absent. The anyOf and confidence approaches add complexity without addressing the core issue of optional data.Question 2
You need Claude to review code in the same style as your senior engineers. You have 3 examples of excellent code reviews from your team. How should these be incorporated?
- A.Include them in the system prompt as few-shot examples showing the exact format and tone expected✓ Correct
- B.Summarize the review style in the prompt without including the actual examples
- C.Reference them in a CLAUDE.md file and let Claude read them when needed
- D.Fine-tune Claude on these examples for consistent behavior
Why A is correct: Few-shot examples in the system prompt directly shape Claude's output format and style for the current task. Including 3 concrete examples of excellent reviews trains Claude on the exact level of detail, tone, and structure expected. Referencing examples in CLAUDE.md without including them in the prompt context is less reliable. Summarizing style loses the concrete patterns. Fine-tuning is out of scope for the CCA-F certification (explicitly listed as out-of-scope in the exam guide).Question 3
What is prompt engineering?
- A.The hardware optimization process for running AI models faster
- B.The practice of designing, refining, and optimizing the inputs (prompts) given to language models to achieve desired outputs✓ Correct
- C.Writing code to build AI models
- D.A programming language for AI development
Why B is correct: Prompt engineering is the practice of designing, refining, and optimizing the inputs (prompts) given to language models to achieve desired outputs. It involves crafting clear instructions, providing appropriate context, and structuring prompts to guide the model toward producing accurate, relevant, and useful responses.
How to study this domain
For each Prompt Engineering question, force yourself to name the mechanism each option relies on before you pick. 'Include three examples' relies on few-shot conditioning. 'Use tool_use with a schema' relies on validated structured output. 'Mark the field nullable' relies on giving Claude a legitimate 'not present' value. 'Enable extended thinking' relies on budgeted reasoning tokens. If you can name the mechanism, the correct answer usually becomes obvious; if you can't, you are guessing.
Memorise four contrasts: few-shot examples vs. summarised style; extended thinking vs. 'think carefully'; tool_use with schema vs. prose 'reply in JSON'; nullable fields vs. all-required. These four contrasts cover the majority of distractor pairs in this domain. Also internalise that fine-tuning is out of scope — any option that proposes it at Foundations level is wrong by definition. Drill 25–30 practice questions in this domain and articulate, for every wrong option, the specific failure mode it would cause in production.
Frequently asked questions
- How many questions on the CCA-F exam are from Prompt Engineering?
- Prompt Engineering is 20% of the blueprint. On the 60-question Official Simulation that maps to roughly 12 questions — the second-largest domain after Agentic Architecture.
- When should I use few-shot examples vs. just describing the style?
- Whenever you have concrete examples of the output you want, include them as few-shot examples in the system prompt. Description loses the specific patterns — cadence, length, where to soften vs. mandate — that examples carry. The exam treats 'summarise the style' as a distractor when 'include the actual examples' is available.
- Is fine-tuning ever the right answer on the CCA-F exam?
- No. Fine-tuning is explicitly out of scope for Foundations. If a question can be solved with few-shot examples, system-prompt rules, tool_use schemas, or extended thinking, those are the intended answers. Treat any option proposing fine-tuning as a distractor at this level.
- How do I stop Claude hallucinating values during structured extraction?
- Use tool_use with a strict JSON schema and mark optional fields as nullable (type: ['string', 'null']). Reserve required for fields that must always be present. Forcing all fields to be required is the single biggest cause of fabricated values — Claude has to satisfy the schema, so it makes something up.
- When should I enable extended thinking instead of just asking Claude to reason step by step?
- Enable extended thinking for genuinely hard, multi-step, or analytical tasks — debugging, planning, complex synthesis. Asking the model to 'think carefully' is vague prompting; extended thinking is the structured feature with a real reasoning-token budget. The exam consistently prefers the structured feature when the task warrants deeper reasoning.
- Where should rules live — system prompt or user prompt?
- Rules that must hold across every turn (persona, policy, output format, refusal behaviour) belong in the system prompt. Per-task content — the document, the question, the live input — belongs in the user turn. Mixing them, especially putting durable rules in the user turn, is a frequent exam trap.
Practice Prompt Engineering questions
$24.99 lifetime access. 1,000+ scenario-based questions across all 5 domains, adaptive difficulty, written explanations, 7-day refund.
Get Lifetime Access — $24.99Or try 15 free questions first, or see 10 free sample questions.