# CCDV-F Practice Questions (Free, 2026) | Your AI Department

> 60 free scenario-based CCDV-F practice questions for Claude Certified Developer – Foundations, with explanations, weighted by the published exam blueprint.

Source: https://youraidept.com/network/ccdv-f-practice-questions

Practice questions

# CCDV-F practice questions, free.

60 original scenario questions for Claude Certified Developer – Foundations, written from the published blueprint and weighted the way the exam is. Pick an answer, check it, read why. None of these are exam questions; the real exam tests the same judgment on scenarios you have not seen.

Want the real thing? [Take the timed CCDV-F practice exam](https://youraidept.com/network/ccdv-f-practice-exam): 53 questions in 120 minutes, scored against the 720 pass mark, with a domain breakdown.

## How to use these

Filter by domain to drill a weak area, or work through the whole bank. Answer before you reveal. Note the domain of every miss. When you are done, the score box tells you whether you are above the equivalent of the 720 pass mark; if you are not, the domains you missed are your reading list. The full domain-by-domain notes are on [the CCDV-F exam page](https://youraidept.com/network/ccdv-f).

## The questions

All domains (60) Applications and integration (20) Model selection and optimization (10) Agents and workflows (9) Prompt and context engineering (7) Tools and MCPs (6) Security and safety (5) Eval, testing, and debugging (1) Claude Code (2)

Applications and integration

A response comes back with stop_reason set to max_tokens. What happened?

- The output reached the max_tokens limit and was cut off before the model finished
- The input exceeded the context window and the request was rejected with a 400
- The model reached the natural end of its turn, so the text is complete as returned
- The model emitted a tool_use block and is waiting for a tool_result from your code

Check answer

### Show answer

Answer: The output reached the max_tokens limit and was cut off before the model finished. max_tokens means truncation: the output hit the cap you set. Raise the limit or continue the response. end_turn is the natural finish, and an oversized input fails before any stop_reason is produced.

Applications and integration

A response has stop_reason tool_use. What must your code do next?

- Execute the requested tool, append a tool_result block with the matching id, and call the model again
- Retry the same request with tool_choice set to none so the model answers in plain text
- Return the text blocks to the user, since the API already executed the tool on the server side before responding
- Wait for the model's next message, which will carry the tool_result once execution finishes

Check answer

### Show answer

Answer: Execute the requested tool, append a tool_result block with the matching id, and call the model again. tool_use hands control to your code. You run the tool, return the result in a tool_result block, and let the model continue. Client tools are not executed server-side, and the model cannot produce a tool_result on its own.

Applications and integration

Users should see the answer appear as it is generated. What do you use?

- Set stream to true and render content_block_delta events as they arrive
- Poll the messages endpoint with the message id until a status field reports completion
- Submit the request through the Message Batches API and read results as they land
- Lower max_tokens so each response returns quickly enough to feel incremental

Check answer

### Show answer

Answer: Set stream to true and render content_block_delta events as they arrive. Streaming delivers partial content as server-sent events; your client renders the deltas. There is no polling status for a synchronous message, and batches add latency rather than remove it.

Applications and integration

You have 20,000 documents to classify overnight, with no latency requirement, and cost matters. Best choice?

- Submit them through the Message Batches API and collect results when the batch completes
- Send 20,000 synchronous requests through a worker pool sized to your rate limit
- Concatenate all the documents into one request with a large max_tokens and split the output back apart by document
- Stream each request so results can be written to disk as the tokens arrive

Check answer

### Show answer

Answer: Submit them through the Message Batches API and collect results when the batch completes. Batches trade latency for lower cost and are built for large, non-urgent workloads. A worker pool works but pays full price, and one giant request runs into context and output limits.

Applications and integration

Every request includes the same 30,000-token reference manual followed by a short question. How do you cut cost?

- Upload the manual through the Files API so its tokens are billed once instead of per request
- Send the question first and the manual second so the model reads the task before the context
- Put a cache_control breakpoint on the manual block so the prefix is reused across requests
- Lower temperature and max_tokens so each request generates fewer billable output tokens

Check answer

### Show answer

Answer: Put a cache_control breakpoint on the manual block so the prefix is reused across requests. Prompt caching reuses a stable prefix. The manual is the prefix; the question changes each time and comes after the breakpoint. Files API uploads still count as input tokens on every request that references them.

Applications and integration

Your integration starts receiving HTTP 429 responses. What is the right client behavior?

- Rotate to a second API key from the same organization so requests keep flowing
- Treat 429 as a transient server fault and fail the request back to the user
- Retry immediately in a tight loop, since the limit clears as soon as the window rolls over
- Back off exponentially with jitter and honor the retry-after header when it is present

Check answer

### Show answer

Answer: Back off exponentially with jitter and honor the retry-after header when it is present. 429 is rate limiting. Exponential backoff with jitter spreads retries; retry-after tells you how long to wait. Limits apply at the organization level, so swapping keys does not help.

Model selection and optimization

A pipeline extracts three fields from short emails, millions of times a month. Which model tier makes sense?

- The most capable tier, since extraction errors at this scale compound quickly
- A mid tier with extended thinking enabled to raise accuracy on ambiguous fields
- The tier with the largest context window, so that long quoted email threads are not truncated before extraction
- The smallest tier that passes your eval, since cost and latency dominate at this volume

Check answer

### Show answer

Answer: The smallest tier that passes your eval, since cost and latency dominate at this volume. Match the model to the task. Simple, high-volume extraction is where the small tier earns its keep; measure with an eval first. Thinking adds cost on every call, which is the wrong trade for short emails.

Model selection and optimization

You need the same input to produce the same extraction every time. Which setting helps most?

- Add a longer system prompt that describes each field in detail
- Set temperature near 1 so the model commits firmly to a single answer
- Set temperature near 0 so sampling favors the most likely tokens
- Enable prompt caching so the cached prefix yields the same output

Check answer

### Show answer

Answer: Set temperature near 0 so sampling favors the most likely tokens. Low temperature makes sampling less random. It is the first lever for deterministic-style tasks. Caching reuses the prefix computation but does not constrain sampling.

Agents and workflows

Which loop correctly implements a tool-using agent?

- Call the model once with tool_choice any and return the first tool_use arguments
- Call the model; on tool_use run the tool, append the result, call again; stop on end_turn or a turn cap
- Call the model repeatedly until its text no longer mentions any tool by name
- Run every declared tool up front with default arguments, then pass all of the results to the model in a single call

Check answer

### Show answer

Answer: Call the model; on tool_use run the tool, append the result, call again; stop on end_turn or a turn cap. The agent loop alternates model turns and tool execution until the model ends its turn or a safety limit stops it. Running tools up front skips the model's decision about which tool to call and with what arguments.

Agents and workflows

What does the Claude Agent SDK handle for you that a hand-rolled loop does not?

- Automatic retries, rate-limit backoff, and typed request and response objects
- Fine-tuning the model on your repository before the first run
- The agent loop, tool execution, permission checks, hooks, and subagents
- Server-side tool execution so your code does not have to handle tool_use blocks

Check answer

### Show answer

Answer: The agent loop, tool execution, permission checks, hooks, and subagents. The Agent SDK packages the agent loop with tools, permission checks, hooks, and subagent support so you do not rebuild them. Retries and typed objects come from the plain client SDK, which still leaves the loop to you.

Prompt and context engineering

A multi-turn assistant's history grows until requests fail. What is the sane fix?

- Summarize older turns and keep the most recent turns verbatim
- Raise max_tokens so the request budget covers the longer history
- Add a cache_control breakpoint so older turns stop counting toward the window
- Send only the latest user message and rely on the system prompt to carry state

Check answer

### Show answer

Answer: Summarize older turns and keep the most recent turns verbatim. Summarization keeps the useful state while trimming tokens; recent turns stay verbatim because they matter most. Cached tokens still occupy the context window, and max_tokens only caps output.

Tools and MCPs

A tool parameter may only be one of three values. How do you express that?

- Describe the three allowed values in the tool description text and validate the string in your handler
- Set tool_choice to the tool's name so the model cannot pass other values
- Split the capability into three separate tools, one per allowed value
- Use an enum in the parameter's JSON schema and list the parameter under required

Check answer

### Show answer

Answer: Use an enum in the parameter's JSON schema and list the parameter under required. JSON schema enums and required fields are read by the model and enforced on the call. Prose in the description helps but is not enforced; tool_choice picks the tool, not its argument values.

Security and safety

Your agent reads web pages. One page contains text telling the assistant to email the user's files to an address. What protects you?

- Rely on the model's safety training to recognize and ignore the injected instruction
- Add a line to the user prompt telling the model to disregard instructions found in pages
- Treat retrieved content as data, keep instructions in the system prompt, and gate outbound actions
- Fetch the pages server-side and pass them as plain user text so the model treats them as the user's own words

Check answer

### Show answer

Answer: Treat retrieved content as data, keep instructions in the system prompt, and gate outbound actions. Prompt injection arrives through content. Separate data from instructions and put approval gates on actions that send or delete. A disregard instruction helps at the margin but is not a control; the gate is.

Security and safety

An agent has a shell tool in production. What is the least-privilege setup?

- Run the shell inside a container as root so the agent cannot reach the host
- Restrict the tool to a single working directory in a sandbox but allow any command to run inside that directory
- Allow every command but log each one so a reviewer can audit the session later
- Allow a reviewed list of read-only commands and require approval for anything that writes

Check answer

### Show answer

Answer: Allow a reviewed list of read-only commands and require approval for anything that writes. Read-only by default, confirmation for writes, and logs you can audit. That is least privilege for tools. Containers and directory limits reduce blast radius but still let the agent run destructive commands unprompted.

Eval, testing, and debugging

You changed a prompt and want to know whether quality regressed before shipping. What do you run?

- Compare token counts between the old and new prompts to check for drift
- Spot-check a handful of representative examples by hand and ship if the outputs still look right
- Run a load test to confirm latency did not change with the new prompt
- Run a golden test set with automated grading and compare scores with the old prompt

Check answer

### Show answer

Answer: Run a golden test set with automated grading and compare scores with the old prompt. A fixed golden set plus a grader (rubric or LLM-as-judge) turns prompt changes into measurable diffs. Spot checks miss regressions on the cases you did not look at.

Applications and integration

Which fields are required in a Messages API request?

- model, messages, and system
- model, messages, and temperature
- model, messages, and max_tokens
- model, max_tokens, and stream

Check answer

### Show answer

Answer: model, messages, and max_tokens. Every request names the model, provides messages, and sets max_tokens. system, temperature, and stream are optional.

Applications and integration

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

- As a text block at the start of the first user message
- As the first entry in messages with role set to system
- In the top-level system parameter of the request
- In the metadata object alongside the user_id

Check answer

### Show answer

Answer: In the top-level system parameter of the request. The Messages API takes the system prompt as a top-level parameter. messages only accepts user and assistant roles, so a system role entry is rejected.

Applications and integration

A response's content array contains a text block followed by a tool_use block. What does that mean?

- The model wrote some text, then requested a tool call; you run it and return a tool_result
- The response was truncated by max_tokens while writing the tool arguments
- Two parallel responses were merged; keep the tool_use block and drop the text
- The model finished its turn with end_turn; the tool_use block is a suggestion your code may ignore

Check answer

### Show answer

Answer: The model wrote some text, then requested a tool call; you run it and return a tool_result. Content blocks can mix text and tool_use; tool_use hands control to your code and the stop_reason will be tool_use. Truncation would show stop_reason max_tokens instead.

Applications and integration

Your app sends an image for analysis. How is it included?

- As a file uploaded through the Files API and referenced from the tools array by its file id
- As a data URL pasted into the text of the user message
- As an image content block, with a base64 or URL source, inside a user message
- As an image block inside the system parameter next to the instructions

Check answer

### Show answer

Answer: As an image content block, with a base64 or URL source, inside a user message. Images are content blocks in the user turn with a source of type base64 or url. The system parameter and the tools array do not carry images.

Applications and integration

What does stop_reason end_turn tell you?

- The model finished its turn naturally and is not waiting on anything
- The model stopped at a stop sequence you supplied in the request
- The output was cut off because the response reached max_tokens
- The model paused a long-running server tool turn and you should call again

Check answer

### Show answer

Answer: The model finished its turn naturally and is not waiting on anything. end_turn is the normal completion signal. A custom stop sequence reports stop_sequence, and a paused server tool turn reports pause_turn.

Applications and integration

A streaming response is interrupted midway. What should a robust client do?

- Render the partial text as the final answer, since deltas are already committed
- Detect the missing message_stop event, then retry or mark the partial output as incomplete
- Send a follow-up request with stop_reason set to resume so the model continues
- Fall back to non-streaming requests for the rest of the session so the failure does not recur

Check answer

### Show answer

Answer: Detect the missing message_stop event, then retry or mark the partial output as incomplete. Streams can drop; a complete stream ends with message_stop. Handle incompleteness explicitly. stop_reason is a response field, not something you can send.

Applications and integration

You need consistent structured data from many documents. Which approach is most robust?

- Define a tool with a JSON schema for the fields, force it with tool_choice, and validate the arguments
- Extract the values from free text with regular expressions tuned on sample documents
- Ask for a markdown table in the prompt, set temperature to 0, and split each returned row on the pipe character
- Set temperature to 0 and ask for JSON, trusting the output to be well formed

Check answer

### Show answer

Answer: Define a tool with a JSON schema for the fields, force it with tool_choice, and validate the arguments. Schema-enforced tool arguments give reliable structure; validation catches the rest. Temperature 0 makes output steadier but does not guarantee valid JSON.

Applications and integration

Which header carries your credential when calling the API directly?

- Authorization with a Bearer token
- anthropic-version with the key appended
- x-api-key with the key as its value
- x-anthropic-token with the key as its value

Check answer

### Show answer

Answer: x-api-key with the key as its value. The Anthropic API authenticates with the x-api-key header. anthropic-version is a separate required header that pins the API version.

Applications and integration

A request returns HTTP 400 with an invalid_request_error. Most likely cause?

- The request exceeded the rate limit for your organization's tier
- The model is overloaded and the request should be retried later
- The API key is valid but the organization lacks permission for the requested model
- A malformed body, such as a missing required field or an unsupported parameter

Check answer

### Show answer

Answer: A malformed body, such as a missing required field or an unsupported parameter. 400s are client-side shape problems. Rate limits are 429, permission problems are 403, and overload is 529.

Applications and integration

What is the Files API useful for?

- Caching a document so later requests skip input token billing for it
- Storing conversation history server-side so you send only new turns
- Uploading a document once and referencing it by file id across many requests
- Attaching a document to a Message Batch so every request inside that batch can read it

Check answer

### Show answer

Answer: Uploading a document once and referencing it by file id across many requests. Upload once, reference by id. Referenced files still count as input tokens; skipping repeated billing is what prompt caching does.

Applications and integration

A batch job finished but some requests show errors. What should your code do?

- Retry the batch at a smaller size so fewer requests time out
- Read each request's result, retry the failed ones, and treat the batch as non-atomic
- Cancel the batch and resubmit every request, since partially failed batches are not billed at all
- Treat the whole batch as failed and raise an error for the caller to handle

Check answer

### Show answer

Answer: Read each request's result, retry the failed ones, and treat the batch as non-atomic. Batches report per-request outcomes; handle them individually. Successful requests in a partially failed batch are billed and their results are valid.

Applications and integration

You want to count tokens before sending a large prompt to avoid exceeding limits. Which capability?

- The token counting endpoint, which returns input tokens for a prompt
- The count_tokens flag on the messages request
- An estimate from character count divided by four
- The usage field on the streaming message_start event, which reports input tokens early

Check answer

### Show answer

Answer: The token counting endpoint, which returns input tokens for a prompt. Token counting lets you budget before you send. message_start usage arrives only after the request is accepted, and there is no count_tokens flag on messages.

Applications and integration

Which SDK pattern avoids re-implementing the tool loop by hand?

- Streaming with a callback that executes tools inline
- A tool runner or agent helper provided by the SDK
- Wrapping the messages call in a retry decorator
- Setting tool_choice to auto so the API runs the tools itself

Check answer

### Show answer

Answer: A tool runner or agent helper provided by the SDK. SDK helpers manage the tool-call loop for you. tool_choice auto only lets the model decide whether to call a tool; execution is still your job.

Applications and integration

A multi-turn app appends every response to the history. After 50 turns the requests fail. What is the fix?

- Raise max_tokens so the model has room to answer the longer thread
- Trim or summarize older turns to stay inside the context window
- Add a cache_control breakpoint so cached turns are excluded from the limit
- Switch to a model with extended thinking to handle the longer input

Check answer

### Show answer

Answer: Trim or summarize older turns to stay inside the context window. History grows; manage it. Cached tokens still occupy the context window, and max_tokens only limits output.

Model selection and optimization

Which is the best practice for choosing a model tier for a new feature?

- Use the largest tier for anything customer-facing and the smallest tier for internal tooling and scripts
- Pick the tier with the largest context window so prompts will not need trimming
- Prototype on a capable tier, then test whether a smaller tier passes your eval at lower cost
- Start on the smallest tier and move up only when users report errors

Check answer

### Show answer

Answer: Prototype on a capable tier, then test whether a smaller tier passes your eval at lower cost. Measure quality per tier; do not assume. Waiting for user complaints means shipping a regression to find it.

Model selection and optimization

Output tokens dominate latency for a summarization endpoint. Which lever helps most?

- Enable prompt caching on the source document so the whole response is served faster
- Move the request to the Message Batches API for higher throughput
- Constrain the output length and format so the model writes fewer tokens
- Add extended thinking so the model plans before writing the summary

Check answer

### Show answer

Answer: Constrain the output length and format so the model writes fewer tokens. Fewer output tokens means faster responses. Caching speeds up input processing, which is not the bottleneck here.

Model selection and optimization

What does max_tokens control?

- The size of the prompt prefix that is eligible for caching
- The maximum number of output tokens the model may generate
- The number of tokens kept when the context window overflows
- The total tokens allowed across input and output for the request

Check answer

### Show answer

Answer: The maximum number of output tokens the model may generate. max_tokens caps output only. Input is bounded separately by the model's context window.

Model selection and optimization

A classification endpoint with a fixed label set should use which sampling setting?

- Low temperature so the same input maps to the same label
- A high top_p so rare labels are not excluded
- High temperature so the model explores less obvious labels
- Default temperature with top_k raised to widen the candidate set

Check answer

### Show answer

Answer: Low temperature so the same input maps to the same label. Deterministic tasks want low temperature. Widening the candidate set with top_k or top_p pushes the other way.

Model selection and optimization

When does extended thinking justify its cost?

- On every request, since thinking is cached and free after the first call
- On short factual lookups where the answer must be verified twice
- On streaming requests, where thinking fills time while text arrives
- On hard multi-step problems where accuracy matters more than latency

Check answer

### Show answer

Answer: On hard multi-step problems where accuracy matters more than latency. Spend thinking budget where reasoning pays. Thinking tokens are billed as output on each request; they are not cached away.

Model selection and optimization

Your bill is dominated by a stable 20k-token system prompt sent on every call. First optimization?

- Add a cache_control breakpoint to the system prompt so its tokens are read from cache
- Move the prompt into the first user message so it is billed as one block
- Switch to a smaller model tier, since input tokens cost less there
- Send the requests through the Batch API to get the discounted rate

Check answer

### Show answer

Answer: Add a cache_control breakpoint to the system prompt so its tokens are read from cache. Caching a stable prefix cuts repeated input cost without changing the model or latency. Batching also discounts but changes delivery time and does not fit interactive calls.

Model selection and optimization

Which workload is a good fit for the Batch API?

- An IDE assistant that answers as the developer types
- A voice agent that needs turn-by-turn responses
- Nightly enrichment of a million records with no latency requirement
- A live customer chat reply that must appear on screen within a couple of seconds

Check answer

### Show answer

Answer: Nightly enrichment of a million records with no latency requirement. Batches trade latency for cost. The other three are interactive and cannot wait for a batch to complete.

Model selection and optimization

What is a reasonable way to compare two models for your task?

- Run the same eval set through both and compare accuracy, cost, and latency
- Compare context window sizes and choose the larger one
- Ask each model to rate its own fitness for the task
- Pick the newer model, since each release is documented as improving on the last

Check answer

### Show answer

Answer: Run the same eval set through both and compare accuracy, cost, and latency. Head-to-head evals on your own data decide; release dates and self-assessments do not.

Agents and workflows

In a hand-rolled agent loop, what must happen before calling the model again after a tool call?

- Remove the tool_use block from history so the model does not call it again
- Change tool_choice to none so the model must answer in text
- Append a tool_result block whose tool_use_id matches the tool_use block
- Reset the conversation and resend the system prompt with the tool output

Check answer

### Show answer

Answer: Append a tool_result block whose tool_use_id matches the tool_use block. Tool results must be returned with the matching id, and the tool_use block stays in history so the pairing is valid.

Agents and workflows

Which pattern fits 'translate, then have a second call grade the translation, then revise until it passes'?

- Routing by input type
- Orchestrator-workers
- Parallel sectioning
- Evaluator-optimizer loop

Check answer

### Show answer

Answer: Evaluator-optimizer loop. Generate, evaluate, refine. Orchestrator-workers splits a task across workers; it does not grade and revise.

Agents and workflows

What should limit an agent loop besides end_turn?

- A maximum number of iterations plus a time or cost budget
- The context window, which ends the loop once it fills up
- A stop sequence that fires when the model writes the word done
- A max_tokens value low enough to stop long-running turns

Check answer

### Show answer

Answer: A maximum number of iterations plus a time or cost budget. Hard caps prevent runaway loops. Letting the context window fill is a crash, not a limit.

Agents and workflows

The Claude Agent SDK's hooks are useful for:

- Switching the model mid-run when a task turns out to need more capability than expected
- Rewriting the system prompt between turns based on the user's tone
- Injecting API credentials into the environment before each tool runs
- Running deterministic checks around tool calls, such as blocking a dangerous command

Check answer

### Show answer

Answer: Running deterministic checks around tool calls, such as blocking a dangerous command. Hooks wrap tool calls with your own logic, such as blocking or transforming a call. Model switching and prompt rewriting are not what hooks are for.

Agents and workflows

A workflow has a step that sometimes needs human input. How should the code model it?

- A default value so the step completes and the human reviews afterwards
- A pause state that persists progress and resumes when the input arrives
- A blocking loop that polls for the input every few seconds until it appears
- A retry policy that restarts the workflow from the top once input exists

Check answer

### Show answer

Answer: A pause state that persists progress and resumes when the input arrives. Human-in-the-loop steps need durable pause and resume. Polling holds resources open, and restarting repeats work already done.

Agents and workflows

Which is true about subagents in the SDK?

- They must use the same system prompt and model as the parent
- They run with their own context and return a result to the parent
- They share the parent's full conversation so nothing needs restating
- They run tools only through the parent, which executes on their behalf

Check answer

### Show answer

Answer: They run with their own context and return a result to the parent. Subagents isolate context; the parent gets back a result, not the subagent's transcript.

Agents and workflows

Why give each workflow step one responsibility?

- Each step becomes testable on its own and failures are easier to localize
- It lets every step share one system prompt across the whole workflow, which keeps behavior consistent
- Smaller steps use fewer tokens per run, which lowers cost
- The API rejects steps that combine more than one tool

Check answer

### Show answer

Answer: Each step becomes testable on its own and failures are easier to localize. Single-purpose steps are debuggable. Token savings are not guaranteed, and the API has no such rule.

Prompt and context engineering

Where should a long reference document sit relative to the question in a prompt?

- Before the question, clearly delimited
- In the system prompt instead of a user turn
- Split evenly across several user turns
- After the question, so the task is read first

Check answer

### Show answer

Answer: Before the question, clearly delimited. Documents first, question last. Splitting across turns fragments the reference and confuses the conversation structure.

Prompt and context engineering

Which technique reduces the chance that instructions inside a document are followed?

- Shorten the document so injected text has fewer tokens to work with
- Wrap documents in tags, label them as data, and keep instructions outside them
- Set temperature to 0 so the model sticks to its original instructions
- Put the document in the system prompt so it carries top-level authority

Check answer

### Show answer

Answer: Wrap documents in tags, label them as data, and keep instructions outside them. Separate data from instructions. Putting the document in the system prompt does the opposite: it lends the content authority.

Prompt and context engineering

What is the benefit of putting the system prompt in the system parameter rather than the first user message?

- It removes the instructions from the request's input token count
- It lets you change instructions mid-conversation without a new request
- Standing instructions stay stable and separate, and the prefix caches well
- The model gives the system parameter absolute priority over any later user turn or tool result

Check answer

### Show answer

Answer: Standing instructions stay stable and separate, and the prefix caches well. Stable, separate, cacheable. The system prompt is still billed as input tokens.

Prompt and context engineering

How can you make an extraction prompt more reliable without changing the model?

- Raise temperature so the model handles unusual inputs flexibly
- Remove the schema so the model is not constrained by rigid fields
- Give the model a persona of an experienced data analyst
- Add examples of input and expected output, including an edge case

Check answer

### Show answer

Answer: Add examples of input and expected output, including an edge case. Examples anchor format and edge behavior. A persona changes tone more than accuracy.

Prompt and context engineering

A prompt has grown to 300 lines with contradictory rules. What should you do?

- Add a final rule stating that whenever two rules conflict, the later one in the prompt wins
- Split it across two models, one per half of the rules
- Move it to the system parameter so the model weights it more
- Refactor it: remove conflicts, group rules, and test against a golden set

Check answer

### Show answer

Answer: Refactor it: remove conflicts, group rules, and test against a golden set. Prompts need maintenance like code. A precedence rule leaves the contradictions in place.

Prompt and context engineering

Which is a good reason to summarize conversation history rather than truncate it?

- Summaries are cached, so they do not count as input tokens
- Truncated histories are rejected by the API with a 400 invalid_request_error
- Summaries let you skip the system prompt on later turns
- Summarization keeps decisions and state that truncation would drop

Check answer

### Show answer

Answer: Summarization keeps decisions and state that truncation would drop. Keep the state, drop the words. Summaries are ordinary input tokens and are billed as such.

Tools and MCPs

What does a tool_result with is_error set to true tell the model?

- The API will retry the tool automatically on the next turn
- The tool has been removed from the tools list for the session
- The conversation must end and the client should surface the error text to the user
- The call failed and the content explains why, so the model can adapt

Check answer

### Show answer

Answer: The call failed and the content explains why, so the model can adapt. Error results are recoverable signals. The API does not retry client tools; the model decides what to do next.

Tools and MCPs

What is tool_choice set to 'any' for?

- Require the model to call some tool this turn, without naming which
- Let the model decide whether to call a tool or answer in text
- Force the model to call one specific named tool
- Allow the model to call several tools in parallel within one assistant turn

Check answer

### Show answer

Answer: Require the model to call some tool this turn, without naming which. any forces a tool call without naming one. A named tool uses type tool; letting the model decide is auto.

Tools and MCPs

Your app connects to an MCP server over streamable HTTP. What must the client handle?

- Session handling and authentication for the remote server
- Selecting which model the server should use for its tools
- Spawning the server as a local subprocess over stdio
- Compiling the server from source before each connection

Check answer

### Show answer

Answer: Session handling and authentication for the remote server. Remote transport implies auth and sessions. Subprocess spawning is the stdio transport, not HTTP.

Tools and MCPs

Which is a good tool description?

- 'Retrieves order information. Call this whenever the user asks anything about orders, shipping, refunds, or accounts.'
- 'Look up an order by order_id. Use when the user cites an order number. Returns status, items, shipping; errors on unknown id.'
- 'Order lookup tool. Accepts an id string and returns the order record from the orders service as JSON.'
- 'Fetch order details. See the internal API docs for parameter names, return fields, and error codes.'

Check answer

### Show answer

Answer: 'Look up an order by order_id. Use when the user cites an order number. Returns status, items, shipping; errors on unknown id.'. Purpose, when to use, return shape, and error behavior. The second option is over-broad and will draw calls the tool cannot serve.

Tools and MCPs

How should a tool report that a required parameter was missing?

- Raise an exception so the agent loop terminates cleanly
- Return an empty success result so the model moves on
- Return an error result naming the missing parameter
- Fill in a sensible default and note it in the result

Check answer

### Show answer

Answer: Return an error result naming the missing parameter. Name the problem so the model can fix the call. A silent default hides the mistake.

Security and safety

An API key was committed to a public repository. First action?

- Rotate the key, remove it from the code, then audit recent usage
- Rename the environment variable so scanners no longer match it
- Rewrite git history to drop the commit and force-push, then keep using the same key
- Restrict the key to your server's IP range in the console

Check answer

### Show answer

Answer: Rotate the key, remove it from the code, then audit recent usage. Exposed credentials are rotated, not hidden. Rewriting history does not recall clones and forks that already have the key.

Security and safety

Which practice limits damage from prompt injection in a document-processing app?

- Restrict which actions document content can trigger and confirm side effects
- Add more rules to the system prompt about ignoring document content
- Run each document through a second model call that strips embedded instructions first
- Disable logging so injected content cannot leak into your logs

Check answer

### Show answer

Answer: Restrict which actions document content can trigger and confirm side effects. Limit what content can cause. A filtering pass can be bypassed; the action gate holds regardless.

Security and safety

User data appears in your logs in plain text. What should change?

- Log the full request and response bodies as well so audits have complete context
- Redact or minimize personal data in logs and set a retention policy
- Encrypt the log files at rest and leave their contents unchanged
- Move the logs to a private bucket that only engineers can read

Check answer

### Show answer

Answer: Redact or minimize personal data in logs and set a retention policy. Minimize and govern what you store. Encryption and access limits protect the copy but do not reduce what is collected.

Claude Code

Which file gives Claude Code standing instructions for a repository?

- CLAUDE.md at the repository root or in .claude
- .claude/settings.json under an instructions key
- A .clauderc file in the user's home directory
- README.md, which Claude Code reads on startup

Check answer

### Show answer

Answer: CLAUDE.md at the repository root or in .claude. CLAUDE.md is the project memory file. settings.json holds permissions and configuration, not instructions.

Claude Code

How do you run Claude Code for a single non-interactive prompt in a script?

- Start the TUI and pipe the prompt in as keystrokes
- Run claude --batch with a file of prompts
- Call the Messages API directly with the same system prompt
- Run claude -p with the prompt as an argument

Check answer

### Show answer

Answer: Run claude -p with the prompt as an argument. Print mode (-p) is headless. Calling the API directly skips Claude Code's tools and project context.

## Drill one domain at a time

Each domain with enough questions has its own page with study notes and just that domain's questions.

- [CCDV-F Applications and integration questions](https://youraidept.com/network/ccdv-f-practice-questions/applications-and-integration) (20)
- [CCDV-F Model selection and optimization questions](https://youraidept.com/network/ccdv-f-practice-questions/model-selection-and-optimization) (10)
- [CCDV-F Agents and workflows questions](https://youraidept.com/network/ccdv-f-practice-questions/agents-and-workflows) (9)
- [CCDV-F Prompt and context engineering questions](https://youraidept.com/network/ccdv-f-practice-questions/prompt-and-context-engineering) (7)
- [CCDV-F Tools and MCPs questions](https://youraidept.com/network/ccdv-f-practice-questions/tools-and-mcps) (6)

## How the real CCDV-F exam differs

- Questions: 53 items in 120 minutes
- Passing score: 720 on a 100–1,000 scale
- Exam fee: $125 per attempt, per the current exam guide
- Format: Proctored and closed-book, no AI assistance
- Delivered by Pearson VUE, online proctored or at a test center, with no notes and no AI assistance.

## Practice question FAQ

### Are these real CCDV-F exam questions? +

No. They are original questions written from the published blueprint and public API documentation, not exam content.

### How many questions are on the real CCDV-F exam? +

53 questions in 120 minutes, proctored and closed-book, with a passing score of 720 on a 100 to 1,000 scale.

### What should I study most for CCDV-F? +

Applications and integration, which is a third of the marks: the Messages API, stop reasons, streaming, batches, caching, and error handling. Model selection is next at about 17%.

### Where do I register for CCDV-F? +

Through the Anthropic Partner Academy, via a Claude Partner Network organization such as YAID, then Pearson VUE.

## Practice questions for the other exams

CCAR-F

### [Claude Certified Architect – Foundations](https://youraidept.com/network/ccar-f-practice-questions)

CCAO-F

### [Claude Certified Associate – Foundations](https://youraidept.com/network/ccao-f-practice-questions)

CCAR-P

### [Claude Certified Architect – Professional](https://youraidept.com/network/ccar-p-practice-questions)

## Who wrote this

### [Matei Olaru](https://youraidept.com/about/matei-olaru)

CEO, Your AI Department

Former public-company CEO, corporate attorney, and World Bank consultant. Runs the YAID Network and the partner relationship with Anthropic.

### [Michael Greenberg](https://youraidept.com/about/michael-greenberg)

AI Product Lead, Your AI Department

AI at Google, Meta, and Samsung. Six patents. Leads member support and the certification prep guidance.

Your AI Department is a registered Claude Partner Network company. Our members sit these exams under our partner standing. Facts on this page were last checked on October 15, 2026.

## Ready to sit CCDV-F for real?

Registration needs a Claude Partner Network organization. [YAID Network](https://youraidept.com/network) members register under our partner standing and prepare with the official Partner Academy course. $149 per quarter, exam fee separate.

[Apply to join YAID ↗](https://youraidept.com/network/apply?ref=practice)[How registration works →](https://youraidept.com/network/register-for-claude-certification)