What this domain covers
This is the largest-weighted material you will face in this area of the Claude Certified Architect exam. Expect scenario-based questions that test whether you can apply these concepts, not just recall them.
- System prompts, role prompting, and being clear and direct
- XML tags to structure prompts and long documents
- Multishot (few-shot) prompting
- Chain of thought and extended thinking
- Prefilling the assistant turn to control format
- Structured JSON output via tool use and schema validation
- The Message Batches API and empirical evals
Free practice questions: Prompt Engineering & Structured Output
8 original, exam-style questions from this domain. Reveal each answer for the full explanation.
How long does the Message Batches API take to process a submitted batch?
- AEvery batch is held until a fixed nightly processing window, so results always arrive the next day.
- BProcessing is guaranteed to finish within 1 hour for any batch under the 100,000-request limit.
- CMost batches complete in less than 1 hour, but processing can take up to 24 hours, after which the batch expires.
- DBatches process indefinitely until every request completes, with no upper time bound.
▸Show answer & explanation
Answer: C. Most batches complete in less than 1 hour, but processing can take up to 24 hours, after which the batch expires.
The system processes each batch as fast as possible: most batches finish in under 1 hour, and results become available when all requests complete or after 24 hours, whichever comes first. Batches that do not finish within 24 hours expire. There is no scheduled nightly window, no 1-hour guarantee, and no unbounded processing.
Read the docs →Which statement best describes the stop_sequences parameter on the Messages API?
- AIt lists custom text strings that cause generation to stop as soon as the model produces one of them
- BIt lists banned phrases the model must avoid while continuing to generate the rest of the response
- CIt defines delimiters the API uses to split the response into multiple content blocks
- DIt specifies strings the API appends to the response to mark where generation ended
▸Show answer & explanation
Answer: A. It lists custom text strings that cause generation to stop as soon as the model produces one of them
stop_sequences defines custom strings that end generation the moment the model produces one; the matched string is excluded from the returned text and reported in the response's stop_sequence field. The parameter does not filter phrases while generation continues, does not split content blocks, and nothing is appended to the output.
Read the docs →Which statement correctly describes the temperature parameter in the Messages API?
- AIt ranges from 0.0 to 2.0 and defaults to 0.7, with higher values producing more repetitive, deterministic text.
- BIt ranges from 0.0 to 1.0 and defaults to 1.0; values closer to 0.0 suit analytical or multiple choice tasks, while values closer to 1.0 suit creative and generative tasks.
- CIt ranges from 0.0 to 1.0 and defaults to 0.0, so outputs are fully deterministic unless it is explicitly raised.
- DIt is an integer from 1 to 100 that controls how many candidate tokens are considered at each decoding step.
▸Show answer & explanation
Answer: B. It ranges from 0.0 to 1.0 and defaults to 1.0; values closer to 0.0 suit analytical or multiple choice tasks, while values closer to 1.0 suit creative and generative tasks.
The Messages API documents temperature as defaulting to 1.0 with a 0.0 to 1.0 range, recommending lower values for analytical tasks and higher values for creative ones. The 0.0 to 2.0 range with a 0.7 default describes other providers' APIs, not Claude's, and higher temperature increases rather than reduces randomness. The default is not 0.0, and the integer candidate-count description matches top_k, not temperature.
Read the docs →Which of the following correctly states the size limits for a single Message Batch?
- AUp to 10,000 Messages requests or 32 MB in total size, whichever is reached first.
- BUp to 1,000,000 Messages requests with no byte-size limit, since requests are streamed to storage.
- CUp to 100,000 Messages requests, but only if every request uses the same model and max_tokens value.
- DUp to 100,000 Messages requests or 256 MB in total size, whichever is reached first.
▸Show answer & explanation
Answer: D. Up to 100,000 Messages requests or 256 MB in total size, whichever is reached first.
The documented limit is 100,000 Messages requests or 256 MB per batch, whichever comes first. There is no requirement that requests share a model or parameters: each request in a batch carries its own independent params object, and there is no unlimited-size tier.
Read the docs →What does "multishot prompting" refer to in Anthropic's prompt engineering documentation?
- ARunning the same prompt several times and majority-voting across the answers
- BSplitting one task across several sequential API calls that share conversation history
- CIncluding a few well-crafted example inputs and outputs directly in the prompt to steer Claude's format, tone, and structure
- DRequesting several candidate completions in one API call via an n parameter
▸Show answer & explanation
Answer: C. Including a few well-crafted example inputs and outputs directly in the prompt to steer Claude's format, tone, and structure
Multishot (few-shot) prompting means placing a few well-crafted examples in the prompt itself, which the docs call one of the most reliable ways to steer output format, tone, and structure. Re-running a prompt and comparing outputs is best-of-N verification, splitting work across calls is prompt chaining, and the Messages API has no parameter that returns multiple candidate completions.
Read the docs →Which of the following correctly pairs a Messages API stop_reason value with its meaning?
- Amax_tokens: the model declined to continue generating for safety policy reasons.
- Btool_use: the model finished executing a tool on the server and the agentic loop is complete.
- Cend_turn: the model reached a natural stopping point and finished its response on its own.
- Dstop_sequence: the request hit a rate limit and generation was halted by the server.
▸Show answer & explanation
Answer: C. end_turn: the model reached a natural stopping point and finished its response on its own.
end_turn means the model completed its turn naturally and the response can be used as-is. max_tokens signals the output hit the requested token cap (safety declines surface as the refusal stop reason), and tool_use means the model is requesting that your application execute a tool, not that execution already finished. stop_sequence indicates one of your custom stop_sequences was generated; rate limiting is reported as an HTTP 429 error, never as a stop_reason.
Read the docs →Which statement best captures a core rule of manual chain of thought prompting from Anthropic's documentation?
- AClaude performs the step-by-step reasoning internally even when the prompt requires it to reply with only a single word
- BClaude must actually output its reasoning in the response; without outputting its thought process, no thinking occurs
- CChain of thought prompting only takes effect when the extended thinking parameter is also enabled on the request
- DChain of thought instructions are ignored unless they are placed in the system prompt rather than the user message
▸Show answer & explanation
Answer: B. Claude must actually output its reasoning in the response; without outputting its thought process, no thinking occurs
Anthropic's chain of thought guidance stresses always having Claude output its thinking, because without the thought process appearing in the output, no thinking occurs. That rules out silent internal reasoning while emitting a one-word reply. Manual CoT is a prompting technique that works without the extended thinking API feature, and CoT instructions work in user messages as well as system prompts.
Read the docs →When deciding how to grade prompt evaluations, which comparison of grading methods matches Anthropic's guidance?
- AHuman grading is the fastest option because it requires no infrastructure, while code-based grading demands costly rule maintenance.
- BLLM-based grading should be reserved for exact string matching and avoided for complex judgments.
- CCode-based grading is the most nuanced method because rules can encode any judgment a human grader could make.
- DCode-based grading is fastest and most reliable but lacks nuance; human grading is flexible and high quality but slow and expensive; LLM-based grading is fast and scalable but should be tested for reliability before scaling.
▸Show answer & explanation
Answer: D. Code-based grading is fastest and most reliable but lacks nuance; human grading is flexible and high quality but slow and expensive; LLM-based grading is fast and scalable but should be tested for reliability before scaling.
The docs rank code-based grading (exact match, string match) as fastest, most reliable, and extremely scalable but lacking nuance; human grading as most flexible and high quality but slow and expensive, to be avoided when possible; and LLM-based grading as fast, flexible, and suitable for complex judgment once reliability is validated. The other options invert these tradeoffs: humans are the slow path, LLM grading exists precisely for nuanced judgments, and code rules cannot capture every subjective assessment.
Read the docs →Drill this domain in Claude Prep
The app has dozens more questions in this domain alone, plus a Domain Drill mode that focuses your practice exactly here, and full mock exams that weight it at 20%.