CCAR-F practice questions: Prompt engineering.

40 original questions on Prompt engineering, which carries 20% of the Claude Certified Architect – Foundations exam per the published guide. Study notes first, then the questions with an explanation for each. When this domain feels solid, take the timed CCAR-F practice exam and check the domain breakdown.

What to know about Prompt engineering

  • System prompts for role and standing instructions; the user turn for the task. Clear, specific instructions work better than clever ones.
  • Examples: a small number of high-quality examples steer format and tone more reliably than description alone.
  • Structure with XML tags to separate instructions, documents, and examples, and to make long prompts unambiguous.
  • Reasoning: chain-of-thought instructions and extended thinking, and when each is worth the tokens.
  • Controlling output: response prefilling, requested formats, JSON via tool definitions or structured outputs.
  • Long-context habits: put documents at the top, ask for quotes before analysis, and keep the question at the end.

Prompt engineering questions

Prompt engineering

You need a response in a strict JSON shape that downstream code will parse. Which approach is most reliable?

Show answer

Answer: Define the shape as a tool input schema, or use structured outputs, so the model must conform. Schema-enforced output is more reliable than instructions alone: tool use with an input schema, or structured outputs, constrains the shape. Prefilling the brace suppresses preamble but does not guarantee the keys, types, or nesting downstream code expects.

Prompt engineering

A prompt includes a 40-page contract and one question about it. Where should the question go?

Show answer

Answer: At the end of the user message, after the contract, with the contract clearly delimited by tags. For long context, put documents first and the question last, and delimit the document so instructions and content do not blur. Putting the question first is the common intuition but performs worse on long inputs; moving it to the system prompt separates it from the material it refers to.

Prompt engineering

Output format keeps drifting despite detailed instructions. What usually fixes it fastest?

Show answer

Answer: Add two or three high-quality examples of the exact format, wrapped in clearly labeled tags. A small number of good examples steers format more reliably than longer descriptions. Repeating the instruction adds emphasis, not clarity; cutting max_tokens truncates output rather than shaping it.

Prompt engineering

When is extended thinking the wrong tool?

Show answer

Answer: A high-volume yes/no classifier where per-request cost and latency dominate. Extended thinking costs tokens and time. It pays off on hard reasoning such as planning, debugging, and trade-off analysis, not on simple, high-volume decisions where a fast direct answer is just as accurate.

Prompt engineering

A system prompt says 'be helpful' and the outputs vary wildly in format. The highest-leverage change is:

Show answer

Answer: Stating the exact output format with a short example. Concrete format specification with an example beats abstract adjectives. Lower temperature narrows sampling but cannot supply a format that was never stated; a persona shapes tone, not structure.

Prompt engineering

You need the model to reason through a multi-step pricing rule before answering. Which technique?

Show answer

Answer: Ask it to work through the steps before answering, or enable extended thinking for the hard cases. Letting the model reason before answering improves multi-step accuracy. Asking for the number only removes the working that makes the answer right; unrelated examples teach nothing about this rule.

Prompt engineering

Which is the best use of XML-style tags in a prompt?

Show answer

Answer: Separating instructions, reference documents, and examples so the model does not confuse them. Clear structure prevents content from being read as instructions and makes long prompts unambiguous. Tags are not read by the API for caching; cache_control does that. The model does not skip tagged sections.

Prompt engineering

You want responses to begin with a JSON object and nothing else. Which technique reduces preamble?

Show answer

Answer: Prefilling the assistant turn with the opening brace. Prefilling steers the start of the response and suppresses chatty preambles. A stop sequence controls where the response ends, not where it starts; a 'JSON only' line helps but is still an instruction the model can ignore.

Prompt engineering

The model keeps inventing a citation when a source is missing. Which instruction helps most?

Show answer

Answer: 'If no source in the provided material supports the claim, say so instead of citing'. Give the model an explicit permitted action for the missing-information case. 'Cite at least one source' is the instruction that produces invented citations; filling gaps from memory replaces one fabrication with another.

Prompt engineering

Which examples make few-shot prompting work best?

Show answer

Answer: A few examples that closely match the target task and format, including a tricky edge case. Relevance and quality matter more than quantity; an edge case teaches the boundary. Error-and-correction examples can work for critique tasks, but for a formatting task they put wrong outputs in front of the model.

Prompt engineering

A prompt for summarizing meeting notes should also flag decisions and owners. Where do those requirements go?

Show answer

Answer: Stated explicitly as required output sections, with an example. Required elements are stated, structured, and shown, not assumed. A second call is decomposition, which can be fine, but the requirement still has to be stated somewhere; a vague 'action items' line is not a required section.

Prompt engineering

What is the role of the system prompt compared with the user turn?

Show answer

Answer: The system prompt sets standing role, rules, and format; the user turn carries the specific task and material. Separating standing instructions from per-request content keeps prompts stable and cacheable. The reverse split puts volatile material in the cacheable position; the model name is set on the request, not in the prompt.

Prompt engineering

A prompt includes ten rules and the model follows nine. Which change is most effective?

Show answer

Answer: Move the missed rule near the task, restate it as a concrete check, and add an example of compliance. Position, concreteness, and examples drive rule adherence. Capitals add emphasis without clarity; deleting working rules trades nine known behaviors for one.

Prompt engineering

When should you ask the model to quote the relevant passage before answering a question about a long document?

Show answer

Answer: When accuracy on the document matters, since grounding in quotes reduces invented details. Quote-then-answer anchors the response in the source, which matters most on long documents. Short documents need it least; streaming is a delivery detail, not a reason.

Prompt engineering

A prompt asks for 'a short answer' and gets three paragraphs. What fixes it reliably?

Show answer

Answer: Specify the length in sentences or words and show an example of the right length. Precise constraints and an example beat vague adjectives. A small max_tokens truncates mid-sentence rather than producing a short answer; temperature does not control length.

Prompt engineering

Which is a sign that a task needs extended thinking rather than a normal response?

Show answer

Answer: The task requires weighing several constraints and checking intermediate steps. Extended thinking pays off on multi-constraint reasoning, not on lookups. A long prompt is a context question, not a reasoning one; a strict schema is solved by structured output.

Prompt engineering

What is a good way to make a prompt testable?

Show answer

Answer: Define expected outputs for a set of inputs and check the prompt against them after every change. A prompt with a test set can be improved safely; one without cannot. Live traffic tests find problems after users see them; freezing the prompt avoids regressions by refusing improvements.

Prompt engineering

Which change most often improves a prompt that is 'almost right'?

Show answer

Answer: Replacing an ambiguous instruction with a specific, checkable one. Ambiguity is the usual culprit; specificity is the usual fix. A double-check line can help on reasoning tasks but does not tell the model what it misunderstood; a persona shapes voice, not correctness.

Prompt engineering

Which instruction most improves factual grounding when documents are provided?

Show answer

Answer: 'Answer only from the provided documents and cite the passage; if it is not there, say so'. Explicit grounding plus a permitted 'not found' path is what stops the model filling gaps. A persona of an accurate analyst sets tone but gives the model no rule for missing facts.

Prompt engineering

A prompt must produce output in a strict template across thousands of runs. Which combination is strongest?

Show answer

Answer: A precise template, one or two examples, and schema enforcement where possible. Specification, examples, and enforcement. Examples alone leave the model to infer the template, and varied examples pull output in different directions.

Prompt engineering

What is the drawback of stuffing every possible rule into one system prompt?

Show answer

Answer: Rules compete and get missed; prioritize, structure, and test which ones matter. More rules is not more adherence; rules compete for attention. A long stable system prompt caches well, so caching is not the drawback.

Prompt engineering

When should you show the model a negative example (what not to do)?

Show answer

Answer: When a specific failure keeps recurring and a positive example alone has not fixed it. Targeted negatives address stubborn failure modes. Pairing a negative with every positive adds noise and can draw attention to the wrong behavior.

Prompt engineering

Which is the best way to get the model to ask a clarifying question instead of guessing?

Show answer

Answer: Instruct it to ask when a required detail is missing, and define what counts as required. Define the condition for asking. A cautious persona shifts tone but does not tell the model which details are required.

Prompt engineering

A summarization prompt is losing important numbers. What helps?

Show answer

Answer: Instruct it to preserve all figures, dates, and names verbatim, with an example. Name what must survive and show it. Extra output room does not tell the model that figures matter, and a shorter summary drops more of them.

Prompt engineering

What does 'role prompting' do well and what does it not fix?

Show answer

Answer: It sets tone and perspective; it does not fix missing instructions, data, or ambiguous tasks. Personas shape voice, not correctness. A role does not supply missing data or resolve an ambiguous task definition.

Prompt engineering

Which prompt is more testable?

Show answer

Answer: 'Write a summary of at most 120 words with one sentence per section, listing every decision and owner'. Concrete constraints can be checked: word count, sentence count, decisions and owners. 'Useful' and 'high-quality' cannot be scored without a rubric.

Prompt engineering

You want the model to output only 'APPROVE' or 'REJECT'. What is the most reliable approach?

Show answer

Answer: Constrain the output through an enum in a tool schema, or prefill and instruct with examples. Enforce the label set with a schema or prefill. A label on the last line still needs parsing and can be preceded by unwanted text.

Prompt engineering

How should a prompt handle ambiguous user requests in a customer-facing product?

Show answer

Answer: Instruct the model to state its interpretation or ask one clarifying question, per product policy. Explicit ambiguity handling, matched to product policy. Answering every interpretation is long and confusing, and confident guesses hide the ambiguity from the user.

Prompt engineering

Which change is likely to reduce hallucinated tool parameters?

Show answer

Answer: Examples of correct calls in the tool description and a schema with enums and required fields. Show correct calls and constrain the schema. A careful persona does not tell the model which values are valid.

Prompt engineering

What is a reasonable way to iterate on a prompt with a team?

Show answer

Answer: Versioned prompts, a shared eval set, and review of score changes before deploy. Treat prompts like code: versioned, evaluated on a shared set, and reviewed. Merging by feel has no shared measure of better.

Prompt engineering

Which is the most reliable way to keep a chatbot on topic?

Show answer

Answer: State the allowed scope and the exact behavior for out-of-scope requests, with an example refusal. Define scope and the off-scope behavior. 'Stay focused' gives the model no definition of the boundary.

Prompt engineering

A prompt uses the word 'summarize' but the stakeholder wants an executive brief with decisions and risks. What is the fix?

Show answer

Answer: Replace the vague verb with the required sections and length, plus an example brief. Name the sections and show an example. A persona hints at the reader but does not say what a brief must contain.

Prompt engineering

What is the purpose of asking the model to plan before it writes a long document?

Show answer

Answer: A structure to check and steer before tokens are spent on prose. Plan first, then write against the plan. The gain is steerability, not speed.

Prompt engineering

Which instruction helps most when the model must handle inputs in several languages?

Show answer

Answer: State the expected input languages and the required output language explicitly. Explicit language handling removes the guess about which language to answer in. Matching the user's language is one policy, but it needs to be stated, not assumed.

Prompt engineering

You need consistent scoring of essays on a 1 to 5 rubric. What makes the prompt reliable?

Show answer

Answer: The rubric spelled out per score level with an example essay at two or three levels. Anchored rubrics with examples. Temperature zero makes the scores repeatable but not calibrated.

Prompt engineering

The model returns Markdown when you need plain text for an SMS. Simplest fix?

Show answer

Answer: Instruct plain text with no formatting, show an example, and validate before sending. Specify, exemplify, validate. Stripping in code is a fallback, not a fix, and leaves artifacts in the message.

Prompt engineering

Why keep examples in a prompt consistent in format with the required output?

Show answer

Answer: The model imitates the examples; inconsistent examples produce inconsistent output. Examples are templates the model imitates. The API does not validate examples, and caching does not depend on their format.

Prompt engineering

What should you do when a system prompt and a user message conflict?

Show answer

Answer: Design the system prompt to state precedence for the cases you care about, and test them. Make precedence explicit and tested. System prompts carry weight but are not a guarantee, so the cases that matter need stating.

Prompt engineering

Which is a sign a prompt is over-specified?

Show answer

Answer: Long rule lists the model ignores while output quality drops on normal inputs. Too many rules dilute the important ones. Higher cost with consistent output is a budget question, not a sign of over-specification.

Prompt engineering

How do you test a prompt change without a full eval suite yet?

Show answer

Answer: A small fixed set of representative inputs, including edge cases, compared before and after. Small, fixed, representative. Changing several things at once means you cannot tell which change helped.

Next

Other CCAR-F domains

FAQ

How much of the CCAR-F exam is prompt engineering?

20% of the marks, per the published CCAR-F exam guide. The full domain list with weights is on the CCAR-F exam page.

Are these real CCAR-F exam questions?

No. They are 40 original scenario questions written from the blueprint for this domain. Reproducing exam content would violate the candidate agreement.

How should I study prompt engineering for CCAR-F?

Read the domain notes on this page, answer the questions with explanations hidden, then take the timed CCAR-F practice exam and check the per-domain breakdown for this domain.

Who wrote this

Matei Olaru

Matei Olaru

CEO, Your AI Department

Former public-company CEO, corporate attorney, and World Bank consultant. Runs the YAID Network and the partner relationship with Anthropic.

Michael Greenberg

Michael Greenberg

AI Product Lead, Your AI Department

AI at Google, Meta, and Samsung. Six patents. Leads member support and the certification prep guidance.

Claude Partner NetworkYour AI Department is a registered Claude Partner Network company. Our members sit these exams under our partner standing. Facts on this page were last checked on October 15, 2026.