Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Pass the Anthropic Claude Certified Architect CCAR-F Questions and answers with CertsForce

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

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.

In production, you observe that simple fact-checking queries, such as “In what year was the Paris Climate Agreement signed?”, traverse all four subagents sequentially, consuming more than 40 seconds and significant tokens per query. Complex comparative research benefits from the complete pipeline. Your query distribution is diverse and continues to evolve as users discover new applications.

What is the most effective approach to optimize for varying query complexity?

Options:

A.

Create a fast path for factual questions that bypasses subagents entirely, routing every other query through the complete pipeline.


B.

Train a query-complexity classifier using labeled historical data to predict the optimal subagent combination, retraining it periodically.


C.

Implement pattern-based routing that classifies queries as single-fact, comparative, or analytical and maps each category to a predefined subagent combination.


D.

Have the coordinator analyze each query and dynamically determine which subagents are required.


Expert Solution
Questions # 32:

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 implementing a new payment processing module that must follow your project’s established patterns for database transactions, error handling, and audit logging. You’ve identified three existing modules that exemplify these patterns: db_utils.py , error_handlers.py , and audit_logger.py . This is a one-off integration task—these patterns are well-documented in your team wiki and don’t need additional project-level documentation.

What’s the most effective approach?

Options:

A.

Use @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.


B.

Add documentation of each pattern to your CLAUDE.md file, establishing them as project conventions that Claude will apply automatically.


C.

Describe the patterns from the three modules in natural language in your prompt, explaining the transaction handling approach, error format, and logging conventions Claude should follow.


D.

Ask Claude to explore your codebase to find and understand the transaction, error handling, and logging patterns before generating the new module.


Expert Solution
Questions # 33:

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 automated review jobs take 18 seconds to initialize before Claude begins analyzing code. Profiling reveals that the delay results from automatically discovering hooks, MCP servers, plugins, skills, and multiple nested CLAUDE.md files throughout the monorepo.

You need to reduce startup time while ensuring reviews still enforce the coding standards documented in the root-level CLAUDE.md file.

What is the most effective approach?

Options:

A.

Replace the default prompt using --system-prompt-file ./CLAUDE.md, which bypasses default prompt assembly and loads only the project rules.


B.

Run in --bare mode and pass --append-system-prompt-file ./CLAUDE.md to load the required project standards explicitly while skipping automatic discovery.


C.

Run in --bare mode and repeat all review criteria directly in the -p prompt for every invocation.


D.

Keep the default initialization and add --exclude-dynamic-system-prompt-sections to improve prompt-cache reuse across CI runners.


Expert Solution
Questions # 34:

Your pipeline runs:

PROMPT= " You are a code reviewer. "

PROMPT= " $PROMPT Analyze the provided diff "

PROMPT= " $PROMPT for bugs, security issues, "

PROMPT= " $PROMPT and style violations. "

claude -p \

--dangerously-skip-permissions \

--system-prompt " $PROMPT " < diff.txt

The reviews complete and return feedback, but Claude comments only on the piped diff—it never reads surrounding files in the checked-out repository to understand broader context, even when the diff modifies a function called by many other modules. Which change to the invocation will cause Claude to read related repository files while still applying your custom review instructions?

Options:

A.

Keep --system-prompt and add --allowedTools " Read, Glob, Grep " because non-interactive -p mode otherwise disables filesystem tools.


B.

Replace --system-prompt with --append-system-prompt so the review instructions are added to Claude Code’s default prompt instead of overwriting its built-in file-reading and code-navigation guidance.


C.

Remove --system-prompt entirely and place the review instructions in a root-level CLAUDE.md because --system-prompt is incompatible with tool use under -p.


D.

Stop piping the diff through standard input and embed it in the prompt string so Claude Code treats the invocation as an agentic session rather than a stream-processing operation.


Expert Solution
Questions # 35:

The coordinator provides detailed step-by-step instructions to the web-search subagent, specifying exact search queries, source priorities, and date filters. Production monitoring reveals three issues: (1) the subagent reports “insufficient results” instead of trying alternative approaches when the specified searches fail, (2) research quality drops for emerging topics that do not match expected patterns, and (3) the subagent rarely surfaces valuable tangential sources. What is the most effective way to improve subagent adaptability?

Options:

A.

Specify research objectives and quality criteria—such as coverage breadth, source diversity, and recency—rather than prescribing procedural steps, allowing the subagent to determine its search strategy.


B.

Remove procedural details entirely and delegate using simple goals such as “research this topic thoroughly,” relying on the subagent’s general capabilities.


C.

Add fallback directives requiring alternative query formulations whenever the specified searches produce fewer than a predetermined number of results.


D.

Classify each topic as either “well-defined” or “exploratory” and use a different instruction style for each category.


Expert Solution
Questions # 36:

During testing, when a customer says, “I need a refund for my recent purchase,” the agent immediately invokes process_refund but populates the required order_id parameter with a plausible-looking fabricated value instead of first calling lookup_order. The refund fails because the invented order identifier does not exist. Which change directly addresses the root cause of the fabricated order_id?

Options:

A.

Update the process_refund tool description to state explicitly that order_id must come from a successful lookup_order result and must never be assumed, inferred, or invented.


B.

Change tool_choice from auto to any so Claude must call a tool on every turn.


C.

Add server-side validation that checks whether order_id exists before attempting the refund and returns an error when it does not.


D.

Preprocess customer messages to extract any mentioned order identifiers and inject them into the conversation before sending the request to Claude.


Expert Solution
Questions # 37:

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 coordinator agent has AgentDefinition objects configured for all four specialized subagents, each with appropriate descriptions, prompts, and tool restrictions. During testing, you notice that the coordinator correctly reasons about when to delegate—it generates messages such as, “I’ll ask the web-search agent to find sources on this topic”—but no subagent execution ever occurs. The coordinator then proceeds as if the delegation happened and continues with incomplete information. Logs show no errors.

What is the most likely cause?

Options:

A.

The AgentDefinition objects are configured correctly, but the coordinator’s system prompt does not explicitly list the available subagent types, preventing the model from knowing that they can be invoked.


B.

Subagent context isolation means task descriptions from the coordinator do not automatically reach subagents; you must configure explicit context forwarding in ClaudeAgentOptions.


C.

The coordinator’s allowedTools configuration does not include Agent—formerly named Task—so it cannot invoke the tool required to spawn subagents.


D.

The coordinator’s max_tokens setting is too low, causing the subagent tool invocation to be truncated before the subagent type can be specified.


Expert Solution
Questions # 38:

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 pipeline uses a tool called extract_metadata with a JSON schema for paper details. You’ve also defined lookup_citations and verify_doi tools for enrichment. During testing, you notice that when users include requests like “extract the metadata and tell me how cited it is,” Claude sometimes calls lookup_citations first, which fails because it needs the DOI that extract_metadata would provide.

What’s the most effective way to ensure structured metadata extraction happens first?

Options:

A.

Set tool_choice to { " type " : " tool " , " name " : " extract_metadata " } and process the enrichment requests in subsequent turns after receiving the extracted metadata.


B.

Set tool_choice to " auto " and reorder the tool definitions so extract_metadata appears first in the tools array, since Claude prioritizes earlier-listed tools.


C.

Set tool_choice to { " type " : " tool " , " name " : " extract_metadata " } for every API call in the pipeline, ensuring Claude always extracts metadata before any enrichment can occur.


D.

Set tool_choice to " any " so Claude must use a tool, combined with system prompt instructions prioritizing extract_metadata .


Expert Solution
Questions # 39:

The document-analysis agent has a single analyze_document tool that accepts a document and a free-text instruction parameter. During evaluation, requests such as “extract the key financial metrics” often return narrative summaries, while “summarize the methodology” sometimes returns raw data tables. The synthesis agent reports that 35% of analysis results require new requests with clarified instructions. What is the most effective way to improve reliability?

Options:

A.

Split the generic tool into purpose-specific tools—extract_data_points, summarize_content, and verify_claim_against_source—each with defined input and output contracts.


B.

Retain the single tool but add an analysis_type enum requiring explicit selection among extraction, summarization, and verification modes.


C.

Have the coordinator preclassify each analysis request before passing instructions to the document-analysis agent.


D.

Enhance the tool description with detailed examples showing how different instruction phrasings should map to different output formats.


Expert Solution
Questions # 40:

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.

Monitoring shows 12% of extractions fail Pydantic validation with specific errors like “expected float for quantity, got ‘2 to 3’”. Retrying these requests without modification produces identical failures.

What’s the most effective approach to recover from these validation failures?

Options:

A.

Send a follow-up request including the validation error, asking the model to correct its output.


B.

Set temperature to 0 to eliminate output variability and ensure consistent formatting.


C.

Pre-process source documents to standardize problematic formats before sending them for extraction.


D.

Implement a secondary pipeline using a larger model tier to reprocess documents that fail validation.


Expert Solution
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions