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

Question 780

An architecture decision for a TypeScript Claude integration must support distinguish API transport failures from a successfully returned model refusal and detect that the assistant has naturally finished a response. Which option gives a complete rather than partial solution?

  1. Perform both steps: (1) Inspect HTTP status and structured error payload before interpreting model output; (2) detect refusal and apply the product's allowed fallback or messaging policy.
  2. Perform both steps: (1) Inspect HTTP status and structured error payload before interpreting model output; (2) treat stop_reason end_turn as a completed assistant turn.
  3. Perform both steps: (1) Include the necessary conversation history in each Messages API call; (2) treat stop_reason end_turn as a completed assistant turn.
  4. Perform both steps: (1) Include the necessary conversation history in each Messages API call; (2) detect refusal and apply the product's allowed fallback or messaging policy.

Explanation

Correct Answer

B:

The first change enables the team 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; the second addresses the separate need to detect that the assistant has naturally finished a response because the completion signal is explicit in the response metadata; it should not be inferred solely from a sentence ending in punctuation.

Incorrect Answers

A:

The first step is appropriate for the requirement 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; the other step instead aims to handle a safety refusal as a distinct application outcome because a refusal is not the same as a network failure; blindly retrying identical input may not produce an appropriate user experience, which does not meet the second requirement to detect that the assistant has naturally finished a response.

C:

The second step meets the requirement to detect that the assistant has naturally finished a response because the completion signal is explicit in the response metadata; it should not be inferred solely from a sentence ending in punctuation; the first step would only help to continue a chat with relevant prior turns despite the API being stateless because a response does not create server-side conversational memory by default; the client supplies retained turns and controls truncation, leaving the separate requirement to distinguish API transport failures from a successfully returned model refusal unmet.

D:

Both steps target different results—continue a chat with relevant prior turns despite the API being stateless and handle a safety refusal as a distinct application outcome—because a response does not create server-side conversational memory by default; the client supplies retained turns and controls truncation and a refusal is not the same as a network failure; blindly retrying identical input may not produce an appropriate user experience; the required capabilities are instead to distinguish API transport failures from a successfully returned model refusal and to detect that the assistant has naturally finished a response.

Question 781

A planned upgrade to a multi-tenant support application has two requirements that must both pass: display partial sentences without publishing malformed structured records; distinguish queued, running, waiting-for-approval, failed, and completed agent jobs. Identify the two direct implementations. Choose TWO.

  1. Apply a context retention policy and summarize earlier turns where suitable.
  2. Place stable application rules in system instructions and untrusted requests in user content.
  3. Persist explicit job states with allowed transitions.
  4. Buffer structured data until it can be parsed and validated before UI commit.
  5. Apply content checks at suitable input and output boundaries.

Explanation

Correct Answers

C:

To distinguish queued, running, waiting-for-approval, failed, and completed agent jobs as part of a design that must also display partial sentences without publishing malformed structured records, a state machine prevents an incomplete tool operation from being shown as successful and makes retries and cancellation predictable; this is why the action is one of the two required selections.

D:

To display partial sentences without publishing malformed structured records as part of a design that must also distinguish queued, running, waiting-for-approval, failed, and completed agent jobs, a text stream can arrive in fragments; consumers must distinguish presentation updates from complete machine-readable objects; this is why the action is one of the two required selections.

Incorrect Answers

A:

This alternative serves the separate goal to stay within input limits while keeping the most important conversation constraints because selective history management preserves task-critical state; dropping random leading messages can erase consent or requirements; the required outcomes are instead to display partial sentences without publishing malformed structured records and to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs.

B:

This alternative serves the separate goal to keep application policy separate from a user's question because instruction placement preserves the distinction between developer intent and user-supplied data; concatenating everything blurs that boundary; the required outcomes are instead to display partial sentences without publishing malformed structured records and to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs.

E:

This alternative serves the separate goal to filter risky user-visible content according to application policy because moderation is a defense layer applied around generation, not a substitute for authenticated tool access or scoped retrieval; the required outcomes are instead to display partial sentences without publishing malformed structured records and to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs.

Question 782

A team maintaining a Python Claude API backend has two different engineering requirements: (1) make a direct REST request with a declared supported API contract, and (2) authenticate a server-to-server Claude API request. Which TWO independent changes directly meet them? Choose TWO.

  1. Supply the required API version header.
  2. Give mutating operations an application-level idempotency key.
  3. Place a valid secret in the documented API authentication header.
  4. Set realistic connection and response timeouts with an explicit failure path.
  5. Version prompt files alongside relevant application code.

Explanation

Correct Answers

A:

To make a direct REST request with a declared supported API contract as part of a design that must also authenticate a server-to-server Claude API request, the version header selects the protocol contract supported by the endpoint, preventing accidental dependence on unspecified behavior; this is why the action is one of the two required selections.

C:

To authenticate a server-to-server Claude API request as part of a design that must also make a direct REST request with a declared supported API contract, API authentication is a request transport concern; placing a key inside the prompt body neither authenticates the request nor protects it; this is why the action is one of the two required selections.

Incorrect Answers

B:

This alternative serves the separate goal to prevent duplicate purchases or tickets if an agent repeats a tool call because idempotency ensures replays of the same intended action do not create duplicate real-world effects even when orchestration retries; the required outcomes are instead to make a direct REST request with a declared supported API contract and to authenticate a server-to-server Claude API request.

D:

This alternative serves the separate goal 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; the required outcomes are instead to make a direct REST request with a declared supported API contract and to authenticate a server-to-server Claude API request.

E:

This alternative serves the separate goal to trace exactly which prompt template was deployed with a code change because prompts change software behavior and should be reviewed and diffed like code, rather than edited anonymously in production; the required outcomes are instead to make a direct REST request with a declared supported API contract and to authenticate a server-to-server Claude API request.

Question 783

In a customer-facing AI feature, testing reveals that the system cannot ask questions about information in a user-provided PDF through a supported document input and cannot avoid silently treating a broken streaming connection as a complete answer. Select the two targeted actions that close these gaps. Choose TWO.

  1. Send instructions using the request's top-level system field.
  2. Include a typed image content block in the message.
  3. Configure the max_tokens request parameter appropriately.
  4. Detect transport interruption and mark incomplete generated content.
  5. Attach the PDF using the supported document content form.

Explanation

Correct Answers

D:

To avoid silently treating a broken streaming connection as a complete answer as part of a design that must also ask questions about information in a user-provided PDF through a supported document input, network termination before a final message event can leave a partial response, which needs explicit recovery rather than success handling; this is why the action is one of the two required selections.

E:

To ask questions about information in a user-provided PDF through a supported document input as part of a design that must also avoid silently treating a broken streaming connection as a complete answer, document analysis depends on actual supported content blocks and size limits; a local file path alone is not accessible to the remote model; this is why the action is one of the two required selections.

Incorrect Answers

A:

This alternative serves the separate goal 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; the required outcomes are instead to ask questions about information in a user-provided PDF through a supported document input and to avoid silently treating a broken streaming connection as a complete answer.

B:

This alternative serves the separate goal to ask Claude to interpret a supported image supplied as part of a request because multimodal input must use the API's image representation and supported sourcing; merely writing a filename in text does not transfer pixels; the required outcomes are instead to ask questions about information in a user-provided PDF through a supported document input and to avoid silently treating a broken streaming connection as a complete answer.

C:

This alternative serves the separate goal to cap the maximum output generated by a Messages API request because a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers; the required outcomes are instead to ask questions about information in a user-provided PDF through a supported document input and to avoid silently treating a broken streaming connection as a complete answer.

Question 784

For a production inference application, the missing capability is to keep application policy separate from a user's question. What should the developers implement?

  1. Place stable application rules in system instructions and untrusted requests in user content.
  2. Send instructions using the request's top-level system field.
  3. Buffer structured data until it can be parsed and validated before UI commit.
  4. Store and retrieve message history by authenticated tenant and conversation ID.

Explanation

Correct Answer

A:

To keep application policy separate from a user's question in this production inference application, instruction placement preserves the distinction between developer intent and user-supplied data; concatenating everything blurs that boundary; the proposed implementation directly supplies that capability.

Incorrect Answers

B:

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 keep application policy separate from a user's question.

C:

The proposed alternative helps to display partial sentences without publishing malformed structured records because a text stream can arrive in fragments; consumers must distinguish presentation updates from complete machine-readable objects; that mechanism does not meet the different requirement to keep application policy separate from a user's question.

D:

The proposed alternative helps to prevent chat transcripts from different accounts entering the same Claude request because session hygiene requires server-enforced isolation; model instructions cannot repair a history assembled from the wrong user; that mechanism does not meet the different requirement to keep application policy separate from a user's question.

Question 785

The technical owner of a business workflow that calls Claude has to avoid an outage when a pinned model version approaches retirement. A separate requirement is to catch mismatches between model calls, tool handlers, and application persistence. Which two-part remediation covers both?

  1. Perform both steps: (1) Pin a supported explicit model version where stability is required; (2) configure the max_tokens request parameter appropriately.
  2. Perform both steps: (1) Track provider deprecation notices and test migration before the removal date; (2) exercise complete request-to-tool-to-response paths in a controlled environment.
  3. Perform both steps: (1) Track provider deprecation notices and test migration before the removal date; (2) configure the max_tokens request parameter appropriately.
  4. Perform both steps: (1) Pin a supported explicit model version where stability is required; (2) exercise complete request-to-tool-to-response paths in a controlled environment.

Explanation

Correct Answer

B:

The first change enables the team to avoid an outage when a pinned model version approaches retirement because lifecycle management treats model availability as a dependency and validates output regressions before switching production traffic; the second addresses the separate need to catch mismatches between model calls, tool handlers, and application persistence because unit tests cannot reveal every serialization or permission issue across service boundaries; integration tests validate the connected contract.

Incorrect Answers

A:

Both steps target different results—reproduce production behavior across deploys instead of silently adopting a new model release and cap the maximum output generated by a Messages API request—because explicit version selection limits unexpected changes; a release process should evaluate upgrades and retirement timelines deliberately and a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers; the required capabilities are instead to avoid an outage when a pinned model version approaches retirement and to catch mismatches between model calls, tool handlers, and application persistence.

C:

The first step is appropriate for the requirement to avoid an outage when a pinned model version approaches retirement because lifecycle management treats model availability as a dependency and validates output regressions before switching production traffic; the other step instead aims to cap the maximum output generated by a Messages API request because a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers, which does not meet the second requirement to catch mismatches between model calls, tool handlers, and application persistence.

D:

The second step meets the requirement to catch mismatches between model calls, tool handlers, and application persistence because unit tests cannot reveal every serialization or permission issue across service boundaries; integration tests validate the connected contract; the first step would only help to reproduce production behavior across deploys instead of silently adopting a new model release because explicit version selection limits unexpected changes; a release process should evaluate upgrades and retirement timelines deliberately, leaving the separate requirement to avoid an outage when a pinned model version approaches retirement unmet.

Question 786

A team maintaining a TypeScript inference gateway must meet 2 separate acceptance criteria: (1) authenticate a server-to-server Claude API request; (2) determine whether a quality regression came from a recent instruction edit. Which two implementation actions directly satisfy the stated requirements? Choose TWO.

  1. Read the completed stream's usage and final message metadata.
  2. Use stop_sequences and inspect the returned stop_sequence field.
  3. Handle stop_reason max_tokens as truncation and continue or revise the limit.
  4. Store prompt versions with release identifiers and rollback history.
  5. Place a valid secret in the documented API authentication header.

Explanation

Correct Answers

D:

The test to determine whether a quality regression came from a recent instruction edit is met because a prompt is a behavior-changing artifact; versioning makes comparisons and safe reversions possible during incident response; the remaining selection covers the separate need to authenticate a server-to-server Claude API request.

E:

The test to authenticate a server-to-server Claude API request is met because API authentication is a request transport concern; placing a key inside the prompt body neither authenticates the request nor protects it; the remaining selection covers the separate need to determine whether a quality regression came from a recent instruction edit.

Incorrect Answers

A:

The action is useful for the separate capability to account accurately for token consumption when a response is streamed because early text deltas do not necessarily carry authoritative final usage or stop information; accounting must wait for the appropriate terminal event; however, the required test outcomes are to determine whether a quality regression came from a recent instruction edit and to authenticate a server-to-server Claude API request.

B:

The action is useful for the separate capability to enforce a caller-defined textual boundary on generation because a stop sequence halts generation at a specified marker, distinct from natural completion and separate from a JSON schema validator; however, the required test outcomes are to determine whether a quality regression came from a recent instruction edit and to authenticate a server-to-server Claude API request.

C:

The action is useful for the separate capability 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; however, the required test outcomes are to determine whether a quality regression came from a recent instruction edit and to authenticate a server-to-server Claude API request.

Question 787

A production readiness review of a hosted document-processing service finds that the team cannot yet use provider-hosted search or execution without implementing the tool body locally or continue a chat with relevant prior turns despite the API being stateless. Which paired changes directly remedy the two gaps?

  1. Perform both steps: (1) Configure an available server-side tool with the required API definition; (2) inspect changes to content and ordering before the cache breakpoint.
  2. Perform both steps: (1) Configure an available server-side tool with the required API definition; (2) include the necessary conversation history in each messages api call.
  3. Perform both steps: (1) Submit independent requests through the Message Batches API; (2) include the necessary conversation history in each messages api call.
  4. Perform both steps: (1) Submit independent requests through the Message Batches API; (2) inspect changes to content and ordering before the cache breakpoint.

Explanation

Correct Answer

B:

The first change enables the team to use provider-hosted search or execution without implementing the tool body locally because provider-executed tools are handled in Anthropic's environment and differ from client functions that the caller must run; the second addresses the separate need to continue a chat with relevant prior turns despite the API being stateless because a response does not create server-side conversational memory by default; the client supplies retained turns and controls truncation.

Incorrect Answers

A:

The first step is appropriate for the requirement to use provider-hosted search or execution without implementing the tool body locally because provider-executed tools are handled in Anthropic's environment and differ from client functions that the caller must run; the other step instead aims to explain why a previously cached prompt is now charged as new input because cache reuse depends on matching prefix material; adding text to the front changes what is cached even if later text is unchanged, which does not meet the second requirement to continue a chat with relevant prior turns despite the API being stateless.

C:

The second step meets the requirement to continue a chat with relevant prior turns despite the API being stateless because a response does not create server-side conversational memory by default; the client supplies retained turns and controls truncation; the first step would only help to process a large queue of independent, noninteractive requests at a lower-cost asynchronous pace because batch processing is suited to deferred work with eventual result collection and is not a substitute for an interactive low-latency chat endpoint, leaving the separate requirement to use provider-hosted search or execution without implementing the tool body locally unmet.

D:

Both steps target different results—process a large queue of independent, noninteractive requests at a lower-cost asynchronous pace and explain why a previously cached prompt is now charged as new input—because batch processing is suited to deferred work with eventual result collection and is not a substitute for an interactive low-latency chat endpoint and cache reuse depends on matching prefix material; adding text to the front changes what is cached even if later text is unchanged; the required capabilities are instead to use provider-hosted search or execution without implementing the tool body locally and to continue a chat with relevant prior turns despite the API being stateless.

Question 788

A test for a TypeScript Claude integration fails because it cannot explain why a previously cached prompt is now charged as new input. Which change fixes the identified failure?

  1. Inspect changes to content and ordering before the cache breakpoint.
  2. Branch on stop_reason tool_use and dispatch the declared calls.
  3. Assign and preserve unique custom identifiers for batched requests.
  4. Use stop_sequences and inspect the returned stop_sequence field.

Explanation

Correct Answer

A:

To explain why a previously cached prompt is now charged as new input in this TypeScript Claude integration, cache reuse depends on matching prefix material; adding text to the front changes what is cached even if later text is unchanged; the proposed implementation directly supplies that capability.

Incorrect Answers

B:

The proposed alternative helps to recognize that the model is asking the application to execute a client tool because a tool-use stop requires host-side handling and a follow-up message containing results, not presenting the call as final prose; that mechanism does not meet the different requirement to explain why a previously cached prompt is now charged as new input.

C:

The proposed alternative helps to map out-of-order batch outputs back to source records reliably because asynchronous results need stable correlation keys; relying on processing order can attach an output to the wrong input; that mechanism does not meet the different requirement to explain why a previously cached prompt is now charged as new input.

D:

The proposed alternative helps to enforce a caller-defined textual boundary on generation because a stop sequence halts generation at a specified marker, distinct from natural completion and separate from a JSON schema validator; that mechanism does not meet the different requirement to explain why a previously cached prompt is now charged as new input.

Question 789

A team maintaining a TypeScript inference gateway must meet 2 separate acceptance criteria: (1) preserve behavior while replacing a fragile parser in an AI integration; (2) turn a support desk's responsiveness expectation into an engineering objective. Which two implementation actions directly satisfy the stated requirements? Choose TWO.

  1. Add automated consumer-provider contract tests.
  2. Set an end-to-end latency target and a measurement method.
  3. Buffer structured data until it can be parsed and validated before UI commit.
  4. Route Claude requests through a trusted backend service.
  5. Refactor in bounded steps under existing tests.

Explanation

Correct Answers

B:

The test to turn a support desk's responsiveness expectation into an engineering objective is met because a latency target is a nonfunctional requirement; model choice, network overhead, tool calls, and rendering all affect whether the service meets it; the remaining selection covers the separate need to preserve behavior while replacing a fragile parser in an AI integration.

E:

The test to preserve behavior while replacing a fragile parser in an AI integration is met because small changes constrain regression scope; a wholesale rewrite makes it harder to isolate whether model or parsing behavior changed; the remaining selection covers the separate need to turn a support desk's responsiveness expectation into an engineering objective.

Incorrect Answers

A:

The action is useful for the separate capability to detect a changed tool response field before it breaks downstream code because schema contracts make integration changes visible and prevent a renamed field from silently corrupting later model context; however, the required test outcomes are to turn a support desk's responsiveness expectation into an engineering objective and to preserve behavior while replacing a fragile parser in an AI integration.

C:

The action is useful for the separate capability to display partial sentences without publishing malformed structured records because a text stream can arrive in fragments; consumers must distinguish presentation updates from complete machine-readable objects; however, the required test outcomes are to turn a support desk's responsiveness expectation into an engineering objective and to preserve behavior while replacing a fragile parser in an AI integration.

D:

The action is useful for the separate capability to keep a browser application from exposing the secret used for model calls because a backend controls credentials and access policy while the UI sends user input through an authenticated application endpoint; however, the required test outcomes are to turn a support desk's responsiveness expectation into an engineering objective and to preserve behavior while replacing a fragile parser in an AI integration.

Question 790

For a Python Claude API backend, the missing capability is to avoid an outage when a pinned model version approaches retirement. What should the developers implement?

  1. Separate development credentials, data, and tool endpoints from production.
  2. Require structured request IDs, tool traces, and version metadata with privacy controls.
  3. Maintain links between requirements, implementation changes, and verification cases.
  4. Track provider deprecation notices and test migration before the removal date.

Explanation

Correct Answer

D:

To avoid an outage when a pinned model version approaches retirement in this Python Claude API backend, lifecycle management treats model availability as a dependency and validates output regressions before switching production traffic; the proposed implementation directly supplies that capability.

Incorrect Answers

A:

The proposed alternative helps to test experimental prompts and tools without reaching real customer records because environment isolation prevents exploratory code from inheriting real business permissions and improves reproducibility of failures; that mechanism does not meet the different requirement to avoid an outage when a pinned model version approaches retirement.

B:

The proposed alternative helps to enable an administrator to determine how a particular AI decision was produced because traceability depends on consistent operational evidence, not just retaining the final generated answer or a screenshot; that mechanism does not meet the different requirement to avoid an outage when a pinned model version approaches retirement.

C:

The proposed alternative helps to ensure each production feature can be tied to an approved acceptance test because requirement traceability helps prevent a prompt or model update from silently changing behavior outside the agreed product scope; that mechanism does not meet the different requirement to avoid an outage when a pinned model version approaches retirement.

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