Anthropic CCDV-F Exam Prep
Claude Certified Developer - Foundations (Page 8 )

Updated On: 3-Oct-2026

Your Claude application produces good responses for typical inputs but struggles with edge cases. You have several labeled examples of edge-case inputs and the desired response for each. You want to use these examples to improve the model's handling of edge cases.
What is the best way to use these examples?

  1. Embed the examples in a database for the model to find during inference.
  2. Add the labeled edge-case examples to the prompt as few-shot examples so the model can learn the pattern.
  3. Train a custom model on the edge-case examples and deploy that custom model in place of the team's current Claude integration.
  4. Tell users to avoid submitting the edge-case inputs to the application by adding warnings in the application's user interface.

Answer(s): B

Explanation:

Option B applies few-shot, or multishot, prompting, one of Anthropic's recommended techniques for steering Claude when examples of desired behavior are available. Labeled input/output pairs give Claude concrete demonstrations of how it should respond, which is particularly valuable when edge cases are difficult to express completely through abstract rules.
Anthropic states that examples are among the most reliable mechanisms for steering output format, tone, and structure. Its prompting guidance recommends relevant, diverse examples that cover edge cases while avoiding accidental patterns. For best results, examples should be clearly separated from the main instructions, such as by using <example> and <examples> tags.
A retrieval database could be useful if a very large or dynamically selected example collection were required, but that adds unnecessary complexity for the small labeled set described. C is disproportionate: a few examples do not justify replacing the application's Claude integration with custom model training. D avoids rather than solves the identified failure mode.
Therefore, B directly uses the available supervision at inference time and allows rapid iteration through evaluation. Relevant Claude Developer topics are prompt construction, few-shot prompting, edge-case handling, example selection, evaluation-driven iteration, and behavioral steering.



You are building a Claude application that needs to maintain a persistent connection to a service that streams real-time updates. The team is unsure what communication pattern to use.
Which communication pattern would you use?

  1. Repeated short-lived HTTP polling requests, where the application opens a new HTTP connection each time it checks for updates.
  2. A WebSocket, because WebSockets are designed for bidirectional, persistent, real-time communication between the client and the streaming service.
  3. A single long HTTP request the server holds open indefinitely, with no standard WebSocket framing on the connection.
  4. File-based communication where the service writes new updates to disk and the application polls the file system for changes.

Answer(s): B

Explanation:

Option B is the appropriate software-engineering communication pattern when the application requires a persistent, low-latency, bidirectional channel. WebSockets establish a connection using an HTTP Upgrade handshake and then maintain a TCP-based communication channel in which either side can send messages independently. This eliminates the repeated connection setup and request overhead associated with conventional polling.
RFC 6455 defines WebSocket specifically as a protocol enabling two-way communication and explains that it provides a single TCP connection as an alternative to HTTP polling for interactive communication.
Option A can work for infrequent updates, but repeatedly opening HTTP requests adds latency, headers, and server/client overhead and is unsuitable when continuous real-time communication is the stated requirement. C resembles long polling or an ad-hoc streaming connection but lacks the standardized framing, lifecycle behavior, and interoperability provided by WebSocket. D introduces filesystem polling and is not an appropriate network-streaming architecture.
The important certification principle is selecting a communication mechanism based on application requirements rather than merely choosing an available protocol. For persistent two-way streaming, WebSocket provides the intended abstraction. Relevant Claude Developer topics are software engineering foundations, client-server communication, persistent connections, HTTP versus WebSocket patterns, streaming, and real-time application architecture.



Your enterprise has a contract with AWS that requires Claude API calls to flow through Amazon Bedrock rather than the direct Anthropic API. Your team is building a new Claude application and is unfamiliar with this constraint.
How would you build the application?

  1. Build two parallel implementations of every call, one for the direct Anthropic API and one for Bedrock, and pick the faster one at runtime.
  2. Build the application against the direct Anthropic API now and migrate to Bedrock in a follow-up release once the team has more experience with the Bedrock API.
  3. Configure the application to invoke Claude through the Bedrock-compatible API path while keeping the application's logic provider-agnostic.
  4. Build the application against the direct Anthropic API and ignore the contractual requirement to route Claude calls through Amazon Bedrock.

Answer(s): C

Explanation:

Option C satisfies both the enterprise routing requirement and sound application architecture. Claude is available through Amazon Bedrock, and Anthropic provides Bedrock-specific SDK integration rather than requiring applications to call api.anthropic.com directly. Current Anthropic documentation describes Claude in Amazon Bedrock as operating through AWS-managed infrastructure with AWS-native authentication, billing, and security boundaries. Newer Bedrock integrations use the Messages API shape, allowing substantial application logic to remain consistent across provider environments.
Anthropic SDKs also provide dedicated Bedrock clients---for example, Python includes AnthropicBedrockMantle for current Bedrock deployments. Keeping business logic separated from provider-specific authentication, endpoints, model identifiers, and transport configuration reduces migration and maintenance risk.
A violates architectural simplicity by duplicating every call unnecessarily. B knowingly violates the enterprise requirement until migration occurs. D directly ignores the contractual routing constraint and is therefore invalid regardless of technical feasibility.
The correct approach is to make Bedrock the configured inference provider while keeping higher-level application and agent behavior decoupled from provider-specific implementation details. Relevant Claude Developer topics are Claude API mechanics, cloud-provider integrations, Amazon Bedrock, SDK configuration, authentication boundaries, model invocation, and provider abstraction.



Your Claude agent's hooks are currently triggered for every action, which slows down the agent significantly even when actions pose no risk. The team wants to scope hooks more carefully.
How would you scope the hooks?

  1. Scope hooks to only the high-risk actions, such as destructive operations or sensitive data access, and remove hooks from low-risk actions to balance safety with performance.
  2. Disable all hooks while the team re-scopes them, treating the period of no hook enforcement as a temporary state during the re-scoping work.
  3. Disable the agent during peak hours so the hook overhead does not slow the application down during the busiest periods of the day across the application's operation.
  4. Replace hooks with system prompt instructions on the grounds that prompt instructions can produce the same enforcement effect that hooks produce on the agent's actions.

Answer(s): A

Explanation:

Option A correctly applies selective enforcement. Claude Code hooks can execute automatically at lifecycle events such as PreToolUse, and matchers or conditions can narrow exactly which operations trigger a hook. Anthropic's hook reference demonstrates this pattern by applying a PreToolUse hook specifically to destructive shell operations rather than indiscriminately processing every command. The documentation notes that if the matcher or conditional expression does not match, the handler is skipped, avoiding unnecessary process-spawn overhead.
That architecture is particularly appropriate for costly or security-sensitive checks. High-risk events---destructive file operations, privileged commands, production changes, or access to sensitive resources---can receive deterministic pre-execution enforcement while routine low-risk actions proceed without additional hook latency.
B creates an avoidable period in which safeguards disappear entirely. C reduces application availability without addressing the actual source of overhead. D is technically weaker because system-prompt instructions influence model behavior but are not equivalent to deterministic lifecycle interception capable of blocking execution.
Therefore, hooks should be scoped using event types, matchers, and conditions according to risk. Relevant Claude Developer topics are Claude Code hooks, agent construction, tool governance, deterministic controls, permission boundaries, safety/performance tradeoffs, and lifecycle interception.



Your Claude application's content policy specifies categories of content it should not produce under any circumstance. The application currently has no mechanism to enforce this policy, and content matching these categories is appearing in the application's output.
How would you enforce the content policy?

  1. Enhance the system prompt to contain explicit instructions for the categories to avoid, complete with examples of each category. Treat the strengthened prompt as the primary enforcement mechanism for the application's content policy across all responses.
  2. Remove the content policy entirely and let any output reach users during normal operation, accepting whatever content the application produces in response to incoming traffic.
  3. Move enforcement to users by asking them to report content policy violations after the violating content has already reached them in the application's responses.
  4. Add deterministic output filtering that checks responses against the content policy before they reach users.

Answer(s): D

Explanation:

Option D is the strongest enforcement design because an unconditional content policy requires an application-level control between model generation and user delivery. Prompt instructions are valuable for steering Claude, but they are probabilistic controls and should not be treated as the sole enforcement mechanism when prohibited categories must never be exposed.
Anthropic's guardrail guidance recommends layered safeguards including screening, validation, monitoring, and filtering rather than relying exclusively on prompts. Its prompt-leak guidance specifically recommends output screening and post-processing, including deterministic techniques such as keyword matching, regular expressions, or other text-processing mechanisms where appropriate.
A improves the probability of policy compliance but cannot guarantee that every generated response will satisfy an externally defined application policy. B explicitly abandons the requirement. C detects violations only after exposure, which is unsuitable when the content must not reach users.
A production architecture can combine system instructions, structured classification, policy engines, deterministic rules, and model-based moderation, but the decisive requirement is enforcement before output delivery. Relevant Claude Developer topics are guardrails, output filtering, content moderation, deterministic enforcement, defense in depth, safe application boundaries, and production Claude application design.



Viewing page 8 of 22
Viewing questions 36 - 40 out of 103 questions


Post your Comments and Discuss Anthropic CCDV-F exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!