Anthropic CCDV-F (Claude Certified Developer - Foundations) Practice Test 8

Question 70

For an operations research assistant, the missing capability is to require precise control over message assembly, tool dispatch, and stopping behavior. What should the developers implement?

  1. Write selected durable facts to a controlled external memory store.
  2. Implement an application-owned Messages API agent loop.
  3. Inspect the tool_use block, invoke the authorized handler, and return tool_result.
  4. Chain dependent operations serially with explicit input and output contracts.

Explanation

Correct Answer

B:

To require precise control over message assembly, tool dispatch, and stopping behavior in this operations research assistant, a custom loop explicitly owns each model call, tool result, state update, and budget decision, trading flexibility for more engineering responsibility; the proposed implementation directly supplies that capability.

Incorrect Answers

A:

The proposed alternative helps to preserve durable user-approved facts across agent sessions outside the context window because external memory allows selective retrieval in later sessions, unlike temporary model context that disappears when calls end; that mechanism does not meet the different requirement to require precise control over message assembly, tool dispatch, and stopping behavior.

C:

The proposed alternative helps to execute a requested internal business function inside the application's trusted process because client tools are executed by the application, not by merely declaring a schema; every returned result must be matched to its tool-use identifier; that mechanism does not meet the different requirement to require precise control over message assembly, tool dispatch, and stopping behavior.

D:

The proposed alternative helps to ensure each later tool receives a validated artifact from its preceding stage because later steps cannot safely start until upstream data exists; passing validated outputs prevents races and malformed downstream input; that mechanism does not meet the different requirement to require precise control over message assembly, tool dispatch, and stopping behavior.

Question 71

While planning a customer-facing AI feature, the product owner specifies that it must cap the maximum output generated by a Messages API request. Which solution fulfills the requirement?

  1. Send instructions using the request's top-level system field.
  2. Inspect HTTP status and structured error payload before interpreting model output.
  3. Configure the max_tokens request parameter appropriately.
  4. Handle stop_reason max_tokens as truncation and continue or revise the limit.

Explanation

Correct Answer

C:

To cap the maximum output generated by a Messages API request in this customer-facing AI feature, a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers; the proposed implementation directly supplies that capability.

Incorrect Answers

A:

The proposed alternative helps to set consistent developer-controlled behavior separately from untrusted user text because the system field separates higher-priority application guidance from user-message content and should not be simulated by ordinary quoted text; that mechanism does not meet the different requirement to cap the maximum output generated by a Messages API request.

B:

The proposed alternative helps to distinguish API transport failures from a successfully returned model refusal because rate limits, authorization failures, and server errors happen at the request layer, unlike a normal response with a refusal stop reason; that mechanism does not meet the different requirement to cap the maximum output generated by a Messages API request.

D:

The proposed alternative helps to recover when a response ends because its generation budget was reached because a truncated completion may contain unfinished content, so treating it as a validated final answer risks losing required fields; that mechanism does not meet the different requirement to cap the maximum output generated by a Messages API request.

Question 72

An operational review of a Claude inference cost review reports distinct failures: it cannot run a straightforward well-specified classification without consuming examples, and it cannot estimate model usage from encoded text rather than counting words. Which two repairs are required? Choose TWO.

  1. Budget total context for instructions, history, tools, and output.
  2. Use more exploratory sampling where supported and measure quality.
  3. Branch on HTTP status and decode the provider's error structure.
  4. Measure or count input and output tokens with the supported tokenizer or API.
  5. Start with a clear instruction and no demonstrations.

Explanation

Correct Answers

D:

To estimate model usage from encoded text rather than counting words as part of a design that must also run a straightforward well-specified classification without consuming examples, billing and context consumption track tokens, which do not map one-to-one to English words or characters; this is why the action is one of the two required selections.

E:

To run a straightforward well-specified classification without consuming examples as part of a design that must also estimate model usage from encoded text rather than counting words, zero-shot prompting relies on direct task instructions and can save context when the task requires little format teaching; this is why the action is one of the two required selections.

Incorrect Answers

A:

This alternative serves the separate goal to know why a long prompt plus a proposed response may exceed the model's accepted context because a context window bounds what can be processed in one request; large tool results consume it along with user messages; the required outcomes are instead to run a straightforward well-specified classification without consuming examples and to estimate model usage from encoded text rather than counting words.

B:

This alternative serves the separate goal to invite stylistic variety during noncritical brainstorming because higher sampling randomness broadens candidate phrasing but can reduce predictability, so it suits ideation better than strict extraction; the required outcomes are instead to run a straightforward well-specified classification without consuming examples and to estimate model usage from encoded text rather than counting words.

C:

This alternative serves the separate goal to stop interpreting non-2xx API responses as normal assistant messages because transport errors are not regular model completions, so application control flow must treat them separately; the required outcomes are instead to run a straightforward well-specified classification without consuming examples and to estimate model usage from encoded text rather than counting words.

Question 73

For a shared tool gateway for Claude, a design is acceptable only if it can invoke a proprietary internal pricing database unavailable through a built-in feature while also being able to supply a read-only policy manual to an MCP client without giving it an action endpoint. Which paired implementation is sufficient?

  1. Perform both steps: (1) Write a custom tool whose handler runs in the application; (2) expose the manual as an mcp resource rather than a tool.
  2. Perform both steps: (1) Publish a properly described MCP tool and its input contract; (2) package the connector behind an mcp server.
  3. Perform both steps: (1) Write a custom tool whose handler runs in the application; (2) package the connector behind an mcp server.
  4. Perform both steps: (1) Publish a properly described MCP tool and its input contract; (2) expose the manual as an mcp resource rather than a tool.

Explanation

Correct Answer

A:

The first change enables the team to invoke a proprietary internal pricing database unavailable through a built-in feature because custom tools expose application-specific actions while retaining control over authentication, validation, and network access; the second addresses the separate need to supply a read-only policy manual to an MCP client without giving it an action endpoint because a resource is contextual data; representing a passive document as an imperative function adds unnecessary execution semantics.

Incorrect Answers

B:

Both steps target different results—let an MCP client invoke a business capability through a standard server interface and share one integration with several compatible AI clients or agent runtimes—because MCP tools represent callable operations with typed parameters; the server executes authorized behavior rather than only providing reference text and MCP standardizes capability exposure across clients, reducing duplicate integration logic compared with proprietary tool schemas everywhere; the required capabilities are instead to invoke a proprietary internal pricing database unavailable through a built-in feature and to supply a read-only policy manual to an MCP client without giving it an action endpoint.

C:

The first step is appropriate for the requirement to invoke a proprietary internal pricing database unavailable through a built-in feature because custom tools expose application-specific actions while retaining control over authentication, validation, and network access; the other step instead aims to share one integration with several compatible AI clients or agent runtimes because MCP standardizes capability exposure across clients, reducing duplicate integration logic compared with proprietary tool schemas everywhere, which does not meet the second requirement to supply a read-only policy manual to an MCP client without giving it an action endpoint.

D:

The second step meets the requirement to supply a read-only policy manual to an MCP client without giving it an action endpoint because a resource is contextual data; representing a passive document as an imperative function adds unnecessary execution semantics; the first step would only help to let an MCP client invoke a business capability through a standard server interface because MCP tools represent callable operations with typed parameters; the server executes authorized behavior rather than only providing reference text, leaving the separate requirement to invoke a proprietary internal pricing database unavailable through a built-in feature unmet.

Question 74

A test for a safety-sensitive Claude application fails because it cannot resist instructions embedded in a retrieved support ticket that demand secret disclosure. Which change fixes the identified failure?

  1. Remove or mask unnecessary personal information before model submission.
  2. Treat retrieved content as untrusted and prevent its instructions from controlling tools.
  3. Redact secrets and protect log access with retention controls.
  4. Validate or moderate final content before release.

Explanation

Correct Answer

B:

To resist instructions embedded in a retrieved support ticket that demand secret disclosure in this safety-sensitive Claude application, source material is data rather than authority; enforcing tool permissions and separating roles limits an attacker's ability to redirect execution; the proposed implementation directly supplies that capability.

Incorrect Answers

A:

The proposed alternative helps to protect customer identity fields when only document topics are needed for classification because minimization limits exposure while preserving task inputs; relying on the model to ignore visible PII does not provide the same protection; that mechanism does not meet the different requirement to resist instructions embedded in a retrieved support ticket that demand secret disclosure.

C:

The proposed alternative helps to investigate user actions without leaking API keys into operational records because logs support accountability only when access and retention are restricted; copying all prompt content into logs creates another exposure surface; that mechanism does not meet the different requirement to resist instructions embedded in a retrieved support ticket that demand secret disclosure.

D:

The proposed alternative helps to prevent generated advice that violates the product's publication rules from being shown because output checks catch issues emerging during generation; they complement rather than replace input controls and tool restrictions; that mechanism does not meet the different requirement to resist instructions embedded in a retrieved support ticket that demand secret disclosure.

Question 75

An architecture review of a hosted document-processing service asks how to handle a safety refusal as a distinct application outcome. Which action is the best fit?

  1. Detect refusal and apply the product's allowed fallback or messaging policy.
  2. Inspect response.content blocks and metadata through the SDK's typed representation.
  3. Enable streaming and consume server-sent events in order.
  4. Parse response content by block type and follow current thinking-field rules.

Explanation

Correct Answer

A:

To handle a safety refusal as a distinct application outcome in this hosted document-processing service, a refusal is not the same as a network failure; blindly retrying identical input may not produce an appropriate user experience; the proposed implementation directly supplies that capability.

Incorrect Answers

B:

The proposed alternative helps to avoid assuming a structured SDK response is a plain string because the SDK exposes block types, stop reason, and usage separately; naïve string concatenation can lose tool requests or other content; that mechanism does not meet the different requirement to handle a safety refusal as a distinct application outcome.

C:

The proposed alternative helps to show generated text progressively instead of waiting for the full response because streaming transmits partial deltas and completion events, allowing earlier display while requiring the client to assemble content safely; that mechanism does not meet the different requirement to handle a safety refusal as a distinct application outcome.

D:

The proposed alternative helps to handle a response containing reasoning-related blocks without confusing them with ordinary final text because structured content may contain distinct block types and signatures; a parser that assumes only plain text can discard important protocol data; that mechanism does not meet the different requirement to handle a safety refusal as a distinct application outcome.

Question 76

For a team-owned Claude Code workflow, the missing capability is to enforce a team-approved permission policy despite local developer preferences. What should the developers implement?

  1. Add concise project guidance to the appropriate CLAUDE.md file.
  2. Configure a specialized Claude Code subagent with a narrow remit.
  3. Define policy in the appropriate managed or shared settings scope.
  4. Use the supported session continuation or resume mechanism.

Explanation

Correct Answer

C:

To enforce a team-approved permission policy despite local developer preferences in this team-owned Claude Code workflow, Claude Code has multiple configuration scopes; binding policy to the required scope matters more than placing a rule in an arbitrary JSON file; the proposed implementation directly supplies that capability.

Incorrect Answers

A:

The proposed alternative helps to give Claude Code repository-specific build and test instructions for future sessions because Claude Code reads persistent project instructions from its memory hierarchy; one-off chat messages do not reliably establish durable repository guidance; that mechanism does not meet the different requirement to enforce a team-approved permission policy despite local developer preferences.

B:

The proposed alternative helps to delegate an independent code review without filling the main coding session with details because subagents can focus on a task and return a summary, limiting noise in the parent session and allowing separate permissions when configured; that mechanism does not meet the different requirement to enforce a team-approved permission policy despite local developer preferences.

D:

The proposed alternative helps to continue a previously interrupted Claude Code work session because restoring session context reduces lost work while preserving continuity of prior tool activity; opening a new unrelated session does not do the same; that mechanism does not meet the different requirement to enforce a team-approved permission policy despite local developer preferences.

Question 77

To ship a production tool-calling agent, the application must block an unsafe shell or file operation before a tool executes and continue a paused multi-step task with its legitimate prior context. Which pair of listed actions is necessary for those stated capabilities? Choose TWO.

  1. Consume the agent runtime's streamed event sequence.
  2. Retrieve only task-relevant memories into the active context.
  3. Alternate model tool-use requests with tool results until completion.
  4. Persist and resume the agent session using supported state handling.
  5. Add a deterministic pre-execution hook for the sensitive operation.

Explanation

Correct Answers

D:

To continue a paused multi-step task with its legitimate prior context as part of a design that must also block an unsafe shell or file operation before a tool executes, session continuity preserves relevant work across invocations; discarding session state can cause repeated tools or lost intermediate decisions; this is why the action is one of the two required selections.

E:

To block an unsafe shell or file operation before a tool executes as part of a design that must also continue a paused multi-step task with its legitimate prior context, a pre-tool boundary can reject a forbidden action independently of model judgment; enforcement must occur before side effects happen; this is why the action is one of the two required selections.

Incorrect Answers

A:

This alternative serves the separate goal to deliver intermediate agent events to the client as they occur because event-driven consumption lets the application display progress and inspect tool actions without waiting for the entire multi-step run to finish; the required outcomes are instead to block an unsafe shell or file operation before a tool executes and to continue a paused multi-step task with its legitimate prior context.

B:

This alternative serves the separate goal to stop old agent histories from burying the information needed for the current step because selective retrieval improves signal-to-noise and keeps token use bounded while retaining access to older information when required; the required outcomes are instead to block an unsafe shell or file operation before a tool executes and to continue a paused multi-step task with its legitimate prior context.

C:

This alternative serves the separate goal to plan another step only after inspecting the result of a requested external operation because the loop returns observations to the model so subsequent decisions are informed by actual tool output rather than imagined execution; the required outcomes are instead to block an unsafe shell or file operation before a tool executes and to continue a paused multi-step task with its legitimate prior context.

Question 78

A production readiness review of an agent access-control assessment finds that the team cannot yet limit the consequences of a mistaken tool call in a production support system or secure an agent against both malicious retrieved text and unsafe tool execution. Which paired changes directly remedy the two gaps?

  1. Perform both steps: (1) Grant each runtime tool only the operations and resources required for its task; (2) combine prompt boundaries, scoped credentials, validation, and approval gates.
  2. Perform both steps: (1) Pause execution for explicit approval at the high-impact action boundary; (2) isolate external search results and validate any resulting tool action independently.
  3. Perform both steps: (1) Pause execution for explicit approval at the high-impact action boundary; (2) combine prompt boundaries, scoped credentials, validation, and approval gates.
  4. Perform both steps: (1) Grant each runtime tool only the operations and resources required for its task; (2) isolate external search results and validate any resulting tool action independently.

Explanation

Correct Answer

A:

The first change enables the team to limit the consequences of a mistaken tool call in a production support system because least-privilege permissions shrink the blast radius of model errors and compromised prompts, especially for mutating actions; the second addresses the separate need to secure an agent against both malicious retrieved text and unsafe tool execution because defense in depth assumes individual filters can fail; independent enforcement boundaries reduce the chance of harmful side effects.

Incorrect Answers

B:

Both steps target different results—require a person to approve an irreversible administrative change and reject a malicious instruction inserted into a web-search result rather than the user's direct request—because human approval is a policy-enforced transition, not a note written in the model's plan or a message displayed afterward and indirect attacks exploit lower-trust retrieval surfaces, so trusting search snippets as operational directives crosses a security boundary; the required capabilities are instead to limit the consequences of a mistaken tool call in a production support system and to secure an agent against both malicious retrieved text and unsafe tool execution.

C:

The second step meets the requirement to secure an agent against both malicious retrieved text and unsafe tool execution because defense in depth assumes individual filters can fail; independent enforcement boundaries reduce the chance of harmful side effects; the first step would only help to require a person to approve an irreversible administrative change because human approval is a policy-enforced transition, not a note written in the model's plan or a message displayed afterward, leaving the separate requirement to limit the consequences of a mistaken tool call in a production support system unmet.

D:

The first step is appropriate for the requirement to limit the consequences of a mistaken tool call in a production support system because least-privilege permissions shrink the blast radius of model errors and compromised prompts, especially for mutating actions; the other step instead aims to reject a malicious instruction inserted into a web-search result rather than the user's direct request because indirect attacks exploit lower-trust retrieval surfaces, so trusting search snippets as operational directives crosses a security boundary, which does not meet the second requirement to secure an agent against both malicious retrieved text and unsafe tool execution.

Question 79

For a customer-facing AI feature, a design is acceptable only if it can translate a request for citation-backed answers into observable application behavior while also being able to turn a support desk's responsiveness expectation into an engineering objective. Which paired implementation is sufficient?

  1. Perform both steps: (1) Define measurable answer-format and citation acceptance criteria; (2) set an end-to-end latency target and a measurement method.
  2. Perform both steps: (1) Specify user-visible degraded responses and recovery paths; (2) set realistic connection and response timeouts with an explicit failure path.
  3. Perform both steps: (1) Define measurable answer-format and citation acceptance criteria; (2) set realistic connection and response timeouts with an explicit failure path.
  4. Perform both steps: (1) Specify user-visible degraded responses and recovery paths; (2) set an end-to-end latency target and a measurement method.

Explanation

Correct Answer

A:

The first change enables the team to translate a request for citation-backed answers into observable application behavior because a functional requirement specifies what the user must receive and how success is evaluated, not merely that the team will use a language model; the second addresses the separate need to turn a support desk's responsiveness expectation into an engineering objective because a latency target is a nonfunctional requirement; model choice, network overhead, tool calls, and rendering all affect whether the service meets it.

Incorrect Answers

B:

Both steps target different results—preserve an understandable outcome when model generation cannot complete and keep a stalled upstream model call from occupying application resources indefinitely—because a fallback requirement defines what customers see when an API call times out or is refused rather than assuming every inference will succeed and timeout handling caps resource exposure, while logging distinguishes slow provider response from a model-level refusal; the required capabilities are instead to translate a request for citation-backed answers into observable application behavior and to turn a support desk's responsiveness expectation into an engineering objective.

C:

The first step is appropriate for the requirement to translate a request for citation-backed answers into observable application behavior because a functional requirement specifies what the user must receive and how success is evaluated, not merely that the team will use a language model; the other step instead aims to keep a stalled upstream model call from occupying application resources indefinitely because timeout handling caps resource exposure, while logging distinguishes slow provider response from a model-level refusal, which does not meet the second requirement to turn a support desk's responsiveness expectation into an engineering objective.

D:

The second step meets the requirement to turn a support desk's responsiveness expectation into an engineering objective because a latency target is a nonfunctional requirement; model choice, network overhead, tool calls, and rendering all affect whether the service meets it; the first step would only help to preserve an understandable outcome when model generation cannot complete because a fallback requirement defines what customers see when an API call times out or is refused rather than assuming every inference will succeed, leaving the separate requirement to translate a request for citation-backed answers into observable application behavior unmet.

Question 80

A team maintaining a long-running retrieval assistant must meet 2 separate acceptance criteria: (1) keep only evidence that matters to the question when retrieval returns hundreds of documents; (2) reject model output missing a field that a downstream service requires. Which two implementation actions directly satisfy the stated requirements? Choose TWO.

  1. Instruct the application to request clarification for unresolved high-impact ambiguity.
  2. Rank and select relevant passages before building the model context.
  3. Hold evaluation inputs constant and compare prompt versions.
  4. Validate parsed output against the application's declared schema.
  5. Name each mandatory field or section and provide formatting constraints.

Explanation

Correct Answers

B:

The test to keep only evidence that matters to the question when retrieval returns hundreds of documents is met because relevance filtering reduces distracting information and token usage; dumping every retrieved page can degrade grounding and exceed limits; the remaining selection covers the separate need to reject model output missing a field that a downstream service requires.

D:

The test to reject model output missing a field that a downstream service requires is met because parsing proves a string is legal JSON, but schema validation checks required keys, types, and structural constraints; the remaining selection covers the separate need to keep only evidence that matters to the question when retrieval returns hundreds of documents.

Incorrect Answers

A:

The action is useful for the separate capability to ask for missing essential parameters rather than inventing a consequential choice because clarification reduces irreversible guesses when requirements do not uniquely determine a safe action; however, the required test outcomes are to keep only evidence that matters to the question when retrieval returns hundreds of documents and to reject model output missing a field that a downstream service requires.

C:

The action is useful for the separate capability to measure whether a changed instruction actually improves extraction accuracy because a reproducible prompt test isolates the change being studied; anecdotal output from unrelated cases does not show improvement; however, the required test outcomes are to keep only evidence that matters to the question when retrieval returns hundreds of documents and to reject model output missing a field that a downstream service requires.

E:

The action is useful for the separate capability to require that a generated report have a fixed set of sections because concrete desired structure is easier to verify than a vague instruction to be professional or comprehensive; however, the required test outcomes are to keep only evidence that matters to the question when retrieval returns hundreds of documents and to reject model output missing a field that a downstream service requires.

Claude Certified Developer - Foundations (CCDV-F) Practice Tests