When researching “renewable-energy adoption,” the web-search agent returns recent statistics showing 35% adoption in 2024, while the document-analysis agent extracts an 18% adoption figure from an internal 2021 report. The synthesis agent incorrectly treats the figures as contradictory instead of recognizing that they may show growth over time. What change would best enable the synthesis agent to interpret such temporal differences correctly?
Show answerHide answer
Correct answer: ARequire subagents to include publication dates and data-collection periods in their structured outputs.
Explanation
Explanation:
The synthesis agent misinterprets temporal differences as contradictions because it lacks the necessary metadata (publication dates, data-collection periods) to understand the chronological relationship between data points. The solution must provide temporal context as structured metadata from the source agents, enabling the synthesis agent to interpret the data correctly as a trend or growth over time rather than a contradiction.
Correct Option:
A. Require subagents to include publication dates and data-collection periods in their structured outputs.
This is the most effective approach because it provides the essential temporal metadata that the synthesis agent needs to interpret the data correctly. By including publication dates and data-collection periods in the structured output from both the web-search and document-analysis agents, the synthesis agent can recognize that 2024 data and 2021 data represent different points in time. This enables it to interpret the figures as a growth trend (18% to 35% over three years) rather than a contradiction, producing a more accurate and nuanced synthesis.
Incorrect Options:
B. Configure the web-search agent to return only results published during the previous six months.
This is too restrictive and would miss valuable historical context needed for trend analysis. It also does not solve the core interpretation problem—the synthesis agent would still misinterpret temporal differences if it encounters them in other contexts. This approach limits the system's ability to produce comprehensive reports that show growth patterns, which are often the most valuable insights in research.
C. Add a conflict-resolution agent that automatically discards older data whenever a newer value exists for the same metric.
This discards valuable historical context and would incorrectly treat all older data as irrelevant. In many research contexts, historical data is essential for showing trends, growth, and context. Simply discarding older data would produce misleading reports that lack important temporal context and could miss significant patterns or anomalies.
D. Instruct the synthesis agent to treat the newest value as authoritative and place all older findings in a separate historical section.
While this is better than discarding older data, it still incorrectly elevates the newest value as "authoritative" without considering that different studies may use different methodologies, samples, or definitions. The correct approach is to present all data with their temporal context and let the synthesis agent interpret the relationship, rather than imposing a rule that the newest is always the most relevant.
Reference:
Anthropic Multi-Agent Coordination Best Practices – Recommends structured outputs with rich metadata (including dates, sources, and methodology) to enable downstream agents to perform accurate synthesis and reasoning.
BCBS 239 (Principles for Effective Risk Data Aggregation) – Highlights the importance of data lineage, including timestamps and collection periods, to ensure accurate interpretation and aggregation across different sources.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the need for transparent metadata (including data provenance and collection periods) to support ongoing monitoring and interpretation of results.
Question 22Choose 1
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.
You’re tasked with adding real-time updates to the application. This could be implemented using WebSockets, Server-Sent Events, or polling, each with different complexity, browser
support, and infrastructure requirements.
What’s the most effective way to begin this task?
Show answerHide answer
Correct answer: AUse direct execution to implement polling first, then evaluate whether to upgrade to WebSockets later.
Explanation
Explanation:
The synthesis agent misinterprets temporal differences as contradictions because it lacks the necessary metadata (publication dates, data-collection periods) to understand the chronological relationship between data points. The solution must provide temporal context as structured metadata from the source agents, enabling the synthesis agent to interpret the data correctly as a trend or growth over time rather than a contradiction.
Correct Option:
A. Require subagents to include publication dates and data-collection periods in their structured outputs.
This is the most effective approach because it provides the essential temporal metadata that the synthesis agent needs to interpret the data correctly. By including publication dates and data-collection periods in the structured output from both the web-search and document-analysis agents, the synthesis agent can recognize that 2024 data and 2021 data represent different points in time. This enables it to interpret the figures as a growth trend (18% to 35% over three years) rather than a contradiction, producing a more accurate and nuanced synthesis.
Incorrect Options:
B. Configure the web-search agent to return only results published during the previous six months.
This is too restrictive and would miss valuable historical context needed for trend analysis. It also does not solve the core interpretation problem—the synthesis agent would still misinterpret temporal differences if it encounters them in other contexts. This approach limits the system's ability to produce comprehensive reports that show growth patterns, which are often the most valuable insights in research.
C. Add a conflict-resolution agent that automatically discards older data whenever a newer value exists for the same metric.
This discards valuable historical context and would incorrectly treat all older data as irrelevant. In many research contexts, historical data is essential for showing trends, growth, and context. Simply discarding older data would produce misleading reports that lack important temporal context and could miss significant patterns or anomalies.
D. Instruct the synthesis agent to treat the newest value as authoritative and place all older findings in a separate historical section.
While this is better than discarding older data, it still incorrectly elevates the newest value as "authoritative" without considering that different studies may use different methodologies, samples, or definitions. The correct approach is to present all data with their temporal context and let the synthesis agent interpret the relationship, rather than imposing a rule that the newest is always the most relevant.
Reference:
Anthropic Multi-Agent Coordination Best Practices – Recommends structured outputs with rich metadata (including dates, sources, and methodology) to enable downstream agents to perform accurate synthesis and reasoning.
BCBS 239 (Principles for Effective Risk Data Aggregation) – Highlights the importance of data lineage, including timestamps and collection periods, to ensure accurate interpretation and aggregation across different sources.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the need for transparent metadata (including data provenance and collection periods) to support ongoing monitoring and interpretation of results.
Question 23Choose 1
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.
Your system has been running for 3 weeks and human reviewers have corrected 847 extractions. Analysis reveals a recurring pattern: when recipes use informal measurements like “a handful” or “a splash,” the model either invents specific amounts or leaves fields empty—accounting for 23% of all corrections.
How should you use this feedback to improve extraction accuracy?
Show answerHide answer
Correct answer: BAdd few-shot examples to your prompt demonstrating correct handling of informal measurements—extracting them verbatim rather than converting or omitting them.
Explanation
Explanation:
The recurring error pattern involves informal measurements—the model attempts to convert them to precise values or omits them entirely. The corrected extractions reveal the correct behavior: extract informal measurements verbatim rather than converting or omitting. The most efficient way to encode this learning is through few-shot examples that demonstrate the desired behavior for this specific edge case.
Correct Option:
B. Add few-shot examples to your prompt demonstrating correct handling of informal measurements—extracting them verbatim rather than converting or omitting them.
This is the most effective approach because few-shot examples directly teach the model the correct behavior for this specific edge case. By showing examples where "a handful" is extracted as "a handful" (not "1 cup" or omitted), the model learns the correct handling pattern. This approach requires minimal infrastructure changes, is immediately testable, and leverages the 847 corrected extractions as a training set for prompt examples without the complexity and cost of fine-tuning.
Incorrect Options:
A. Fine-tune the model on the 847 corrected extractions.
Fine-tuning is overkill for this scenario and would require significant infrastructure, expertise, and cost. It also requires careful dataset preparation and model hosting, adding operational complexity. Few-shot examples are far more efficient for addressing specific, well-defined edge cases like this one. Fine-tuning is better suited for broad, systemic improvements rather than targeted pattern fixes.
C. Implement a post-processing layer that uses pattern matching to detect informal measurement phrases in source text and automatically populate values when the extraction is empty.
Pattern matching is brittle and cannot handle the variety of informal measurement expressions ("a handful," "a splash," "a pinch," "to taste," etc.). This approach also duplicates the model's task with less intelligence and would require maintaining an ever-growing list of patterns. Moreover, it would only work when the extraction is empty, not when the model invents a specific amount—a pattern-matching fix would miss the invention case.
D. Update your JSON schema to add a "measurement_type" enum field (precise/informal).
While adding metadata can help downstream systems process data appropriately, it does not teach the model how to extract informal measurements correctly. The model would still need to know to extract "a handful" verbatim and set the measurement_type to "informal." Without examples demonstrating the expected extraction behavior, the schema change alone does not improve extraction accuracy.
Reference:
Anthropic Prompt Engineering Best Practices – Recommends using few-shot examples to teach models specific edge-case handling, especially when errors follow recurring patterns identified through human review.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of incorporating human feedback and validation results into model improvement cycles to address identified weaknesses.
Data Extraction Best Practices – Highlights that extraction systems should handle varying input formats and granularity by capturing values as they appear rather than forcing conversions that introduce error.
Question 24Choose 1
You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.
The synthesis agent completes its initial pass but flags that three key research questions remain unanswered because the web-search and document-analysis agents did not find relevant information on those specific subtopics. The coordinator currently proceeds directly to report generation, producing reports with incomplete coverage.
What change would most effectively improve research completeness?
Show answerHide answer
Correct answer: BHave the coordinator evaluate the synthesis output for gaps, then re-delegate to web search and document analysis with targeted queries before invoking synthesis again.
Explanation
Explanation:
The core problem is a rigid pipeline that proceeds to report generation despite identified knowledge gaps. The synthesis agent has already identified which three research questions remain unanswered, but the system lacks a mechanism to act on this insight. The solution must create a feedback loop where identified gaps trigger targeted follow-up research before finalizing the report.
Correct Option:
B. Have the coordinator evaluate the synthesis output for gaps, then re-delegate to web search and document analysis with targeted queries before invoking synthesis again.
This is the most effective approach because it creates an explicit feedback loop where identified gaps drive targeted follow-up research. The coordinator, upon receiving gap information from synthesis, can launch precise queries to address the specific unanswered questions. This iterative refinement continues until coverage is complete or the system determines that information is truly unavailable. This maintains the separation of concerns (specialized agents for search, analysis, and synthesis) while enabling adaptive research depth.
Incorrect Options:
A. Increase the initial breadth of queries sent to web search and document analysis to reduce the probability of missing relevant information.
While broader initial queries might reduce gaps, they are inefficient and cannot guarantee coverage of all specific subtopics. Broad queries may also retrieve irrelevant information, increasing noise in the synthesis stage. More importantly, this does not address the need for iteration—even with the broadest initial search, gaps may still be identified during synthesis that require targeted follow-up.
C. Have the report-generation agent note which research questions could not be answered, so users understand the limitations of the final output.
This simply documents the failure rather than addressing it. Users would receive incomplete reports with disclaimers, which does not achieve the goal of comprehensive, cited reports. This approach violates the system's objective of producing complete research outputs and places the burden of handling gaps on users rather than the system.
D. Give the synthesis agent direct access to web-search tools so it can autonomously fill knowledge gaps without returning control to the coordinator.
This violates the separation of concerns and creates coordination complexity. The synthesis agent would need to manage search logic, analysis, and synthesis, which is beyond its specialization. It also bypasses the coordinator's ability to manage agent lifecycle and track progress. This approach would make the system less maintainable and harder to debug, and may lead to the synthesis agent conducting undisciplined searches that degrade output quality.
Reference:
Anthropic Claude Agent SDK Documentation – Multi-Agent Coordination Patterns – Recommends feedback loops where the coordinator evaluates outputs and re-delegates to specialized agents until coverage criteria are met.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of iterative refinement and feedback mechanisms in automated decision-making systems to ensure completeness and quality.
BCBS 239 (Principles for Effective Risk Data Aggregation) – Highlights the need for systems to identify and address data gaps through established feedback and remediation processes, rather than simply documenting deficiencies.
Question 25Choose 1
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
After integrating a local MCP server providing code analysis tools (analyze_dependencies, find_dead_code, calculate_complexity), you verify the server is healthy and tools appear in the tools/list response. However, you observe that the agent consistently uses Grep to search for import statements instead of calling analyze_dependencies—even when users explicitly ask about “code dependencies.” Examining tool definitions reveals:
Built-in Grep – “Search file contents for a pattern using regular expressions.
Returns matching lines with line numbers and surrounding context.”
What’s the most effective approach to improve the agent’s selection of MCP tools?
Show answerHide answer
Correct answer: BExpand MCP tool descriptions to detail capabilities and outputs—e.g., “Builds dependency graph showing direct imports, transitive dependencies, and cycles.”
Explanation
Explanation:
The agent prefers Grep over analyze_dependencies because the tool descriptions are ambiguous and overlapping. Grep's description explicitly mentions "search" and "patterns," which strongly matches the user's query about "dependencies." The MCP tool's sparse description ("Analyzes dependency graph") does not clearly communicate its superior capability for dependency analysis, leading the agent to default to the more familiar Grep tool.
Correct Option:
B. Expand MCP tool descriptions to detail capabilities and outputs—e.g., "Builds dependency graph showing direct imports, transitive dependencies, and cycles."
This is the most effective approach because it directly addresses the root cause: inadequate tool descriptions. By expanding the description to explicitly detail what the tool does (direct imports, transitive dependencies, cycles) and what it outputs, the agent can better understand when this tool is more appropriate than Grep. The enhanced description makes the tool's specialized value clear, enabling the agent to select the right tool for the right task without requiring complex routing logic or removing useful tools.
Incorrect Options:
A. Add routing instructions to the system prompt specifying that dependency-related questions should use MCP tools rather than Grep.
While routing instructions could help, they are brittle and require explicit mapping of every possible query pattern to tool selections. This approach doesn't scale as the number of tools grows and fails when users phrase queries differently than anticipated. Better tool descriptions are more robust because they enable the model to make intelligent selections based on understanding rather than hardcoded rules.
C. Remove Grep from available tools when the MCP server is connected to eliminate functional overlap.
This is overly drastic and removes a genuinely useful tool. Grep serves many purposes beyond dependency analysis (searching for error messages, finding usage patterns, etc.). Removing it would degrade the agent's overall capability for unrelated tasks. The goal is to improve tool selection, not to eliminate tools that have legitimate uses in other contexts.
D. Split analyze_dependencies into granular tools (list_imports, resolve_transitive_deps, detect_circular_deps) so each has a focused purpose less likely to overlap with Grep.
While more granular tools could help, this approach is overkill for the problem and creates additional complexity. Each granular tool requires its own description, testing, and maintenance. The simpler and more elegant solution is to provide a richer description for the existing tool, which requires minimal changes and no additional tool management overhead.
Reference:
Anthropic Claude Agent SDK Documentation – Tool Description Best Practices – Recommends detailed, capability-focused tool descriptions that clearly articulate what the tool does, what inputs it accepts, and what outputs it produces to improve tool-selection accuracy.
MCP (Model Context Protocol) Documentation – Tool Design – Emphasizes that tool descriptions should be explicit about capabilities and use cases to help models select the most appropriate tool for a given task.
Prompt Engineering Best Practices – Highlights that model behavior is strongly influenced by tool descriptions; clear, detailed descriptions are more effective than routing instructions or tool removal for improving tool selection.
Question 26Choose 1
The synthesis agent receives summarized findings from the web-search and documentanalysis agents, then passes a consolidated summary to the report generator. During testing, you discover that the generated reports make factual claims without proper citations—the report generator cannot attribute statements to their original sources because that metadata was lost during the summarization steps. What is the most effective approach to ensure proper source attribution in the final reports?
Show answerHide answer
Correct answer: BHave each agent output structured data that separates content summaries from source metadata, including URLs, document names, and page numbers.
Explanation
Explanation:
The loss of source attribution occurs because metadata is not preserved through the summarization pipeline. The solution must maintain a clear separation between content and source metadata at every stage, ensuring that citations travel with the facts they support. Structured outputs enable both preservation and traceability throughout the workflow.
Correct Option:
B. Have each agent output structured data that separates content summaries from source metadata, including URLs, document names, and page numbers.
This is the most effective approach because it ensures source metadata is preserved as structured data throughout the entire pipeline. By separating content from metadata in structured outputs, each agent can carry forward the citation information without it being lost during summarization. The synthesis agent can then build a consolidated summary that maintains the link between each factual claim and its original sources, enabling the report generator to produce properly cited reports with full attribution.
Incorrect Options:
A. Have the report generator query the web-search agent to relocate sources for claims in the final report.
This is inefficient and unreliable. After the report is written, the report generator would need to make separate queries to locate sources for each claim, which may fail if the exact source cannot be rediscovered. This approach also assumes that the web-search agent can reliably find the same sources again, which is not guaranteed. It adds significant latency and complexity without ensuring consistent attribution.
C. Skip summarization and pass the complete raw outputs from the web-search and document-analysis agents directly to the report generator.
This overloads the report generator with excessive, raw information, increasing token usage and context window pressure. The report generator would need to synthesize the information on its own, effectively duplicating the synthesis agent's work. This also loses the value of having a dedicated synthesis agent that can identify patterns, resolve contradictions, and extract key insights from multiple sources.
D. Instruct the synthesis agent to embed source references inline within its summary text using a consistent citation format.
While this could work, it is brittle and relies on the synthesis agent to consistently format and track citations correctly in free text. Embedding citations inline increases the risk of errors (missed citations, incorrect formatting, mismatched references) compared to using structured data. It also makes it harder for downstream systems to programmatically extract and format citations, as they would need to parse the text for citation patterns.
Reference:
Anthropic Multi-Agent Coordination Best Practices – Recommends structured outputs with rich metadata (including source references) to maintain data lineage and enable accurate attribution in downstream stages.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of data lineage and transparent metadata to support ongoing monitoring, validation, and auditability.
Academic Citation Standards – Highlights the importance of preserving source metadata (author, title, publication date, page numbers) to enable proper attribution and verification of claims.
Question 27Choose 1
You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.
During a billing dispute resolution, your agent successfully retrieves customer info via get_customer and order details via lookup_order, but when attempting to call process_refund, the tool returns a timeout error. The agent has enough information to explain the charges and verify refund eligibility, but cannot actually process the refund due to the backend failure.
What approach best balances first-contact resolution with appropriate error handling?
Show answerHide answer
Correct answer: CExplain the billing, confirm refund eligibility, acknowledge the system issue preventing immediate processing, and offer escalation or retry later.
Explanation
Explanation:
The agent has successfully gathered all necessary information and verified eligibility, but the backend failure prevents completing the refund. The best approach balances resolving what can be resolved (explaining billing, confirming eligibility) while being transparent about the limitation and offering clear options to the customer. This maintains trust and maximizes first-contact resolution while handling the error gracefully.
Correct Option:
C. Explain the billing, confirm refund eligibility, acknowledge the system issue preventing immediate processing, and offer escalation or retry later.
This is the best approach because it delivers maximum value despite the backend failure. The agent uses the information it already gathered to address the customer's underlying concern—explaining the charges and confirming eligibility—while being transparent about the processing limitation. By offering the customer a choice (escalate now or retry later), the agent respects customer autonomy and maintains trust. This approach can achieve partial first-contact resolution and may fully resolve the issue if the customer chooses to retry later, without escalating unnecessarily.
Incorrect Options:
A. Implement automatic retries with exponential backoff for process_refund, keeping the conversation open until the refund is successfully processed.
This is impractical because it keeps the customer waiting indefinitely while retries occur. The customer would be stuck in the conversation with no clear timeframe for resolution, degrading the experience. Exponential backoff could take minutes or hours, violating customer experience expectations. The agent lacks information about whether the backend is temporarily or persistently failing, so indefinite retries are not appropriate.
B. Confirm the refund will be processed and close the conversation, since the system has all necessary information to complete it automatically.
This is dishonest and risky. The agent has no guarantee the refund will ever be processed—the timeout could indicate a persistent failure. Making false promises to close the conversation would lead to unresolved issues, customer complaints, and potential regulatory/compliance problems. This approach violates transparency and trust principles in customer support.
D. Escalate immediately to a human agent since the refund action cannot be completed.
This is premature and unnecessary. The agent has already provided value by retrieving customer info, looking up the order, and determining eligibility. Escalating immediately discards this progress and forces the customer to repeat information to a human agent, reducing first-contact resolution and degrading the experience. The agent should leverage its completed work before considering escalation.
Reference:
Anthropic Claude Agent SDK Documentation – Human-in-the-Loop (HITL) Patterns – Recommends that agents maximize resolution value before escalating, using gathered information to explain status and offer choices.
Customer Support Best Practices – Emphasizes transparency about limitations, offering customers clear choices, and maintaining trust through honest communication about system issues.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Highlights the importance of appropriate error handling, transparency, and maintaining customer trust in automated systems.
Question 28Choose 1
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.
Your pipeline reviews every pull request using a single API call with a static prompt containing the diff and the full text of each changed file. Unchanged files are not included. Developers report that reviews consistently miss cross-file bugs—for example, a pull request renames a function’s parameters, but the review does not identify callers in unchanged files that still use the old argument order.
Evaluation shows that cross-file bugs account for 35% of production incidents originating from reviewed pull requests.
What is the most effective change to the review design?
Show answerHide answer
Correct answer: CRedesign the review as a turn-limited agentic task that can read files and search the repository, following references to verify cross-file findings.
Explanation
Explanation:
The root cause is that a single static prompt with only changed files cannot identify cross-file impacts because it lacks visibility into calling code. The solution must enable the review process to dynamically explore the codebase, following references to verify how changes affect other parts of the system.
Correct Option:
C. Redesign the review as a turn-limited agentic task that can read files and search the repository, following references to verify cross-file findings.
This is the most effective approach because it transforms the review from a static analysis into an adaptive exploration. The agent can use Read, Grep, and Glob tools to discover callers of changed functions, inspect their usage patterns, and verify whether they remain compatible with the changes. This dynamic approach can identify cross-file bugs that would be missed by any static prompt, regardless of how many files are included. The agent can follow the dependency graph naturally, reading only the files that are actually relevant to the specific changes being reviewed.
Incorrect Options:
A. Build a static dependency graph and include every file located within two dependency hops of a changed file.
This risks including too many files (exponential growth), overwhelming the context window and increasing costs. A two-hop dependency graph for a core utility function could include hundreds of files. It also lacks precision—many included files may be irrelevant, while some critical callers might be more than two hops away. Static inclusion cannot adapt to the specific nature of each change.
B. Add instructions asking the model to list external references and reason step by step about how each change could affect unseen callers.
Instructions alone cannot overcome the fundamental limitation of not having the actual code to analyze. The model can only guess about potential callers based on naming patterns or conventions, which is unreliable and prone to false positives or missed issues. Without the ability to read the actual caller code, the model cannot verify compatibility.
D. Run separate review passes for each changed file with its direct dependants, and then aggregate and deduplicate the findings through a final consolidation pass.
This is inefficient and still incomplete—including only direct dependants may miss transitive callers or indirect usages. Running multiple passes increases token usage and latency significantly. The aggregation step also adds complexity and potential for lost or duplicated findings. An agentic approach is more elegant and efficient because it reads only what's needed based on the specific changes.
Reference:
Anthropic Claude Agent SDK Documentation – Agentic Code Review Patterns – Recommends using agentic tasks with tool access for reviews that require cross-file analysis, enabling dynamic exploration of the codebase.
Software Engineering Code Review Best Practices – Highlights that cross-file impacts require understanding of call graphs and usage patterns, which is best achieved through interactive exploration rather than static analysis.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of comprehensive testing and validation that accounts for interactions across system components.
Question 29Choose 1
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.
Your test generation produces unit tests for new code, but reviews show that 55% are lowvalue: trivial assertions that only verify functions do not throw exceptions, tests duplicating existing coverage, or tests ignoring your team’s fixture conventions.
How do you reduce the rate of low-value tests being generated in the first place?
Show answerHide answer
Correct answer: DDocument testing standards in CLAUDE.md, including valuable-test criteria, available fixtures and their intended use cases, and examples distinguishing meaningful behavioral tests from trivial assertions.
Explanation
Explanation:
The 55% low-value test rate stems from a lack of clear, contextual guidance about what constitutes a valuable test in your specific codebase. Claude needs explicit standards—not just generic testing best practices, but your team's specific conventions, fixture patterns, and examples of meaningful vs. trivial tests. Documentation at the project level provides persistent, reusable guidance that addresses the root cause.
Correct Option:
D. Document testing standards in CLAUDE.md, including valuable-test criteria, available fixtures and their intended use cases, and examples distinguishing meaningful behavioral tests from trivial assertions.
This is the most effective approach because it addresses the root cause at the source—the prompt/context level. CLAUDE.md provides persistent, project-specific guidance that Claude will reference for every test generation request. By including concrete criteria (e.g., "a valuable test verifies business logic, not just that functions don't throw"), available fixtures with usage examples, and clear do/don't examples, you fundamentally shift Claude's behavior. This prevents low-value tests from being generated in the first place, rather than filtering them afterward.
Incorrect Options:
A. Implement two-phase generation in which a second Claude call scores each test against quality criteria, filtering out low-scoring tests before presenting results to developers.
While this could improve the quality of presented tests, it is inefficient—you're generating tests only to discard them, wasting tokens and latency. More importantly, it doesn't teach Claude to generate better tests initially. The second pass is a filter, not a solution to the underlying issue. This also adds complexity and cost without addressing why the first pass produces low-quality tests.
B. Add post-generation coverage analysis that automatically filters out any generated test that does not increase line coverage beyond existing tests.
Line coverage is a poor proxy for test value. A test can increase coverage by exercising a trivial getter or error-handling branch without providing meaningful behavioral validation. Conversely, a valuable test that verifies complex business logic might not increase coverage if the paths are already covered by other tests. This filtering approach risks discarding genuinely valuable tests while accepting superficial coverage-inflating ones.
C. Restrict test generation to directories where historical quality metrics show higher acceptance rates, disabling it for areas where generated tests consistently require substantial editing.
This is a workaround that avoids the problem rather than solving it. Disabling test generation in problem areas forfeits the productivity benefits of automation where they might be most needed (complex or legacy code). This approach also doesn't help improve quality in the restricted areas—they simply remain uncovered, and the root behavioral issue persists.
Reference:
Anthropic Claude Documentation – CLAUDE.md Best Practices – Recommends documenting project-specific conventions, standards, and examples to provide persistent, context-aware guidance for code generation tasks.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Highlights the importance of clear specifications, validation criteria, and documented standards to ensure model outputs meet quality and risk management requirements.
Testing Best Practices – Test Value Criteria – Emphasizes that valuable tests verify behavior and business logic, not just code execution; tests should validate specific outcomes and edge cases rather than merely exercising code paths.
Question 30Choose 1
After the web-search and document-analysis subagents complete their tasks, the coordinator needs to spawn the synthesis subagent to synthesize the findings. What is the correct approach for providing the synthesis subagent with the information it needs?
Show answerHide answer
Correct answer: BInclude the complete findings from both subagents directly in the synthesis subagent’s prompt.
Explanation
Explanation:
The synthesis subagent needs access to the complete findings from the web-search and document-analysis subagents to perform its synthesis task effectively. The most straightforward and reliable approach is to provide these findings directly in the subagent's prompt, ensuring that all necessary information is available without requiring additional tool calls or shared memory access.
Correct Option:
B. Include the complete findings from both subagents directly in the synthesis subagent's prompt.
This is the most effective approach because it ensures the synthesis agent has immediate, complete access to all findings without requiring additional infrastructure or dependencies. Direct inclusion in the prompt is simple, reliable, and ensures that all necessary information is available in context for the synthesis task. This approach avoids the complexity of shared memory stores, callback mechanisms, or automatic inheritance, which can introduce reliability issues or incomplete data transfer.
Incorrect Options:
A. Pass reference identifiers and configure the subagent with read access to a shared memory store where the other subagents deposited their results.
This adds unnecessary complexity and introduces potential failure points. The subagent would need to make additional tool calls to retrieve data from the shared store, increasing latency and token usage. It also requires managing concurrent access and ensuring data is properly persisted. Direct inclusion is simpler, more reliable, and easier to debug.
C. Provide the subagent with tool definitions that allow it to request outputs from the other subagents through callbacks.
This creates circular dependencies and coordination challenges. The synthesis agent would need to call back to the coordinator or other subagents to retrieve data, introducing complexity and potential for deadlocks or incomplete data retrieval. This approach also violates the separation of concerns, as the synthesis agent would need to know how to interact with other subagents' interfaces.
D. Spawn the subagent with only a brief task description, relying on automatic context inheritance from the coordinator.
The Claude Agent SDK does not provide automatic context inheritance in the way this option describes. The coordinator's context (including findings) is not automatically passed to subagents. Relying on undocumented or assumed behavior is risky and would likely result in the synthesis agent lacking the necessary information, leading to incomplete or hallucinated outputs.
Reference:
Anthropic Claude Agent SDK Documentation – Subagent Configuration – Recommends explicitly passing all necessary context (including findings from other agents) in the subagent's prompt to ensure complete and reliable task execution.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of complete and accurate data transfer between system components to ensure reliable outputs and avoid gaps.
Multi-Agent System Design Best Practices – Highlights that explicit data passing is more reliable than shared memory or callback-based approaches, especially for ensuring consistency and completeness.
Full mock exam
Sit the CCAR-F exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real CCAR-F exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.