Claude Certified Architect - Professional study materials
Claude Certified Architect - Professional study resources

Claude Certified Architect - Professional practice questions

One question at a time. Build your Claude Certified Architect - Professional understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Solution Architecture and Design

An architect is deciding how to structure a multi-agent system where a lead agent must delegate subtasks to specialists and merge their outputs. Which design most directly supports reliable delegation and result aggregation?

  1. A fixed sequential chain in which each specialist always runs regardless of the task
  2. A broadcast pattern where every agent receives every message and acts independently
  3. A coordinator pattern where the lead agent routes work to specialist agents and synthesizes their returned results Correct answer.
  4. A single monolithic prompt that instructs one model to internally simulate every specialist role

Explanation

A coordinator (orchestrator) pattern separates routing and synthesis from specialist execution, giving a clear control point for delegation and aggregation. It keeps responsibilities explicit and makes failure handling and result merging tractable.

Question 2Solution Architecture and Design

A team needs the model to reliably emit structured records that downstream code can parse. Which approach is the most robust architectural choice?

  1. Rely on the model's natural formatting habits and parse with lenient regex
  2. Request JSON in the prompt and validate with a schema, retrying on validation failure Correct answer.
  3. Ask the model to output YAML because it is more human readable
  4. Increase the temperature so the model explores more output formats

Explanation

Combining explicit schema instructions with programmatic validation and bounded retries gives a verifiable contract between model output and downstream consumers. Validation catches malformed output before it propagates.

Question 3Solution Architecture and Design

Which statement best describes the role of a system prompt in a production Claude application?

  1. It replaces the need for tool definitions in agentic systems
  2. It sets persistent behavioral guidance and constraints that shape all responses Correct answer.
  3. It is a per-request user message that overrides earlier conversation turns
  4. It is only used for logging and has no effect on model behavior

Explanation

The system prompt establishes durable role, tone, and constraint guidance applied across the conversation. It is distinct from user turns and does not substitute for tool schemas.

Question 4Solution Architecture and Design

A retrieval-augmented system must answer questions over a large internal corpus. Which design element most directly improves answer grounding?

  1. Removing citations so the model writes more fluently
  2. Retrieving relevant chunks and instructing the model to answer only from provided context Correct answer.
  3. Passing the entire corpus in every request to guarantee coverage
  4. Raising max tokens so the model can speculate at greater length

Explanation

Grounding improves when the model is given targeted retrieved context and explicitly constrained to it. This reduces unsupported claims and keeps prompts within context limits.

Question 5Solution Architecture and Design

Which capability is the primary reason to give an agent tool use rather than relying on a single completion?

  1. It makes inference cheaper in all cases
  2. It allows the model to take actions and fetch fresh information beyond its training data Correct answer.
  3. It guarantees the model will never produce incorrect statements
  4. It removes the need for any prompt engineering

Explanation

Tools let the model interact with external systems, retrieve current data, and perform actions, extending beyond static parametric knowledge. They do not guarantee correctness or eliminate prompt design.

Question 6Solution Architecture and Design

An architect is choosing between a single large prompt and a decomposed pipeline of smaller steps. Which situation most favors decomposition?

  1. The task is a one-line classification with a fixed label set
  2. Latency must be minimized and the task is trivial
  3. The task requires distinct stages with different context and validation between them Correct answer.
  4. The team wants fewer moving parts regardless of complexity

Explanation

Decomposition helps when a task naturally separates into stages that benefit from focused context, intermediate validation, and clearer failure isolation. Simple single-step tasks rarely justify the added orchestration.

Question 7Solution Architecture and Design

Which practice best supports safe rollout of a new prompt version in production?

  1. Disable logging to reduce storage costs during rollout
  2. Use a staged rollout with evaluation against a held-out test set before full release Correct answer.
  3. Rely on developer intuition since prompt changes are low risk
  4. Deploy directly to all users and monitor after the fact

Explanation

Evaluating prompt changes against a representative held-out set before staged release catches regressions early. Logging and monitoring remain essential during rollout.

Question 8Solution Architecture and Design

An architect must ensure an agent stops rather than looping indefinitely when a tool repeatedly fails. Which control is most appropriate?

  1. Allow unlimited retries so the agent can eventually succeed
  2. Remove error messages from tool results to avoid confusing the model
  3. Increase the model temperature after each failure
  4. Set a maximum number of iterations and a fallback response path Correct answer.

Explanation

Bounded iteration with an explicit fallback prevents runaway loops and gives predictable behavior under failure. Clear error signaling also helps the model adapt within the bound.

Question 9Solution Architecture and Design

A team wants to reduce prompt-injection risk when an agent processes untrusted web content. Which architectural control most directly addresses this?

  1. Log all tool calls but allow any action the model requests
  2. Treat retrieved content as data and keep instructions and tool permissions separate from it Correct answer.
  3. Ask the model politely to ignore malicious instructions
  4. Increase the model's context window so it can read more of the page

Explanation

Separating trusted instructions from untrusted data and limiting tool permissions reduces the impact of injected instructions. Content should be treated as data, not as authority.

Question 10Solution Architecture and Design

An architect is designing tool schemas for an agent. Which choice most improves reliable tool selection?

  1. Use overlapping tool names so the model can choose flexibly
  2. Give each tool a distinct name and a precise description of when and how to use it Correct answer.
  3. Omit parameter descriptions to keep schemas short
  4. Define one generic tool that accepts arbitrary free-form commands

Explanation

Distinct names and precise descriptions help the model disambiguate tools and supply correct arguments. Clear schemas reduce selection and parameter errors.

Question 11Solution Architecture and Design

A production system shows high latency because every request includes the full conversation history. Which change best balances quality and latency?

  1. Increase max output tokens to compensate
  2. Send only the latest user message and drop all prior context
  3. Double the history on every turn to preserve all detail
  4. Summarize or truncate older turns while retaining key recent context Correct answer.

Explanation

Compressing older context while keeping salient recent turns controls prompt size and latency while preserving task-relevant information. Dropping all history loses needed continuity.

Question 12Solution Architecture and Design

An architect needs deterministic, reproducible behavior for a classification step used in auditing. Which design choice best supports this?

  1. Rely on a single unvalidated free-text response
  2. Use low temperature and a constrained label set with validation Correct answer.
  3. Let the model invent labels when none fit
  4. Use high temperature to sample diverse labels

Explanation

Low temperature reduces sampling variance, and a constrained label set with validation enforces a fixed output space suitable for auditing. This combination supports reproducibility.

Question 13Solution Architecture and Design

A multi-agent system has agents that each call expensive tools. Which coordination design best controls cost while preserving quality?

  1. Run all agents in parallel regardless of dependencies
  2. Let every agent call every tool on every turn
  3. Have the coordinator assign scoped subtasks and only invoke tools needed for the current subtask Correct answer.
  4. Disable all tool calls to guarantee low cost

Explanation

Scoping subtasks and tool access to what each step needs avoids redundant expensive calls. The coordinator can enforce dependencies and budget.

Question 14Solution Architecture and Design

An architect is designing a RAG pipeline and must choose a chunking strategy for long technical documents with section headers. Which approach best preserves answerability?

  1. Store only the document title as retrievable content
  2. Chunk along section boundaries and retain header metadata with each chunk Correct answer.
  3. Split every document into fixed 50-token chunks ignoring structure
  4. Use one chunk per entire document regardless of length

Explanation

Structure-aware chunking keeps semantically related content together and carries metadata that aids retrieval and citation. Fixed blind splits can sever context needed to answer.

Question 15Solution Architecture and Design

A team wants to add a human approval step before an agent performs irreversible actions. Where should this control be placed architecturally?

  1. Inside the model prompt as a suggestion the model may ignore
  2. Only in documentation for operators
  3. As an enforced gate in the orchestration layer between the model and the action Correct answer.
  4. After the action completes, as a review log entry

Explanation

Irreversible actions require enforcement outside the model, in the orchestration layer that mediates tool execution. Prompt-level requests are advisory and can be bypassed.

Question 16Solution Architecture and Design

An architect observes that a retrieval system returns relevant documents but answers still cite unsupported facts. Which change most directly addresses the gap?

  1. Add an instruction to answer only from retrieved context and require citations to specific passages Correct answer.
  2. Increase the number of retrieved documents tenfold
  3. Lower the retrieval threshold to include more marginal matches
  4. Switch the model to a larger context window

Explanation

Constraining answers to retrieved context and requiring passage-level citations ties claims to evidence. This addresses unsupported statements more directly than retrieval volume.

Question 17Solution Architecture and Design

Which design best supports observability in a production agent system?

  1. Store logs without timestamps to save space
  2. Record prompts, tool calls, tool results, and outcomes with correlation IDs Correct answer.
  3. Disable tracing because it slows the model
  4. Log only final answers to minimize storage

Explanation

Correlated traces of prompts, tool interactions, and outcomes enable debugging and root-cause analysis across multi-step flows. Final-answer-only logging hides the failure path.

Question 18Solution Architecture and Design

An architect must design for graceful degradation when a downstream retrieval service is unavailable. Which approach is most appropriate?

  1. Fall back to a constrained response that discloses reduced context availability Correct answer.
  2. Fail the entire request with an internal error and no message
  3. Silently answer as if retrieval succeeded
  4. Retry indefinitely until the service recovers

Explanation

Graceful degradation returns a usable, honest response that discloses the reduced capability. This preserves user trust while avoiding fabricated answers.

Question 19Solution Architecture and Design

A team is comparing a single-agent design with a multi-agent design for a workflow that has one clear objective and few tools. Which is the stronger architectural argument?

  1. Multi-agent is always superior because more agents add capability
  2. Single-agent designs cannot use tools
  3. A single agent with a clear prompt and a small tool set is simpler and sufficient Correct answer.
  4. Multi-agent reduces total token usage in every case

Explanation

When the objective is singular and tooling is limited, a single agent minimizes coordination overhead and complexity. Multi-agent designs add value mainly with separable, specialized subtasks.

Question 20Solution Architecture and Design

An architect is designing a system that must handle requests exceeding the model's context window. Which strategy is most sound?

  1. Increase temperature to shorten the output
  2. Ignore the overflow and hope the model handles it
  3. Truncate silently from the middle of the input
  4. Decompose the input, process segments, and aggregate results Correct answer.

Explanation

Decomposing oversized inputs into processable segments and aggregating results respects context limits while preserving coverage. Silent truncation risks losing critical content.

Question 21Solution Architecture and Design

A regulated workload requires that model outputs be traceable to source evidence. Which combination best satisfies this requirement?

  1. Passage-level citations plus logging of retrieved sources and model outputs Correct answer.
  2. Free-form answers with no references and high temperature
  3. Manual review of outputs after deletion of source logs
  4. A single aggregate confidence score without sources

Explanation

Passage-level citations connect claims to evidence, and correlated logging preserves an auditable record. Together they support traceability required in regulated settings.

Question 22Solution Architecture and Design

An architect is evaluating whether to place validation logic in the prompt or in surrounding code for a high-stakes extraction pipeline. Which reasoning is most defensible?

  1. Validation should be skipped to reduce latency
  2. Prompt-only validation is sufficient because the model is deterministic
  3. Validation belongs only in post-hoc manual review
  4. Code-based schema validation should enforce the contract, with prompts guiding format Correct answer.

Explanation

Prompts can guide format, but enforceable contracts belong in code that validates and rejects malformed output. This separation makes guarantees testable and independent of model variance.

Question 23Solution Architecture and Design

A multi-agent workflow intermittently produces contradictory conclusions from different specialists. Which architectural change best resolves this?

  1. Let each specialist publish directly to the user without reconciliation
  2. Increase the number of specialists to outvote conflicting ones
  3. Add a synthesis stage that reconciles specialist outputs against shared evidence and explicit conflict rules Correct answer.
  4. Remove shared context so specialists operate fully independently

Explanation

A synthesis stage with shared evidence and explicit conflict-resolution rules provides a principled way to reconcile disagreements. Adding agents or removing shared context does not resolve contradictions.

Question 24Solution Architecture and Design

An architect must design an agent that operates on untrusted inputs while holding limited-privilege credentials. Which layered control set is most defensible?

  1. Disabling all logging to protect credential secrecy
  2. Broad credentials plus prompt warnings to be careful
  3. Least-privilege scoped credentials, input isolation, and enforced action allowlists Correct answer.
  4. Full administrative credentials to avoid permission errors

Explanation

Defense in depth combines least-privilege credentials, isolation of untrusted input, and enforced allowlists so a single failure does not grant broad access. Prompt warnings alone are insufficient.

Question 25Solution Architecture and Design

A team needs to choose between evaluating prompts with automated rubric scoring and human review. Which design is most appropriate for a high-volume, safety-sensitive feature?

  1. Automated rubric scoring only, with no human calibration
  2. Automated scoring for scale plus periodic human review to calibrate and catch edge cases Correct answer.
  3. No evaluation because the model is from a reputable provider
  4. Human review of every request with no automation

Explanation

Automated scoring scales across volume, while periodic human review calibrates the rubric and surfaces edge cases automation misses. Combining them balances coverage and rigor.

Question 26Solution Architecture and Design

An architect is decomposing a complex document-analysis workflow into multiple LLM calls. Which decomposition principle best supports reliability and debuggability?

  1. Assign each call a single, well-defined transformation with explicit input and output contracts. Correct answer.
  2. Rely on the model to infer intermediate results without passing them explicitly.
  3. Let each call freely decide its own scope to maximize flexibility.
  4. Combine all steps into a single call to reduce token overhead.

Explanation

Decomposing a workflow into steps with explicit contracts makes each step independently testable, observable, and replaceable. It also limits the blast radius of failures and simplifies debugging. Combining steps or leaving scope implicit reduces control and traceability.

Question 27Solution Architecture and Design

A team is selecting a model for a high-volume classification task where latency and cost are critical, and the classes are well-defined. Which model-selection approach is most appropriate?

  1. Choose a model based on its maximum context window size.
  2. Choose the model with the most recent release date.
  3. Choose the largest available model to maximize accuracy.
  4. Choose the smallest model that meets the accuracy target on a representative evaluation set. Correct answer.

Explanation

Model selection should be driven by measured task performance against a defined target, not by raw size or recency. For a constrained, well-defined task, a smaller model often meets accuracy at lower cost and latency. Larger models are justified only when evaluation shows a meaningful gain.

Question 28Solution Architecture and Design

An architect is designing a system that must produce structured JSON records from free-text reports. Which design choice most directly improves the reliability of the structured output?

  1. Request JSON in the prompt and parse the response with a tolerant parser.
  2. Ask the model to explain its reasoning before emitting JSON.
  3. Define a strict output schema and validate every response against it, with a repair or retry path. Correct answer.
  4. Increase the temperature to encourage diverse formatting.

Explanation

Structured output reliability comes from enforcing a schema and validating responses, with a defined path for handling invalid output. Prompt-only requests and tolerant parsing leave malformed output undetected. Higher temperature increases variability and is counterproductive for strict formats.

Question 29Solution Architecture and Design

An architect must choose where to store conversation state for a stateless API service that handles many concurrent users. Which approach is most appropriate?

  1. Store state in an external durable store keyed by session and load it per request. Correct answer.
  2. Rely on the model provider to persist session state between calls.
  3. Keep state in process memory on each server instance.
  4. Embed the entire state in every prompt sent to the model.

Explanation

Externalizing state keyed by session allows any instance to serve any request, supporting horizontal scaling and failover. In-process memory ties a user to a specific instance and is lost on restart. The model provider does not persist application session state.

Question 30Solution Architecture and Design

A team needs to enforce that an agent can only call a defined set of tools with validated parameters. Which design element is most directly responsible for this enforcement?

  1. A system prompt instructing the model to use only approved tools.
  2. A logging layer that records every tool call.
  3. A post-processing step that reviews the final answer.
  4. A tool gateway that validates tool names and parameters before execution. Correct answer.

Explanation

Enforcement requires a control point outside the model that checks each tool invocation against an allowlist and validates parameters before execution. Prompt instructions are advisory and can be overridden. Logging and post-processing observe but do not prevent unauthorized calls.

Question 31Solution Architecture and Design

An architect is designing a caching layer for repeated identical LLM requests. Which consideration is most important for correctness?

  1. Cache keys must include all inputs that affect the output, such as prompt, model, and parameters. Correct answer.
  2. Caching should be applied to all requests regardless of temperature.
  3. Cache entries should never expire to maximize hit rate.
  4. Cache keys should be based only on the user ID.

Explanation

A cache is correct only if its key captures every input that can change the output, including the model, prompt, and generation parameters. Omitting any of these can serve stale or mismatched results. Expiration and scoping policies are secondary to key completeness.

Question 32Solution Architecture and Design

An architect is designing a retrieval-augmented generation pipeline for a corpus that is updated frequently. Which design choice best keeps answers current without full reindexing?

  1. Use only the model's parametric knowledge for recent documents.
  2. Support incremental upserts and deletions in the vector index with document versioning. Correct answer.
  3. Cache all answers indefinitely to avoid retrieval.
  4. Re-embed the entire corpus on every update.

Explanation

Incremental upserts and deletions allow the index to reflect changes without reprocessing the entire corpus, and versioning supports consistency. Full re-embedding is costly and slow for frequent updates. Caching and parametric knowledge do not reliably reflect new documents.

Question 33Solution Architecture and Design

A multi-agent system routes tasks among specialist agents. Which routing design most improves predictability when a task does not clearly match any specialist?

  1. Fail the request without a response.
  2. Always route to the most general agent.
  3. Let the model choose arbitrarily among specialists.
  4. Define an explicit fallback route with a documented default behavior. Correct answer.

Explanation

An explicit fallback route makes behavior deterministic and observable when no specialist clearly applies. It prevents unpredictable routing and gives operators a defined path to monitor. Arbitrary selection or silent failure undermines reliability.

Question 34Solution Architecture and Design

An architect needs to ensure that a long-running agent task can be resumed after a failure without repeating completed side effects. Which design element is most important?

  1. Increasing the model's context window to hold all progress.
  2. Retrying the entire task from the beginning on any failure.
  3. Running the task on a single long-lived server.
  4. Storing a checkpoint of progress and making side-effecting steps idempotent. Correct answer.

Explanation

Resumability requires durable checkpoints of progress and idempotent side effects so that re-execution does not duplicate actions. Context window size does not provide durability. Restarting from the beginning repeats side effects, and single-server execution does not survive failures.

Question 35Solution Architecture and Design

A team observes that an agent sometimes produces plausible but incorrect answers when retrieval returns no relevant documents. Which architectural change best addresses this?

  1. Lower the model temperature to zero.
  2. Add a relevance threshold and an explicit insufficient-evidence response path. Correct answer.
  3. Remove retrieval and rely on the model's knowledge.
  4. Increase the number of retrieved documents regardless of relevance.

Explanation

When retrieval yields no relevant evidence, the system should detect this via a relevance threshold and respond with an explicit insufficient-evidence outcome rather than generating unsupported content. Lowering temperature does not fix missing evidence. Adding irrelevant documents or removing retrieval increases hallucination risk.

Question 36Solution Architecture and Design

An architect is designing an evaluation harness for prompt changes. Which design most supports detecting regressions across releases?

  1. Maintain a versioned, representative test set with expected outcomes and run it on every change. Correct answer.
  2. Evaluate only on examples that the current prompt already passes.
  3. Rely on subjective impressions from a single reviewer.
  4. Evaluate only the final answer without recording intermediate steps.

Explanation

Regression detection requires a stable, representative, versioned test set with defined expected outcomes, run consistently across changes. Evaluating only passing examples hides failures, and single subjective reviews are not reproducible. Intermediate steps are often needed to diagnose regressions.

Question 37Solution Architecture and Design

An architect must design a system where multiple teams contribute prompts and tools to a shared agent platform. Which governance design best balances autonomy and safety?

  1. Store prompts only in individual developers' local environments.
  2. Allow any team to deploy directly to production without review.
  3. Centralize all changes in a single team with no contribution process.
  4. Require versioned artifacts, automated checks, and a review gate before promotion. Correct answer.

Explanation

Versioned artifacts with automated checks and a review gate provide traceability and prevent unsafe changes while allowing teams to contribute. Unreviewed deployment and local-only storage remove accountability. Full centralization may bottleneck but is safer than no process; the balanced option is versioned artifacts with gates.

Question 38Solution Architecture and Design

An architect is designing a system that must handle bursts of traffic while keeping cost predictable. Which design is most appropriate?

  1. Allow unbounded concurrent requests to the model provider.
  2. Use a queue with bounded concurrency and autoscaling workers. Correct answer.
  3. Provision for peak capacity at all times.
  4. Reject all requests above average load.

Explanation

A queue with bounded concurrency smooths bursts and lets workers scale within defined limits, keeping cost predictable while maintaining throughput. Always provisioning for peak wastes resources. Unbounded concurrency risks provider rate limits and cost overruns, and rejecting above-average load harms availability.

Question 39Solution Architecture and Design

An architect is comparing synchronous and asynchronous invocation for an agent that performs long-running research tasks. Which factor most strongly favors asynchronous design?

  1. The requirement to minimize code complexity.
  2. The need for immediate interactive responses.
  3. Task durations exceeding typical HTTP timeout limits. Correct answer.
  4. The desire to reduce the number of components.

Explanation

Asynchronous invocation is favored when task duration exceeds practical request timeouts, allowing the client to poll or receive a callback. Immediate interactive responses favor synchronous design. Reducing components or code complexity is not the primary driver for asynchrony.

Question 40Solution Architecture and Design

A team wants to ensure that an agent's actions are auditable for compliance. Which design most directly supports this requirement?

  1. Relying on the model provider's default logging.
  2. Storing logs in memory only.
  3. Logging only the final user-visible answer.
  4. Recording structured events for each model call, tool invocation, and decision with timestamps and identifiers. Correct answer.

Explanation

Auditability requires structured, durable records of each significant action, including model calls and tool invocations, with identifiers and timestamps. Logging only final answers omits the decision trail. In-memory logs are lost, and provider defaults may not capture application-level decisions.

Question 41Solution Architecture and Design

An architect observes that a multi-agent system's specialists frequently duplicate work and produce overlapping outputs. Which design change most directly reduces duplication?

  1. Increase the model size for each specialist.
  2. Increase the number of specialists to cover more cases.
  3. Allow each specialist to operate without coordination.
  4. Define clear responsibility boundaries and a shared task ledger that records completed work. Correct answer.

Explanation

Clear responsibility boundaries prevent overlap, and a shared task ledger lets agents see what has already been done. Adding specialists or removing coordination increases duplication. Larger models do not address coordination gaps.

Question 42Solution Architecture and Design

An architect must design a system that can roll back a prompt change quickly if quality degrades. Which design most directly enables this?

  1. Edit prompts directly in production without versioning.
  2. Hardcode prompts in application source code.
  3. Version prompts and route traffic by version with a fast switch. Correct answer.
  4. Rely on the model provider to revert changes.

Explanation

Versioned prompts with traffic routing allow a rapid switch back to a known-good version when quality degrades. Hardcoding and unversioned production edits make rollback slow and error-prone. The model provider does not manage application prompt versions.

Question 43Solution Architecture and Design

An architect is designing a system where an agent's tool calls can have financial consequences. Which combination of controls best mitigates risk while preserving automation?

  1. A single shared credential with broad permissions.
  2. Disabling logging to reduce overhead.
  3. Per-tool spending limits, idempotency keys, and approval thresholds for high-value actions. Correct answer.
  4. Unlimited tool access with post-hoc reconciliation.

Explanation

Spending limits bound exposure, idempotency keys prevent duplicate charges on retries, and approval thresholds add human control for high-value actions. Unlimited access and broad shared credentials increase risk. Disabling logging removes the ability to detect and investigate issues.

Question 44Solution Architecture and Design

An architect must choose between a shared model endpoint and isolated endpoints per tenant for a multi-tenant application with strict data isolation requirements. Which design consideration is most decisive?

  1. Whether tenant data can be processed in a shared context under the applicable policy. Correct answer.
  2. The programming language used by the application.
  3. The average response length of tenant requests.
  4. The number of tenants expected in the first year.

Explanation

The decisive factor is whether policy permits tenant data to be processed in a shared context; if isolation is mandated, separate endpoints or equivalent controls are required. Tenant count, response length, and language are secondary to the isolation requirement.

Question 45Model Selection, Prompt Engineering, and Context Management

Which model should you choose when a task requires the lowest possible latency for a high-volume classification workload where accuracy on simple labels is already sufficient?

  1. A model with vision capability enabled by default
  2. The largest available model with extended thinking enabled
  3. A model with the largest context window available
  4. A small, fast model sized to the task complexity Correct answer.

Explanation

Model selection should match capability to task difficulty; simple classification does not benefit from frontier-scale reasoning. Smaller models generally return responses faster and at lower cost while meeting accuracy needs.

Question 46Model Selection, Prompt Engineering, and Context Management

What is the primary purpose of a system prompt in a Claude application?

  1. To compress the user's input before inference
  2. To set persistent role, tone, and behavioral constraints for the model Correct answer.
  3. To store conversation history across sessions
  4. To authenticate the request against the API

Explanation

The system prompt establishes durable instructions such as persona, guardrails, and output conventions that apply across the conversation. It is not a storage or transport mechanism.

Question 47Model Selection, Prompt Engineering, and Context Management

A team wants deterministic, machine-parseable output from Claude for a downstream service. Which prompting approach best supports this?

  1. Add several few-shot examples in different formats
  2. Ask for a friendly narrative summary in prose
  3. Increase the max_tokens limit substantially
  4. Instruct the model to return JSON matching a specified schema Correct answer.

Explanation

Specifying an explicit output schema and format is the most reliable way to obtain parseable structured output. Consistent format instructions reduce variance in the response shape.

Question 48Model Selection, Prompt Engineering, and Context Management

In the Claude Messages API, where is prior conversational context supplied on a follow-up request?

  1. In the messages array as alternating user and assistant turns Correct answer.
  2. In the stop_sequences parameter
  3. In the metadata field
  4. In the system prompt only

Explanation

The Messages API is stateless, so callers resend the conversation as an ordered list of user and assistant turns. The model does not retain memory between separate requests.

Question 49Model Selection, Prompt Engineering, and Context Management

What does the temperature parameter primarily control in a Claude request?

  1. The degree of randomness in token selection Correct answer.
  2. The size of the context window
  3. The maximum number of output tokens
  4. The number of few-shot examples used

Explanation

Temperature scales the randomness of sampling: lower values make outputs more focused and repeatable, higher values increase diversity. It does not affect length limits or context size.

Question 50Model Selection, Prompt Engineering, and Context Management

Which technique most directly improves Claude's performance on a task by showing the desired input-output pattern before the real request?

  1. Few-shot prompting Correct answer.
  2. Shortening the system prompt
  3. Raising the temperature
  4. Enabling streaming

Explanation

Few-shot prompting supplies worked examples that demonstrate the expected format and reasoning pattern. This anchors the model's response style and improves consistency.