CCDV-F Study Guide

CCDV-F questions and answers — Domain 1: Applications and Integration

17 practice questions on Applications and Integration, the domain weighted at 33.1% of the CCDV-F exam. Every answer explains why the distractors fail — that is the part that transfers to questions you have not seen before.

Question 1

Your integration reads response.content[0].text. It works in testing but throws in production once tools are enabled. Why?

  1. Tool responses are returned as a separate field
  2. content is an array of typed blocks, and a tool_use or thinking block can precede the text block
  3. Enabling tools changes the response to a string
  4. The SDK version is out of date

Answer: B. content is always an array of typed blocks. Once tools or thinking are enabled, index 0 is frequently not a text block. Iterate and dispatch on block.type rather than indexing blindly.

Question 2

Where does the system prompt belong in a Messages API request?

  1. As the first entry in messages with role: "system"
  2. As the top-level system parameter
  3. Prepended to the first user message
  4. In metadata

Answer: B. system is a top-level parameter, not a message role — the Messages API has only user and assistant. Using the array form of system is also what lets you attach cache_control to it.

Question 3

An agent loop occasionally produces truncated JSON that fails to parse. Which check is missing?

  1. Validating the JSON schema after parsing
  2. Handling stop_reason: "max_tokens" as truncation rather than completion
  3. Retrying on HTTP 500
  4. Setting a lower temperature

Answer: B. max_tokens means generation was cut off mid-structure, so the JSON is incomplete by construction. Schema validation catches it only after the fact and cannot repair it; the fix is to detect the stop reason and either continue or raise the limit.

Question 4

A request returns HTTP 413. What should your code do?

  1. Retry with exponential backoff
  2. Split or reduce the payload — it exceeds the size limit and will fail identically on retry
  3. Wait for the retry-after header to elapse
  4. Switch to a model with a larger context window

Answer: B. 413 is request_too_large: a permanent property of that request. Caps are 32 MB for Messages, 256 MB for Batch and 500 MB for Files. Retrying wastes latency; a larger context window addresses token count, which is a different limit from payload size.

Question 5

Which pair of parameters should you avoid tuning at the same time?

  1. max_tokens and stop_sequences
  2. temperature and top_p
  3. system and metadata
  4. stream and tools

Answer: B. Both control sampling and interact in ways that are hard to reason about. Adjust one and leave the other at its default. The other pairings are unrelated and combine freely.

Question 6

You are streaming a response that includes a tool call. When is it safe to parse the tool's arguments?

  1. As each input_json_delta arrives
  2. After content_block_stop for that block
  3. After message_start
  4. As soon as content_block_start reports a tool_use block

Answer: B. Tool arguments stream as input_json_delta fragments, so the JSON is syntactically incomplete until the block closes. Accumulate the deltas and parse at content_block_stop.

Question 7

In a streamed response, where do the authoritative stop_reason and final usage appear?

  1. message_start
  2. message_delta
  3. content_block_stop
  4. message_stop

Answer: B. message_start carries the shell and initial usage; the final stop_reason and cumulative usage arrive on message_delta, just before message_stop closes the stream.

Question 8

Your application sends the same 40-page policy PDF with every user question. What is the best change?

  1. Summarise the PDF once and send the summary instead
  2. Upload it once via the Files API and reference it by file_id, and cache the stable prefix
  3. Split the PDF across several requests
  4. Increase max_tokens

Answer: B. Uploading once and referencing by ID stops you re-transmitting the bytes on every call, and prompt caching stops you re-paying full price for the same input tokens. Summarising discards detail the questions may depend on, and max_tokens governs output.

Question 9

Which value is safe to put in metadata.user_id?

  1. The user's email address
  2. An opaque hash of the user identifier
  3. The user's full name and account number
  4. The session's raw JWT

Answer: B. metadata.user_id supports abuse monitoring and should never carry personal data. A stable opaque hash gives Anthropic the correlation signal without exposing an identity, and a raw token in a metadata field is a credential leak.

Question 10

An engineer wraps the official SDK in a custom retry loop with three attempts and exponential backoff. What is the likely consequence?

  1. More reliable delivery under load
  2. Compounded delays, because the SDK already retries transient failures with backoff
  3. Lower token costs
  4. Automatic handling of 400 errors

Answer: B. The official SDKs already retry transient failures with exponential backoff. Wrapping another loop around that multiplies the total wait — three outer attempts each triggering the SDK's own retries. Configure the SDK's retry behaviour instead of layering on top of it.

Question 11

Which field should you log on every API call to make production issues diagnosable?

  1. model
  2. request_id
  3. stop_sequence
  4. role

Answer: B. request_id is the identifier that lets a specific call be traced, and it is what support asks for. model and role are useful context but not identifying; stop_sequence is null on most responses.

Question 12

A conversation fails with model_context_window_exceeded. Which responses actually address it? (Select two.)

  1. Trim or summarise older turns before resending
  2. Increase max_tokens
  3. Remove attachments that are no longer relevant to the current question
  4. Lower the temperature

Answer: A. Correct answers are trimming history and removing irrelevant attachments — the window covers system prompt, tools, full history, attachments and the response together, so the only fix is to send less. max_tokens reserves output space and makes the problem worse; temperature is unrelated. (On a multiple-response question, mark both.)

Question 13

Why does a long conversation get progressively more expensive?

  1. The model charges a session fee
  2. The API is stateless, so every turn resends the entire history as input tokens
  3. Output tokens increase with conversation length
  4. Rate limits force smaller batches

Answer: B. There is no server-side conversation state. Each turn re-sends everything that came before, so input tokens grow with the conversation. This is also why prompt caching and context trimming matter so much in multi-turn applications.

Question 14

Which configuration practice does the exam favour for a production integration?

  1. Hardcode the model ID at each call site so behaviour is explicit
  2. Pin an explicit model version in configuration, and re-run evals when you change it
  3. Always use the floating latest alias so you get improvements automatically
  4. Store the API key in the repository but restrict repository access

Answer: B. Pinning gives you a stable baseline and makes the model change a deliberate, tested deployment. A floating alias changes behaviour without a release; hardcoding at call sites makes the change a code-wide edit; and keys never belong in source control regardless of who can read it.

Question 15

Your web front end calls the Claude API directly with the organisation's API key. What is the problem?

  1. Browser requests are slower
  2. The key is exposed to anyone who opens developer tools
  3. The Messages API does not support CORS
  4. Streaming will not work

Answer: B. Anything shipped to a client is public. Proxy through your backend, where the key stays server-side and you can authenticate the user and enforce your own quotas.

Question 16

A tool executes successfully but your next request errors as malformed. The response contained two tool_use blocks and you returned one tool_result. What is wrong?

  1. Only one tool may be called per turn
  2. Every tool_use block requires a matching tool_result, and all of them go back together in the next message
  3. tool_result blocks belong in an assistant message
  4. The second tool must be called in a separate conversation

Answer: B. Parallel tool use returns several tool_use blocks in one response, and each needs a result keyed by its tool_use_id, all in the same following user message. If your backend cannot execute concurrently, set disable_parallel_tool_use rather than dropping results.

Question 17

Which is the correct way to signal to Claude that a tool failed?

  1. Raise an exception and omit the tool_result block
  2. Return a tool_result with is_error: true and the reason in content
  3. Return an empty tool_result
  4. Send a new user message describing the failure

Answer: B. Failures travel through the same protocol channel as successes. Omitting the block breaks the required pairing; an empty result reads as "no data found", which is a different fact; and a separate user message loses the association with the call.

← Previous: Cheat sheet  |  Next: Questions & answers — Domain 2 →

Developer CCDV-F Real Exam Questions

Ready to Pass Your CCDV-F Certification?

Practice with authentic exam questions, verified explanations, and timed test simulation to guarantee your success.

Starting from $69.00
Take Practice Exam →