Courseiva

ANTHROPIC-CLAUDE-ARCHITECT-FOUNDATIONS · domain

scenario questions

Practise Claude Certified Architect - Foundations scenario questions practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

271 questions47 easy137 medium87 hard

Focused practice

Practice scenario questions questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about scenario questions

scenario questions questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common scenario questions exam traps

  • ▸Answering from memory before reading the full scenario.
  • ▸Missing a constraint such as cost, availability, security, scope or command context.
  • ▸Choosing a broad answer when the question asks for the most specific fix.
  • ▸Ignoring why the wrong options are tempting.

Question index

All scenario questions questions (271)

Click any question to see the full explanation, or start a practice session above.

1

During a long refactoring session, a developer realizes Claude Code has been operating with an outdated understanding of a utility module because the file was changed on disk by a teammate's branch merge. The developer wants Claude to re-read the current contents of that file before continuing. Which action accomplishes this most directly?

Medium
2

You are designing a code-migration assistant that converts legacy COBOL modules to a modern language. Stakeholders require high reliability and verifiable output. Which TWO architectural practices best support this requirement? (Choose two.)

Medium
3

Which mechanism does Claude Code use to maintain session state across multiple prompts during a single refactoring task?

Hard
4

An architect is building an agent that uses a 'Plan-and-Execute' pattern. The agent first generates a multi-step plan, then executes each step. During execution, the agent discovers that Step 2 is impossible due to a missing API key. How should the agent be designed to handle this?

Medium
5

An architect is designing an MCP server that exposes a tool to query a customer relationship management (CRM) system. The CRM API enforces per-tenant rate limits and returns HTTP 429 with a Retry-After header when exceeded. The architect wants the tool to behave predictably under load without the model having to reason about throttling. Which approach should the architect implement?

Medium
6

Which property of a well-structured prompt contributes most significantly to the reliability of a model's output in a zero-shot scenario?

Easy
7

When implementing an MCP resource that provides large datasets, what is the best practice for managing data transmission to avoid hitting context window limits?

Medium
8

An architect is optimizing a multi-agent system for a legal firm. The system uses a 'Router' agent followed by several 'Specialist' agents. Which THREE techniques will most effectively minimize latency in this specific architecture?

Medium
9

A document-triage agent uses Claude with a read_attachment tool. During testing, the agent calls read_attachment for a PDF, receives a tool_result containing the extracted text, and then immediately calls read_attachment again for the same file id, repeating several times until the orchestrator stops it. The tool itself works correctly and returns valid content each time. What is the most effective architectural fix?

Medium
10

Why are XML tags specifically recommended for structuring prompts in Claude, as opposed to other formats like JSON or simple bullet points, when managing large context?

Medium
11

When designing an MCP server, which TWO of these factors primarily influence the model's performance in selecting the right tool?

Medium
12

A multi-agent system has a coordinator that delegates research subtasks to worker agents. Workers often return verbose, partially relevant summaries, and the coordinator loses track of which findings map to which subtask. Which change best improves the coordinator's ability to assemble a coherent final answer?

Medium
13

A developer is using Claude Code to refactor a large TypeScript repository. They notice that Claude Code is attempting to read and analyze thousands of generated log files in the /dist folder, slowing down performance. Which configuration change should the developer make to optimize this workflow?

Medium
14

When designing tools that perform destructive actions, such as deleting a cloud resource or sending a high-priority email, which architectural pattern is most recommended by Anthropic?

Medium
15

A regulated insurance workflow requires Claude to extract coverage limits from policy documents and return them as JSON. During testing, the model occasionally emits prose commentary before the JSON, breaking the downstream parser. The team cannot change the parser and must guarantee the response begins with a valid JSON object. Which technique most reliably enforces that?

Hard
16

A developer frequently runs the same multi-step task in Claude Code: lint the changed files, run the unit tests, and then draft a commit message. They want to invoke this entire sequence with a single reusable command rather than retyping the instructions each time. Which Claude Code feature should they configure?

Easy
17

An architect is designing a research agent whose context window is filling with raw web page HTML. The agent must keep working across dozens of sources without exceeding the context limit. Which architecture best preserves reasoning quality over a long session?

Hard
18

Refer to the exhibit. The developer wants to ensure the summary is concise and follows a specific structure. What is the most effective way to improve this prompt?

Medium
19

A developer wants Claude Code to always run the project's formatter after it edits a file, and wants this behavior shared with the whole team through version control. Which configuration mechanism is intended for this kind of automatic, tool-triggered action?

Medium
20

An architect is implementing an MCP server that exposes a tool to create a new project in a project management system. The tool requires a project name, a list of team member emails, and a due date. The architect wants to minimize the chance that the model provides invalid or missing arguments. Which design choice best achieves this?

Medium
21

An architect is building a Claude-based agent that must reconcile invoice disputes. The orchestrator runs a single loop where Claude may emit several tool_use blocks in one assistant turn: one block calls lookup_invoice, another calls fetch_payment_history, and a third calls get_contract_terms. A junior developer proposes executing the first tool_use block, feeding its tool_result back to Claude, and only then deciding whether to run the other two. What is the architecturally correct way for the orchestrator to handle this turn?

Hard
22

Which strategy most effectively handles long documents that exceed the model's immediate focus in a single prompt?

Medium
23

Refer to the exhibit. The developer observes that Claude occasionally includes conversational filler before the JSON block. What is the most reliable way to ensure the output starts immediately with the JSON object?

Hard
24

A developer wants a single Claude Code slash command available only to their own user account on a shared Linux workstation, not to other engineers who log into the same machine. Where should the command's Markdown file be stored?

Medium
25

A new engineer joins a team and clones the project repository. They run Claude Code and find it already follows the team's conventions for commit messages and test layout without any personal setup. Which explanation accounts for this?

Easy
26

A support agent running on the Claude Messages API must look up a customer's order status before answering. The developer writes a single request that includes the get_order_status tool definition and the user's question, then expects the model to return the order status directly in its first response. What actually happens, and what must the developer implement?

Easy
27

Which of the following describes the 'Chain of Thought' prompting strategy, and why should it be used for complex logic tasks?

Medium
28

When building an application that requires Claude to extract information from a set of 50 uploaded PDFs, which THREE methods will most effectively increase the reliability of the extracted data?

Hard
29

You are building an RAG system. Which THREE factors most significantly impact the reliability of the retrieved information?

Medium
30

A developer builds a Claude-powered assistant that answers questions over a 300-page policy manual. When the whole manual is placed in a single prompt, answers to questions about clauses in the middle of the document are frequently wrong or vague, while answers about the opening and closing sections are accurate. The manual must stay available in full, and the team wants to keep latency reasonable. Which technique most effectively improves accuracy for the mid-document clauses?

Hard
31

Which technique is most effective for ensuring an LLM correctly follows complex multi-step instructions?

Medium
32

Refer to the exhibit. A developer is experiencing slow response times during complex refactoring tasks. Based on the provided configuration, what is the most likely cause of performance issues?

Medium
33

When designing an MCP server, what is the best practice for handling dependencies between multiple tools?

Medium
34

When Claude Code suggests a series of file edits, what is the best strategy to ensure the integrity of the project?

Medium
35

An architect is designing an MCP server that retrieves real-time financial data. To ensure the model does not hallucinate during tool execution, which design pattern is most effective for tool definition?

Medium
36

Which THREE of the following are benefits of using JSON Schema for MCP tool input definitions?

Medium
37

A team is extracting medication names and dosages from clinical notes. The notes contain many similar-looking terms, and the team needs high precision to avoid false positives. They plan to use few-shot examples. Which design of the few-shot examples best supports high precision in this scenario?

Hard
38

A financial analyst uses Claude via the Messages API to extract line items from scanned invoices. The response must be valid JSON conforming to a fixed schema with fields invoice_number, date, and total. During testing, the model occasionally adds a trailing sentence after the JSON object or wraps the JSON in a markdown code fence. Which approach best guarantees the response parses cleanly while preserving extraction accuracy?

Medium
39

An architect is standardizing Claude Code usage across a large engineering organization. They want to ensure that every developer's sessions automatically inherit a curated set of project conventions and that destructive shell commands are blocked unless explicitly approved. Which TWO configurations should the architect implement? (Choose two.)

Hard
40

When designing an MCP tool that interacts with a high-latency external API, which strategy should be implemented to ensure a smooth interaction for the end-user?

Easy
41

An architect is designing a system where Claude must handle complex multi-step customer inquiries. The current implementation uses a single prompt, but it often fails on high-reasoning tasks. Which agentic pattern should be implemented to allow a primary model to decompose the user's request into sub-tasks for specialized worker agents?

Medium
42

A user is complaining that Claude's responses are being cut off in the middle of a sentence. What is the most likely cause related to context and reliability settings?

Easy
43

You are building a document-processing pipeline with the Anthropic Messages API. Claude must extract a fixed set of fields from each document and return them as JSON. In production, you observe two problems: (1) some responses include explanatory prose before the JSON, and (2) some responses omit required fields when the document is ambiguous. You need to make the pipeline more reliable. (Choose two.)

Hard
44

A developer working in a monorepo wants Claude Code to follow the team's TypeScript conventions only when editing files under the `packages/api` directory, while letting other directories use different conventions. What is the most appropriate way to configure this in Claude Code?

Medium
45

An enterprise financial application uses Claude to parse unstructured invoice PDFs into structured JSON data. Occasionally, minor transcription errors alter numeric totals, posing significant compliance and auditing risks. Which context-engineering technique provides the most reliable mitigation for these transactional discrepancies?

Medium
46

A customer support platform routes conversations to Claude 3.5 Sonnet via the Messages API. The system prompt includes 40,000 tokens of product documentation, and each turn appends the full prior transcript. After roughly 30 exchanges, agents report that Claude starts contradicting earlier troubleshooting steps it gave in the same conversation and drifts from the documented procedures. Latency and cost have also grown steadily. Which architectural change best addresses the reliability degradation while controlling cost?

Hard
47

What is the primary benefit of using a 'Role-based' system prompt (e.g., 'You are a senior accountant')?

Medium
48

Refer to the exhibit. An architect is reviewing the tool-use integration for a custom Claude agent. What is the primary purpose of setting the 'is_error' field to true in this specific API payload?

Medium
49

While working in a repository, an architect wants Claude Code to explain the purpose of a specific function in a large source file without altering any code or generating new files. Which mode should be used for this task?

Easy
50

An architect is building an MCP server that exposes a `read_file` tool. The tool's input schema currently defines `path` as a plain string. Security review requires that the tool never read outside a configured workspace root, and that the model receive a clear, machine-readable error when it attempts to do so. Which change to the tool design best satisfies this requirement?

Medium
51

An architect needs to implement a tool that allows the LLM to search a file system. What is the most secure way to present this capability?

Hard
52

You are building a customer-support agent with the Anthropic Messages API. The agent must call a `get_order_status` tool, and the result is required before it can decide whether to issue a refund. The tool sometimes takes several seconds to respond. Which approach best ensures the agent does not prematurely finalize its answer before the tool result is available?

Medium
53

A developer is building a classification pipeline that routes support tickets into one of eight categories. They want Claude to return a category label and a confidence score between 0 and 1. The output must be parseable by a JSON parser without post-processing. They plan to use the Anthropic Messages API. Which approach best ensures the output is directly parseable JSON with the required fields?

Medium
54

An architect is evaluating the use of 'Prompt Caching' within a complex Orchestrator-Workers agentic loop. Which TWO benefits are most significant for this specific use case?

Hard
55

Refer to the exhibit. When using variable injection in a prompt template for Claude, why is the use of XML tags preferred over simple text labels?

Medium
56

What is the primary purpose of the 'compact' workflow in Claude Code configuration?

Easy
57

Refer to the exhibit. The developer notices that Claude occasionally truncates the sentiment analysis report. What is the most likely cause based on the JSON configuration?

Medium
58

You are using Claude to generate complex JSON configurations. The model frequently truncates the output because the response exceeds the token limit. What is the most robust architectural solution to handle this?

Hard
59

An organization is deploying an agentic system that must maintain long-running conversations over several days, involving hundreds of tool calls. What is the most critical architectural consideration for managing the 'messages' array to prevent exceeding Claude's context window?

Medium
60

You are building an application that extracts data from messy, unstructured text. Which THREE practices help maximize the accuracy and consistency of the extraction?

Hard
61

A team is exposing an internal inventory database to Claude through an MCP server. They want the model to retrieve a specific item by its SKU, and they want the tool contract to be unambiguous so the model rarely mis-calls it. Which tool definition best matches this goal?

Easy
62

An agentic architecture uses Claude to resolve customer support tickets by invoking database lookup and refund tools. During execution, the model frequently makes redundant API calls for the same user ID within a single turn. Which orchestration pattern best resolves this issue while maintaining deterministic behavior?

Medium
63

Where should the general 'rules of engagement' for an agent (such as tone, persona, and high-level safety constraints) be placed in an Anthropic API call?

Easy
64

A developer is building a Claude-powered assistant that must answer questions using only an internal knowledge base of product manuals. The team wants to reduce fabricated answers about features that do not exist. Which approach best supports that goal?

Easy
65

An architect is building a legal research assistant using Claude 3.5 Sonnet. To ensure the model adopts a formal, authoritative tone and strictly adheres to statutory interpretations, where is the most effective location to define this persona?

Medium
66

Refer to the exhibit. The provided JSON represents a partial response from Claude. According to the Anthropic API specification for tool use, what is the mandatory next step for the orchestrator to continue the agentic loop?

Hard
67

An architect is designing an MCP server that exposes a tool to retrieve employee records from an internal HR system. The tool accepts a 'department' parameter. To prevent the model from retrieving records outside the user's authorized departments, the architect wants to enforce access control at the MCP layer. Which approach best ensures that the model cannot bypass authorization?

Hard
68

In a scenario where a project-specific .clauderc file and a global ~/.clauderc file both define a 'model' setting, which one takes precedence when Claude Code is launched from that project directory?

Medium
69

An architect is designing an MCP server that exposes tools for a customer relationship management (CRM) system. The tools include 'get_customer', 'update_customer', and 'delete_customer'. The architect wants to ensure that tool invocations are properly authorized and audited. Which two design elements should be included in the MCP server implementation? (Choose two.)

Hard
70

You are designing a customer support assistant that must always respond in a calm, professional tone. During testing, you notice that after several turns of heated user complaints, Claude's replies become abrupt and less empathetic. You need the most reliable way to prevent this tonal drift throughout a long conversation. What should you do?

Medium
71

An architect is concerned about prompt injection attacks targeting an MCP tool. Which strategy provides the strongest defense?

Medium
72

A travel-booking agent built on the Claude Messages API handles multi-turn conversations. During a session, the agent calls a search_flights tool and receives results. On the next user turn the agent suddenly invents a flight that was never returned by any tool. The architect reviews the request payload and sees that the prior assistant turn containing the tool_use block and the following user turn containing the tool_result block were both sent back to the API. What is the most likely cause of the hallucinated flight?

Medium
73

An application requires Claude to consistently return JSON data for a configuration parser. Which technique most effectively ensures the model adheres to a specific schema?

Medium
74

An architect is reviewing an MCP server's tool catalog before release. The team wants to reduce the chance that Claude selects the wrong tool when several tools have overlapping purposes, and to make failures easier to diagnose. Which two changes best support those goals? (Choose two.)

Medium
75

An architect is designing a prompt that asks Claude to analyze a contract and return a risk rating plus supporting clauses. The response must be machine-readable and include a confidence score. Which design most reliably produces both a rating and a confidence score in a single response?

Hard
76

A platform team maintains a shared monorepo. A developer runs Claude Code and wants the tool to automatically treat every file under `/infra/terraform/` as read-only for all engineers, without relying on each person to remember a flag. Where should this restriction be declared so it applies to everyone who opens the repo?

Medium
77

In the context of the Model Context Protocol (MCP), what is the primary role of an 'MCP Host' application?

Easy
78

What is the primary purpose of the 'claude_config.json' file in a local project?

Easy
79

A data-engineering team uses Claude to normalize product descriptions into a fixed set of attributes. Their few-shot examples all come from the electronics catalog, and accuracy is high there, but when the same prompt is applied to apparel listings the model mislabels attributes. They want to improve apparel accuracy without degrading electronics results. Which approach best addresses the problem?

Medium
80

An architect is exposing an MCP server whose 'get_account_balance' tool must never be invoked until the client has completed an OAuth token exchange, and the server must also advertise that this tool is unavailable to anonymous sessions. Which MCP capability should the architect implement to satisfy both requirements?

Hard
81

An architect notices that an agent using Claude 3.5 Sonnet frequently 'hallucinates' tool arguments when the tool schema is very large (over 50 parameters). What is the most effective architectural change to improve tool call accuracy?

Medium
82

An application uses Claude 3.5 Sonnet to summarize legal documents. Occasionally, the model hallucinates clauses not present in the source text. What is the most effective architectural approach to ground the model's output?

Medium
83

A financial-reporting agent must extract figures from quarterly filings and populate a downstream ledger. Auditors require that every extracted number be traceable to its source. Which design most directly satisfies the traceability requirement?

Hard
84

You are architecting a customer-support assistant that uses Claude with a 200K-token context window. Each session accumulates roughly 40K tokens of chat history, and you also inject a 30K-token product manual on every turn. Latency has become unacceptable because the full payload is re-sent each call. Which change best reduces latency while preserving the assistant's knowledge of earlier turns?

Medium
85

When implementing a Tool Use (function calling) loop with Claude, which TWO steps are required for the application to successfully complete a multi-step task involving external data?

Medium
86

An architect is designing a Claude-based contract review tool. Because contract clauses are long and interdependent, the team plans to use extended thinking to improve reasoning quality. Which TWO practices should the architect follow to use this capability correctly? (Choose two.)

Hard
87

In a high-stakes agentic workflow, such as one that executes financial trades, why is 'Human-in-the-Loop' (HITL) considered a critical architectural component?

Medium
88

A developer new to Claude Code wants to quickly see a list of all available slash commands in their current session. Which command should they use?

Easy
89

You are architecting a customer-support assistant that maintains a persistent knowledge base across sessions. After several weeks, users report that the assistant confidently cites policy details that were never in the source documents. Which architectural change most directly addresses this reliability failure?

Medium
90

A platform team wants Claude Code to be allowed to run only a specific set of safe Bash commands (for example, `npm test` and `git status`) without prompting, while still blocking arbitrary shell commands. They want this policy applied automatically to every developer who clones the repository. Where should they define this allowlist so it is version-controlled and enforced for the whole team?

Hard
91

When designing a multi-agent system where Claude acts as a 'Router,' how does the 'Lost in the Middle' phenomenon specifically impact context reliability, and how should it be mitigated?

Hard
92

When designing a prompt for high-reliability JSON extraction from unstructured medical reports, which THREE strategies are considered best practices for Anthropic models?

Hard
93

A consultant is preparing a Claude Code setup for a client whose repository must never send secrets to the model. The consultant wants to block reads of `.env` files and any file under a `secrets/` directory at the tool level. Which configuration achieves this?

Medium
94

A developer wants to build a simple agent that can answer questions about a company's internal documentation. The developer implements a 'Router' that chooses between a 'Search' tool and a 'Direct Answer' prompt. What is the primary advantage of this router-based approach over a single prompt?

Easy
95

A developer wants to ensure that Claude Code automatically uses a specific set of custom instructions for every session in a particular repository, without requiring manual invocation. They want these instructions to be version-controlled and applied to all team members. Which approach should they take?

Hard
96

When designing an autonomous agent loop using Claude 3.5 Sonnet that involves tool use, which TWO strategies are most effective for preventing the agent from entering an infinite loop when a tool returns an error?

Hard
97

You are designing a long-running analytical assistant that must operate over a corpus far larger than any single context window, spanning many sessions. Which TWO architectural practices best preserve reliability across sessions? (Choose two.)

Hard
98

Refer to the exhibit. In a parallel tool-use scenario where Claude generates three such blocks in a single response, how should the orchestration layer handle the 'tool_result' messages to ensure Claude can correctly process the outputs?

Hard
99

Which of the following is the recommended approach for handling PII (Personally Identifiable Information) in prompts?

Easy
100

A data scientist is adjusting generation parameters for a creative writing application. They want to ensure a wide variety of vocabulary while preventing the model from selecting highly improbable words. Which TWO parameters should be adjusted?

Medium
101

A research agent must answer questions that require looking up several unrelated facts, such as the population of three different cities. The architect observes that Claude frequently emits one search tool call, waits for the result, then emits the next, repeating until all facts are gathered. This serial pattern roughly triples latency versus what the workload should allow. Which change most directly enables the model to request all three independent lookups in a single assistant turn?

Medium
102

You are iterating on a prompt that summarizes technical articles. The summaries are sometimes too long and sometimes miss the required 'key_takeaways' section. You want to diagnose whether the problem is the instruction wording or the input content. Which practice best supports systematic prompt iteration?

Medium
103

Which 'stop_reason' does the Anthropic API return when the model has finished its current thought process and is waiting for the user to provide the results of a tool execution?

Medium
104

The Model Context Protocol (MCP) defines three primary primitives that servers can expose to clients. Which THREE of the following are the core primitives of MCP?

Medium
105

An architect is building an MCP server whose tool returns large tabular results, sometimes several megabytes. Early testing shows the model truncates or ignores the data and occasionally exceeds context limits. The architect wants the model to reason over the full dataset without losing fidelity. Which design should the architect choose?

Hard
106

When designing an MCP tool, why is it important to define a clear 'description' for every property in the 'inputSchema'?

Easy
107

You are a Claude Code user working on a Python project. You want to define a custom slash command named /test that runs your project's test suite. Where should you place the command file so that it is available only within this project?

Medium
108

A company wants to ensure their Claude-powered application remains reliable even when Anthropic releases new model versions. Which TWO strategies should the architect implement?

Medium
109

Refer to the exhibit showing a configuration for Claude 3.5 Sonnet. Which architectural requirement is strictly necessary when implementing this 'computer_20241022' tool in a production environment?

Hard
110

You notice that your prompt, which works perfectly with Claude 3.5 Sonnet, fails when you switch to Claude 3 Haiku. What is the most likely reason?

Hard
111

How does Claude Code handle large repositories that exceed the standard context window size during initial indexing?

Hard
112

What is the recommended method for handling large tool outputs in MCP?

Medium
113

A document-processing agent extracts structured fields from scanned contracts and must return a JSON object matching a strict schema. The agent also calls an OCR tool when text is unreadable. Which TWO design choices best ensure reliable, schema-valid output? (Choose two.)

Hard
114

A team is configuring Claude Code for a new project. They want to enforce specific tool permissions to prevent Claude Code from executing potentially dangerous shell commands without approval. Which two configuration approaches should they use? (Choose two.)

Hard
115

A support agent has two tools: `search_knowledge_base` and `escalate_ticket`. For simple questions it should answer directly; for unresolved issues it should escalate. Which `tool_choice` setting best supports this behavior?

Easy
116

An engineer repeatedly types the same multi-step instruction: run the unit tests, then fix any failing assertions, then re-run the suite until it passes. They want to invoke this reliably with a short, memorable name in Claude Code. What should they create?

Medium
117

An architect is building a customer-support agent that calls a `lookup_order` tool. The tool occasionally returns HTTP 503 errors during peak hours. The architect wants the agent to recover from transient failures without human intervention. Which approach best fits Claude's agentic tool-use loop?

Medium
118

An architect is evaluating an agent's performance using 'Trajectory Evaluation.' Which TWO aspects of the agent's behavior are most effectively measured by this method?

Medium
119

You are building an agent that uses tool calls to interact with an external API. The agent is failing to select the correct tool. What is the most effective way to improve the agent's tool selection performance?

Hard
120

Refer to the exhibit. Why might the model struggle with this request?

Easy
121

Refer to the exhibit. The model output is inconsistently professional. What is the best architectural improvement?

Medium
122

Refer to the exhibit. The model output is a list, but it also includes introductory text like 'Here is the summary you requested:'. How can you ensure the output contains ONLY the list?

Medium
123

You are architecting a system that uses Claude to answer legal questions based on a corpus of case law. To maximize reliability and minimize hallucinations, which TWO practices should you implement? (Choose two.)

Hard
124

An architect is reviewing an MCP server that exposes a tool to create support tickets. The tool currently returns a plain text confirmation. The architect wants to improve how the model and client application consume the result. Which two changes should the architect make? (Choose two.)

Medium
125

A platform team ships a Claude-based service that classifies incoming tickets into one of eight categories and returns a JSON object with category and confidence. In production they observe two failure modes: the model sometimes returns a category outside the eight allowed values, and occasionally returns confidence as the string "high" instead of a number. Which TWO changes most directly reduce these failures while keeping the pipeline automated? (Choose two.)

Hard
126

A developer wants Claude Code to automatically run the project's linter after every file edit, but only for files inside the `src/` directory. Where should this be configured so the behavior applies to all contributors of the repository?

Medium
127

Refer to the exhibit. You are using few-shot prompting to guide the model's extraction behavior. What is the purpose of including this specific interaction in your prompt?

Medium
128

An architect is designing an MCP server that will be used by multiple Claude clients, each with different tool requirements. The server currently exposes all tools to every client. The architect wants to reduce the risk of a client accidentally invoking a tool it should not use, while keeping the server maintainable. Which approach best fits this goal?

Hard
129

A travel assistant maintains a long conversation with a user over several days. The system prompt defines a strict booking policy, but by the fortieth turn Claude begins offering refunds that violate that policy. The team wants to keep the full history for continuity while preventing policy erosion. Which architecture best addresses this?

Medium
130

A company wants to prevent Claude from answering questions outside the scope of their internal knowledge base. Which prompt engineering strategy is most effective for enforcing this constraint?

Medium
131

An agent that reconciles invoices is failing intermittently. Logs show it sometimes calls `approve_payment` before `verify_vendor`, even though the system prompt lists `verify_vendor` first. The agent has 12 tools available. Which change most directly reduces this ordering violation?

Hard
132

An architect is hardening an agent that uses tools to read internal wikis and send Slack messages. Which TWO practices most directly reduce the risk that untrusted wiki content causes the agent to take unauthorized actions? (Choose two.)

Medium
133

Which of the following is an advantage of using XML tags in Anthropic prompts?

Easy
134

When troubleshooting an issue where Claude Code is failing to suggest relevant file modifications, which workflow step should be performed first?

Medium
135

A development team is building an internal document Q&A tool. They want Claude to answer strictly from uploaded policy PDFs and to decline questions the documents do not cover. Which prompt structuring technique best supports this requirement?

Easy
136

You are designing a prompt for Claude to convert a customer email into a JSON object with fields "customer_name", "order_id", and "issue_summary". During testing, about 15% of outputs include the JSON inside markdown code fences (```json ... ```) or add a friendly sentence before the JSON. You need the raw JSON object only, with no extra text, every time. Which approach is most effective?

Medium
137

An agent must classify incoming support tickets and then route each to one of four specialized sub-agents. The architect notices the router sometimes dispatches the same ticket to two sub-agents. Which design change most directly prevents duplicate dispatch?

Hard
138

A team is using Claude to generate a structured incident report from raw log excerpts. The report must contain a 'summary' paragraph, a 'root_cause' field, and a 'remediation' list. During review, engineers find that remediation steps sometimes appear inside the summary paragraph, and summaries sometimes contain root-cause speculation. Which technique most reliably keeps each piece of content in its designated section?

Medium
139

Which of the following describes the 'Sandwich' prompting technique?

Medium
140

Which TWO practices are recommended when defining tool schemas (JSON descriptions) for an agentic system to improve reliability and reduce errors?

Medium
141

You are building a data extraction pipeline using Claude 3.5 Sonnet. You need the model to return a valid JSON object representing user feedback metrics. Which technique best ensures the model adheres to your specific schema?

Medium
142

A developer is extracting line items from invoices. The prompt includes a schema and examples, yet Claude occasionally invents field names not in the schema. Which change most directly prevents hallucinated field names?

Medium
143

In an Evaluator-Optimizer agentic workflow, which THREE components are essential for creating a successful iterative refinement loop for high-quality content generation?

Hard
144

An architect is designing an agentic workflow on the Anthropic Messages API where a single Claude model must first break a user goal into ordered subtasks, then execute each subtask with tools, and finally synthesize a final answer. The architect wants to minimize the number of API round trips while still giving the model a chance to observe each tool result before deciding the next action. Which orchestration approach best satisfies these requirements?

Hard
145

An architect is designing a Claude agent that must autonomously handle customer disputes end to end. The agent may issue refunds up to $200, but any refund above that amount must be approved by a human reviewer. The system must not block the entire workflow while waiting for approval. Which orchestration pattern best satisfies these constraints?

Medium
146

A production agent uses the Claude Messages API with tool use to manage cloud resources. During a run, Claude returns a response whose stop_reason is "tool_use" containing three tool_use content blocks that are fully independent of one another. The orchestrator loops and processes them one at a time, executing each tool and sending a separate user message containing a single tool_result block before each next call. Runs that used to complete in seconds now take minutes and occasionally exceed the request timeout. What is the most likely architectural cause of the slowdown?

Medium
147

A nightly job uses Claude to classify 500,000 support tickets into categories. The job runs for several hours and results are consumed the next morning; nobody is waiting on individual responses. Which approach is most appropriate for controlling cost and rate-limit pressure?

Easy
148

When designing a prompt, why is it important to define a clear persona for the model?

Easy
149

A security-conscious architect is standardizing how Claude Code is configured across a large engineering organization. Which TWO practices best reduce the risk introduced by project-level configuration that arrives with cloned repositories? (Choose two.)

Hard
150

A financial analyst uses Claude to generate quarterly earnings summaries from raw financial data. The summaries must include precise numerical figures. The analyst notices that Claude occasionally transposes digits when copying numbers from the input. Which architectural change is most effective for reducing this error?

Hard
151

A developer is building a contract-analysis pipeline. The prompt instructs Claude to return JSON with fields 'party_a', 'party_b', and 'effective_date'. In testing, Claude sometimes wraps the JSON in a Markdown code fence or adds a trailing comment, causing json.loads to fail. Which approach best ensures the response can be parsed directly as JSON?

Medium
152

An architect is designing an MCP server that retrieves real-time inventory levels from a legacy SQL database. The model needs to perform a partial update on specific stock quantities. Which design approach ensures the highest reliability and adherence to the Model Context Protocol standards?

Medium
153

How should a team handle multiple developers using Claude Code on the same shared repository?

Medium
154

A legal-tech team runs a Claude-powered contract review service in production. Compliance auditors require a reproducible record of every model response for any given input, but the team also wants to adopt newer model improvements without redeploying code. They want to keep prompt text unchanged and avoid maintaining provider-specific SDK logic. Which approach best satisfies both the reproducibility requirement and the adoption of newer model improvements?

Medium
155

You are processing user input that might contain malicious injection attempts. Which architectural layer is best suited to handle this?

Hard
156

A security audit of an agentic architecture reveals a risk of 'Indirect Prompt Injection' where the agent reads a malicious email and then uses its 'delete_account' tool on itself. Which architectural change best mitigates this risk?

Hard
157

A retrieval-augmented pipeline answers questions about internal policies. Retrieved chunks are inserted into the prompt, but the model sometimes blends facts from two similar policies into one incorrect answer. Evaluation shows retrieval precision is high and the correct chunk is always present. Which architectural change most directly reduces this blending?

Hard
158

An enterprise application uses Claude to summarize complex legal documents. The system occasionally hallucinates specific clause numbers when the context window contains multiple similar contracts. Which strategy most effectively improves factual reliability for specific data extraction?

Medium
159

When designing a multi-step tool process, which architecture most effectively prevents the model from getting stuck in an infinite loop?

Medium
160

Which component is responsible for executing the logic associated with an MCP tool?

Easy
161

A new engineer on a team wants to see every slash command currently available in their Claude Code session, including custom commands the team has added, before starting a large refactor. Which action should they take?

Easy
162

A team wants to optimize their Claude Code workflow for a large monorepo. Which TWO of the following actions improve performance and context relevance?

Hard
163

Refer to the exhibit. This technique, where the assistant's response is started with a specific tag, is known as 'prefilling.' How does this technique primarily improve reliability for structured output?

Hard
164

An agent is designed to summarize long documents by first splitting them into chunks and then calling a 'summarize_chunk' tool for each part. What is the most efficient orchestration strategy to minimize the total time taken for this task?

Medium
165

A customer support platform uses Claude to answer policy questions by retrieving relevant help-center articles and inserting them into the prompt. Agents report that for questions whose answer spans two separate articles, Claude often cites only one article and omits the other. Logs show both articles were retrieved and included. Which change to the context assembly is most likely to resolve this?

Medium
166

When designing prompts, what is the 'Persona' strategy and how does it improve performance?

Medium
167

An architect is building an MCP server that exposes a tool for querying a customer relationship management (CRM) system. The tool accepts a free-form text parameter called 'query' and returns matching customer records. During testing, the model frequently sends malformed queries that cause the CRM API to return errors, and the model then hallucinates customer data. Which change to the MCP tool definition is the most effective way to constrain the model's input and reduce these errors?

Medium
168

You are designing a system to process customer support tickets. You want to ensure Claude provides accurate summaries and extracts the priority level. Which TWO strategies should you implement to improve output reliability?

Medium
169

An architect is defining an MCP tool that returns weather data for a given city. The tool's output schema currently returns a free-text string. The architect wants to improve the model's ability to use the data in subsequent reasoning. What is the best change to the tool's output definition?

Easy
170

A team runs a Claude agent that orchestrates a multi-step data pipeline. The agent uses the Messages API and passes the full conversation history on every request. After the history grows beyond roughly 180,000 tokens, the agent begins to fail intermittently with context length errors even though the configured model supports 200,000 tokens. Logs show the agent appends each tool result verbatim, including large JSON payloads from a database tool. Which change best resolves the failures while preserving the agent's ability to reason over prior steps?

Hard
171

An architect is designing a multi-turn contract-review assistant. During long sessions, earlier redline decisions get contradicted in later turns because the model loses track of prior conclusions. The team cannot shorten sessions. Which approach best preserves decision consistency across the full session?

Hard
172

Refer to the exhibit. Your API call is returning incomplete JSON because it hits a token limit. What is the most robust architectural fix for this error?

Hard
173

A developer wants Claude to summarize a long support thread and return the result as a JSON object with a single field "summary". They want to minimize the chance that Claude adds commentary outside the JSON. Which is the most direct Anthropic-recommended technique to apply?

Easy
174

A platform team is building a Claude-powered service that returns structured records to a downstream database. During testing, roughly 4% of responses include a friendly sentence before the JSON, and another 3% omit a required field entirely. Which TWO changes most directly reduce these failure modes? (Choose two.)

Hard
175

A support-engineering team is prototyping a Claude-powered assistant that must always reply in a consistent tone and never invent refund policies. They want a single, reusable instruction block that applies to every conversation regardless of the user's message. Where should this persistent behavioral guidance be placed in a Messages API request?

Easy
176

An architect is configuring a Claude agent that must decide when to search an internal knowledge base versus when to answer directly from its own knowledge. The team wants the agent to retrieve only when the question references internal policies, products, or procedures. Which configuration most directly supports this decision?

Easy
177

A legal team uses Claude to summarize case files. They require that the summary never includes personally identifiable information (PII) such as names, addresses, or phone numbers. The case files are lengthy and contain PII in various formats. Which approach is most reliable to ensure PII is not included in the summary?

Hard
178

Refer to the exhibit. A developer is implementing the provided JSON structure to optimize an HR chatbot. What is the primary reliability benefit of using the 'cache_control' parameter in this context?

Medium
179

An MCP server exposes an `execute_task` tool that can run arbitrary shell commands in a sandbox. During evaluation, the architect observes that the model sometimes calls the tool with a command that succeeds but produces no useful output, then calls it again with a nearly identical command, repeating several times. Which design change most directly addresses this loop behavior?

Hard
180

An architect is designing an MCP server that will be used by multiple client applications, some of which support only a subset of MCP capabilities. The architect wants tools to remain usable across clients without requiring per-client server forks. Which design principle should guide the server implementation?

Hard
181

An architect is onboarding a legacy service and wants Claude Code to build context quickly. The repository has 40,000 files, most of them generated build artifacts and vendored dependencies, and the team wants exploration to stay focused on first-party source. Which approach best keeps Claude Code's automatic context gathering efficient here?

Hard
182

An architect is designing a tool for Claude to interact with a corporate database. The tool needs to retrieve employee records by department. Which approach to naming and describing the tool and its parameters will most likely result in the highest model accuracy and reliability?

Medium
183

Which TWO of the following practices should be implemented to ensure Claude Code operates securely within a production-adjacent environment?

Hard
184

How should an MCP server communicate a non-recoverable error to the client?

Medium
185

An application uses Claude 3.5 Sonnet to summarize technical logs. Users report that the model occasionally ignores specific error codes when logs exceed 50,000 tokens. Which strategy best ensures consistent reliability for long-context tasks?

Medium
186

Which of the following describes the correct relationship between Claude Code's indexing process and the file system?

Hard
187

What is the primary advantage of using a dedicated MCP server over embedding tool logic directly into the application code?

Medium
188

Your model is consistently ignoring specific safety formatting rules during long multi-turn conversations. What is the most robust architectural solution?

Medium
189

An orchestration layer runs a research agent that can call a web_search tool and a summarize_document tool. The architect wants the agent to keep iterating until it has gathered enough sources, but must cap total model calls and total tool executions to control cost and prevent runaway loops. Which approach best enforces those caps while preserving the agent's ability to decide when it is done?

Hard
190

A developer wants Claude to generate a list of items but stop immediately after the fifth item is completed to save on token costs. Which configuration change is most appropriate?

Easy
191

An agentic system is designed to use a search tool to find information. During testing, the agent occasionally gets stuck in a loop, repeatedly calling the same search tool with the same parameters. What is the most effective way to prevent this behavior programmatically?

Medium
192

Which command is used to start a new Claude Code session in the current directory and begin indexing the local files?

Easy
193

A developer notices that Claude occasionally provides different answers to the same technical question during automated testing. Which parameter should be adjusted to maximize the reliability and reproducibility of these responses?

Easy
194

A research agent must query three independent sources (a database, a web search API, and a file store) to assemble a report. Latency matters, and the sources do not depend on each other. Which orchestration pattern should you use with Claude's tool use to minimize wall-clock time?

Medium
195

A company is deploying an agent that interacts with a sensitive financial database. To maintain security and accuracy, the architect wants to ensure that any 'delete' or 'transfer' actions are reviewed by a human before execution. Which agentic pattern should be used?

Medium
196

When designing a multi-turn conversation, which practice best maintains context reliability over long interactions?

Medium
197

A team wants Claude to call an internal `create_invoice` tool only after the user has explicitly approved the line items. Which mechanism should the architect use to enforce this gate?

Easy
198

You are building an application that uses the Anthropic API to classify customer support tickets into exactly one of five categories: Billing, Technical, Account, Feature Request, or Other. You require the output to be a JSON object with a single field "category" and a value from that list. During testing, you notice that for ambiguous tickets the model sometimes returns a different key name, such as "ticket_category", or wraps the JSON in markdown code fences, causing parsing failures. You need to enforce the schema reliably while keeping latency and cost low. Which approach is most effective?

Hard
199

Which prompting technique involves providing Claude with a few examples of the desired input-output pairs to improve performance on a specific task?

Easy
200

A developer is using Claude to classify customer feedback into categories: 'bug', 'feature request', or 'complaint'. The developer wants to ensure consistent output format that can be easily parsed by a downstream system. Which approach is most appropriate?

Easy
201

A financial analyst wants Claude to extract the total amount due from each invoice in a batch of 300 PDF-extracted text blobs, returning results as JSON with fields "invoice_id", "amount_due", and "currency". Some invoices list multiple line items and a subtotal, while others show only a single grand total. Which prompt design most reliably produces consistent, machine-parseable extraction across all invoices?

Medium
202

You maintain a production pipeline where Claude extracts line items from scanned invoices and must return them as strict JSON conforming to a supplied schema. Intermittent outputs include a short apology sentence before the JSON object, which breaks your downstream parser. Logs show the preamble appears only when the OCR text contains contradictory totals. Which change most reliably eliminates the preamble while preserving extraction quality?

Hard
203

A developer is working on a legacy monorepo where the Claude Code CLI's auto-generated commit messages keep mixing unrelated changes from multiple microservices. To improve this, the developer wants Claude Code to read a project-specific file that describes the commit message format and scope conventions. Which file should the developer create at the repository root to provide this persistent, team-shared guidance?

Medium
204

An architect is building a Claude agent that must extract structured data from scanned invoices and then call an ERP API for each invoice. During early testing, the agent occasionally calls the ERP API with incomplete fields because it invents missing values. The architect wants to prevent these hallucinated field values from reaching the ERP. Which approach best addresses this requirement using the Anthropic Messages API?

Medium
205

When an application requires high reliability, why is it recommended to use a fixed version (e.g., claude-3-5-sonnet-20240620) rather than a dynamic alias?

Medium
206

When designing a multi-agent system, what is the primary benefit of the 'Orchestrator-Worker' pattern compared to a single-agent architecture with 20 tools?

Easy
207

Refer to the exhibit. A developer sees this error log in the terminal output. What is the most likely cause of this failure in the Claude Code workflow?

Medium
208

In the context of agentic orchestration, what is the primary purpose of a 'ReAct' (Reason-Act) loop?

Easy
209

A developer is building a structured output pipeline where Claude must return a list of support tickets, each with 'id', 'priority', and 'category'. The pipeline must be robust against malformed responses. Which TWO practices most directly improve the reliability of this structured output? (Choose two.)

Hard
210

Which of the following is the most important factor in maintaining reliability when using Claude?

Easy
211

A developer is building a chatbot that must never reveal internal system instructions. During testing, a user asks, 'What is your system prompt?' and Claude begins to repeat the instructions verbatim. Which approach is most effective to prevent this leakage?

Easy
212

An architect is designing an MCP server that wraps a ticketing system. The design must let Claude call tools safely and must keep tool definitions maintainable as the API grows. Which two practices should the architect apply? (Choose two.)

Hard
213

An architect is defining a 'System Prompt' for a legal analysis tool. Which TWO practices are considered best for ensuring the model maintains a reliable persona and adheres to safety constraints throughout a long conversation?

Medium
214

Which TWO of the following are primary benefits of using the Model Context Protocol (MCP) over a proprietary REST-based tool integration?

Hard
215

A claims-processing agent must extract structured fields from scanned documents, then decide whether to auto-approve, request more evidence, or escalate to a human. The architect wants deterministic, auditable control over which branch executes rather than letting Claude narrate the decision. Which TWO design choices best achieve that? (Choose two.)

Hard
216

An architect is integrating an MCP server with a legacy inventory system that exposes a SOAP API. The MCP server must translate tool calls into SOAP requests. The SOAP API is slow and occasionally returns faults. Which design choice best ensures that the model can recover gracefully from SOAP faults without hallucinating inventory data?

Medium
217

A developer is prompting Claude to classify 5,000 customer support tickets into one of six fixed categories. The first 200 classifications look correct, but the developer notices that category labels come back with inconsistent capitalization and occasional trailing punctuation. What is the simplest change that makes the labels uniform and directly usable as database keys?

Easy
218

An enterprise architect is designing a customer support bot that needs to reference a 50,000-token internal manual for every query. To ensure high reliability and low latency while managing costs, which Claude feature should be prioritized for this specific workload?

Medium
219

You are designing a prompt that asks Claude to review a pull request and return findings in a strict XML structure with a severity attribute for each finding. Your parser depends on the structure being consistent. Which TWO techniques most directly improve the consistency of the XML output? (Choose two.)

Medium
220

An architect is designing an MCP server that exposes several tools for a document management system. The tools include 'create_document', 'update_document', 'delete_document', and 'search_documents'. The architect wants to minimize the risk of the model accidentally invoking destructive tools during exploratory or read-only tasks. Which two design choices should the architect implement? (Choose two.)

Hard
221

An organization is transitioning from individual, hard-coded tool integrations to a Model Context Protocol (MCP) architecture. Which TWO benefits will they most likely realize from this change?

Medium
222

An architect is designing a multi-step research agent that must gather facts, draft a report, and revise it based on a critique. The team wants to reduce the blast radius of mistakes and keep each stage's context focused, rather than letting one long conversation accumulate every intermediate result. Which TWO design choices best support this goal? (Choose two.)

Medium
223

An architect is defining the input schema for an MCP tool that schedules a meeting. The schema currently accepts a free-form string for the start time, and the model frequently sends ambiguous values such as "next Tuesday afternoon." Which change best improves reliability?

Easy
224

To reduce the risk of Claude hallucinating information when it doesn't know the answer, what instruction should be added to the prompt?

Easy
225

A financial services firm is using Claude 3.5 Sonnet to analyze quarterly earnings reports that exceed 150,000 tokens. Which TWO strategies are most effective for maintaining high reliability when the model must extract specific data points from the middle of this large context?

Hard
226

A large-scale agentic system uses Claude to manage a supply chain. The agent must interact with a legacy SQL database, a modern REST API, and a real-time streaming service. What is the most robust way to handle tool definitions in this heterogeneous environment?

Hard
227

A document-processing agent reads contracts and must extract a list of payment milestones, each with an amount, currency, and due date. Downstream billing systems cannot tolerate hallucinated fields, and the extraction must be validated programmatically before anything is written to the database. The architect wants Claude to emit data that can be parsed and checked with certainty rather than relying on post-hoc regex over prose. Which approach best satisfies this requirement?

Hard
228

You are architecting a Claude-based system that answers questions about internal policies. The knowledge base is updated frequently, and you need to ensure answers are accurate and traceable to source documents. Which TWO practices should you implement to maximize reliability and auditability? (Choose two.)

Medium
229

A developer wants to use Claude Code to perform a large refactor across multiple files. What is the most efficient workflow to ensure the model has the necessary context without manual file-by-file reading?

Medium
230

A financial services company is building a customer support assistant that needs to handle loan applications, account balance checks, and general FAQ queries. Which orchestration pattern should be used to minimize token usage while ensuring that the model uses specific system instructions for each distinct task?

Medium
231

Refer to the exhibit. An architect is configuring an MCP server to provide read-only access to a SQLite database. What is the primary reason for using the 'env' field in this configuration?

Hard
232

An engineering team wants to customize Claude Code behavior across their enterprise repository by enforcing specific project-level guidelines and system prompts. Where should the lead architect place these configuration directives so that Claude Code automatically detects and applies them upon initialization in the workspace root?

Medium
233

Refer to the exhibit. The model fails to return accurate data when the user asks for metrics over a 'five minute' interval. What is the most likely cause?

Hard
234

An architect is onboarding a new developer to a repository that uses Claude Code. The developer wants to understand how the tool determines which project-specific instructions to load automatically at the start of a session. The repository already contains a CLAUDE.md file at the root. What is the correct behavior of Claude Code regarding this file?

Medium
235

Which of the following describes the purpose of the 'resources' feature in MCP?

Easy
236

An architect is reviewing an MCP server where one tool returns a 2 MB JSON payload of raw database rows. The model's responses have become slow and occasionally drop details from the middle of the payload. Which change best addresses the observed behavior while preserving the tool's usefulness?

Medium
237

An architect is onboarding a large team to Claude Code and wants to standardize how project-level configuration is shared through version control so that every developer gets the same behavior. Which two practices should the architect adopt? (Choose two.)

Hard
238

During an MCP tool invocation, a user asks Claude to look up an order by its ID. The MCP server's tool handler returns a successful result, but the response payload is 12 MB of raw JSON containing nested line items, shipping events, and audit metadata. Claude's reply to the user is vague and omits key order details. Which change to the MCP tool design best addresses this?

Medium
239

When implementing the 'Evaluator-Optimizer' pattern for code generation with Claude 3.5 Sonnet, which TWO components are essential for the feedback loop to be effective?

Medium
240

Refer to the exhibit. What is the correct next step for the application developer to ensure the agent continues its task?

Medium
241

You are designing a chatbot that maintains a long conversation with users over many turns. You notice that after 50 turns, Claude starts forgetting details mentioned earlier, such as the user's name and preferences. Which architectural approach best addresses this issue?

Medium
242

An architect is building an MCP server that exposes a tool named `fetch_weather`. The tool's input schema currently defines `location` as a string with no description. During testing, the model frequently sends postal codes for cities outside the supported region, causing upstream API errors. Which change to the tool definition most directly improves the model's ability to supply valid inputs?

Medium
243

An agent tasked with data analysis repeatedly fails because the 'tool_result' it receives is too large for the context window, causing subsequent calls to truncate. What is the most effective architectural adjustment to resolve this?

Medium
244

Which THREE strategies are effective for reducing hallucinations in RAG (Retrieval-Augmented Generation) systems?

Hard
245

An architect is designing a Claude agent that must coordinate a research subagent and a summarization subagent to produce a market brief. The research subagent gathers sources, and the summarization subagent condenses them. The architect wants to avoid the orchestrator losing track of which subagent produced which artifact across many turns. Which TWO architectural practices best support reliable artifact tracking and handoff? (Choose two.)

Hard
246

An architect is designing an agentic system to handle complex software engineering tasks. The system must break down a high-level requirement into specific coding milestones, assign those milestones to specialized sub-agents, and synthesize the results. Which orchestration strategy is most appropriate?

Hard
247

A platform team wants Claude Code to automatically run the project's formatter after every file edit made by the assistant, so that generated code always matches the repository style without manual intervention. Which configuration should the team use?

Hard
248

When designing tools for a highly regulated environment, what is the most important architectural goal?

Hard
249

A financial analyst uses Claude to extract key figures from quarterly earnings reports. The reports often contain tables with merged cells and footnotes. The analyst reports that Claude sometimes misattributes a number to the wrong quarter. You need to improve reliability without changing the model. Which technique is most likely to reduce misattribution?

Hard
250

During an interactive session, Claude Code identifies a bug and proposes a fix that requires executing a shell command to install a new dependency. How does the default permission model handle this request?

Medium
251

Which approach is most effective for improving Claude's reliability when it needs to perform complex, multi-step mathematical reasoning within a single response?

Medium
252

You are using the Anthropic Claude API in a customer-support application. Your prompt asks Claude to classify each incoming ticket into exactly one of four categories and return the result. Occasionally, Claude adds a friendly sentence before the category, which breaks your parser. Which change most directly prevents this extra text?

Easy
253

A developer needs to integrate a third-party tool that provides real-time logs to Claude Code. Which configuration section in the .clauderc file is responsible for defining these external integrations?

Medium
254

You are building a customer support assistant using the Claude API. The assistant must answer questions based solely on a provided knowledge base of 20 product manuals. You want to ensure that when the answer is not in the knowledge base, Claude explicitly states 'I don't know' rather than fabricating an answer. Which technique is most reliable for achieving this?

Medium
255

Which approach is best for handling binary data (like images) in an MCP tool integration?

Medium
256

You are building an agent that needs to summarize 50 different documents. Which orchestration approach provides the best balance between speed and the model's ability to cross-reference information between all documents?

Hard
257

What is the recommended temperature setting for an agent that primarily uses tools to perform data extraction and API calls?

Easy
258

An orchestrator is designed to handle 'Parallel Tool Use' for a travel booking agent. Which TWO conditions must be met for the architect to successfully implement this feature?

Medium
259

An engineering team is building a Claude-powered contract analyzer that must return a JSON object with a 'parties' array, an 'effective_date' string, and a 'governing_law' string. Legal reviewers report that for about one in twenty contracts, the model invents a governing law when the contract is silent. The team wants to stop fabricated values without losing valid extractions. Which approach best addresses this?

Hard
260

An MCP server exposes a `query_orders` tool whose input schema includes a `filters` object with several optional properties. The model intermittently omits required nested fields inside `filters`, and the server returns a generic 400 error. The architect wants the model to reliably produce schema-valid arguments and recover from validation failures. Which combination of MCP features should the architect implement?

Hard
261

A platform team maintains a repository where a committed .claude/settings.json grants broad Bash permissions, but an engineer needs a stricter personal policy that still allows the shared project settings for everything else. Which approach correctly applies the engineer's narrower permission policy?

Hard
262

A team uses Claude to generate release notes from git commit messages. The output must be a JSON array of objects with 'title' and 'summary' fields. The model sometimes wraps the JSON in markdown fences or adds a conversational preamble. Which approach most reliably yields parseable JSON?

Medium
263

When prompting Claude to process a large document and perform multiple tasks like summarization and sentiment analysis, what is the recommended way to separate the source text from the instructions?

Medium
264

An architect is preparing an MCP server for a code review tool. The tool 'review_code' takes a 'language' parameter and a 'code_snippet' parameter. The architect wants to ensure the model provides valid language values and that the snippet is not excessively large. Which combination of JSON Schema constraints should be applied to the tool definition?

Easy
265

An MCP server wraps a ticketing API. The API accepts a `priority` field whose valid values are `low`, `medium`, and `high`. During testing, the model occasionally sends `urgent`, and the API returns a generic 400 error. The architect wants the model to self-correct on the next turn without changing the upstream API. Which change to the MCP tool best achieves this?

Hard
266

You are building a system that must extract entities from messy transcripts. The model often misses entities at the end of the text. What is the most likely cause and architectural fix?

Hard
267

How does providing a large number of complex tool definitions in a single request impact the performance and behavior of Claude?

Medium
268

A team is exposing an existing internal REST API to Claude through an MCP server. The API requires an OAuth 2.0 bearer token per user, and the team wants each user's Claude session to act with that user's own permissions. Where should the per-user OAuth token be handled in the MCP architecture?

Easy
269

An architect is building an MCP server that exposes a tool for querying an PostgreSQL database. The tool's input schema defines a single property 'query' of type string. During testing, the model generates SQL statements that include multiple statements separated by semicolons, causing unintended data modifications. Which change to the tool design best mitigates this risk while preserving the tool's usefulness?

Medium
270

A team is using the Anthropic Messages API to extract line items from vendor invoices. They define a tool named `record_line_items` with an input_schema that requires `description`, `quantity`, and `unit_price`. In production, Claude sometimes returns a text message describing the items instead of calling the tool, especially on invoices with unusual layouts. They want to guarantee a tool call every time. Which change is most effective?

Hard
271

In the context of structured output, what is the primary benefit of 'prefilling' the assistant's response in the API call?

Medium

Frequently asked questions

What does the scenario questions domain cover on the ANTHROPIC-CLAUDE-ARCHITECT-FOUNDATIONS exam?
scenario questions questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 271 scenario questions questions in the ANTHROPIC-CLAUDE-ARCHITECT-FOUNDATIONS question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only scenario questions questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.