You save $9.99
CCDV-F Premium Bundle
- Premium File 96 Questions & Answers
- Last Update: Nov 24, 2026
- Training Course 116 Lectures
You save $9.99
A claims chatbot forwards full identity documents although only two nonsecret fields are required.
Which implementation is the best fit?
Redact or exclude unnecessary personal fields before model and tool calls. For the situation 'A claims chatbot forwards full identity documents although only two nonsecret fields are required', this directly implements the required control. Data minimization reduces exposure even when downstream services are otherwise authorized. Verify the result by checking that traces show only the required fields cross the integration boundary.
Block unauthorized data destinations and validate outgoing tool arguments against allowlists. That addresses the different 'Output exfiltration prevention' situation: An untrusted page suggests that the agent email account data to a third-party address. Here the implementation must instead redact or exclude unnecessary personal fields before model and tool calls, because data minimization reduces exposure even when downstream services are otherwise authorized.
Grant tool scopes only for documented tasks and deny unrelated mutations. That addresses the different 'Least privilege for tools' situation: A summarization agent requests write access to the customer database even though it only reads records. Here the implementation must instead redact or exclude unnecessary personal fields before model and tool calls, because data minimization reduces exposure even when downstream services are otherwise authorized.
Treat external text as untrusted and enforce independent tool and data-access checks. That addresses the different 'Prompt injection through retrieved source' situation: A search result tells a customer assistant to disclose its hidden system instructions. Here the implementation must instead redact or exclude unnecessary personal fields before model and tool calls, because data minimization reduces exposure even when downstream services are otherwise authorized.
An assistant returns a tool_use block for a database lookup and the caller currently displays it as the final answer.
Which change should be made first?
Execute the validated tool call, append the correlated tool_result and continue until an appropriate terminal stop reason. For the situation 'An assistant returns a tool_use block for a database lookup and the caller currently displays it as the final answer', this directly implements the required control. Client-executed tool use requires a model request and an application result-response round trip. Verify the result by checking that a trace contains tool_use, matching tool_result and a final user answer rather than a raw tool request.
Choose deployment ownership based on data-boundary, networking, operations and scaling requirements. That addresses the different 'Managed versus self-hosted agents' situation: A regulated team needs direct control of runtime network routes and private tool execution. Here the implementation must instead execute the validated tool call, append the correlated tool_result and continue until an appropriate terminal stop reason, because client-executed tool use requires a model request and an application result-response round trip.
Use the Claude Agent SDK within an application-owned service and wrap tool permissions and tracing. That addresses the different 'Agent SDK integration boundary' situation: A Python service needs multi-turn agent tooling with session management and structured observability. Here the implementation must instead execute the validated tool call, append the correlated tool_result and continue until an appropriate terminal stop reason, because client-executed tool use requires a model request and an application result-response round trip.
Add a maximum tool-step budget, loop detection and a safe escalation response. That addresses the different 'Loop termination budget' situation: An automated troubleshooting agent keeps querying the same endpoints with no progress. Here the implementation must instead execute the validated tool call, append the correlated tool_result and continue until an appropriate terminal stop reason, because client-executed tool use requires a model request and an application result-response round trip.
A team edits repository-level Claude Code guidance without code review.
Which implementation is the best fit?
Store project CLAUDE.md in reviewed version control and document local overrides. For the situation 'A team edits repository-level Claude Code guidance without code review', this directly implements the required control. Shared repository guidance makes team defaults inspectable while local configuration remains separately controlled. Verify the result by checking that two clean clones use the same reviewed project instructions and known overrides.
Review settings.json permission policies as controlled configuration changes. That addresses the different 'settings.json permission change' situation: A development team expands command permissions in Claude Code settings. Here the implementation must instead store project CLAUDE.md in reviewed version control and document local overrides, because shared repository guidance makes team defaults inspectable while local configuration remains separately controlled.
Pin compatible integration dependencies, review change notes and run contract tests. That addresses the different 'Dependency and plugin upgrades' situation: A project upgrades an MCP plugin and SDK in the same untested deployment. Here the implementation must instead store project CLAUDE.md in reviewed version control and document local overrides, because shared repository guidance makes team defaults inspectable while local configuration remains separately controlled.
Record prompt revision, model ID and relevant tool configuration for each release and request. That addresses the different 'Prompt configuration provenance' situation: A live agent uses prompt templates stored outside the deployment manifest. Here the implementation must instead store project CLAUDE.md in reviewed version control and document local overrides, because shared repository guidance makes team defaults inspectable while local configuration remains separately controlled.
A database tool exposes a single free-form string argument for several unrelated operations.
What is the appropriate design decision?
Define narrowly scoped tools with precise descriptions, typed parameters and required fields. For the situation 'A database tool exposes a single free-form string argument for several unrelated operations', this directly implements the required control. Structured tool schemas guide argument generation and simplify host validation. Verify the result by checking that invalid arguments are rejected and supported tool calls pass schema tests.
Return a structured tool error and let the workflow retry or escalate appropriately. That addresses the different 'Tool failure representation' situation: A search tool returns an upstream timeout but the wrapper passes an empty success result. Here the implementation must instead define narrowly scoped tools with precise descriptions, typed parameters and required fields, because structured tool schemas guide argument generation and simplify host validation.
Execute validated client-side tools and send correlated tool_result content in a subsequent message. That addresses the different 'Client tool result handoff' situation: An API assistant emits a lookup tool_use message and a frontend mistakenly treats it as the retrieved value. Here the implementation must instead define narrowly scoped tools with precise descriptions, typed parameters and required fields, because structured tool schemas guide argument generation and simplify host validation.
Separate server-executed tool configuration from client-defined tools whose execution remains in application code. That addresses the different 'Server versus client tool ownership' situation: A developer expects a user-defined database tool to run on Anthropic infrastructure automatically. Here the implementation must instead define narrowly scoped tools with precise descriptions, typed parameters and required fields, because structured tool schemas guide argument generation and simplify host validation.
A TypeScript client abstracts requests but fails to handle API status codes.
Which approach most directly meets the stated need?
Understand the SDK as a typed transport and helper layer over the documented API contract. For the situation 'A TypeScript client abstracts requests but fails to handle API status codes', this directly implements the required control. An SDK simplifies serialization, authentication and retries but cannot replace application authorization. Verify the result by checking that contract tests match the SDK call's request and response to documented API behavior.
Use the documented streaming response protocol and event types for Claude output. That addresses the different 'Streaming versus socket assumptions' situation: A developer treats HTTP server-sent model events as if they were a two-way WebSocket stream. Here the implementation must instead understand the SDK as a typed transport and helper layer over the documented API contract, because an SDK simplifies serialization, authentication and retries but cannot replace application authorization.
Coordinate end-to-end deadlines and cancellation across callers, workers and provider requests. That addresses the different 'Timeout budget across stack' situation: A request passes through a gateway, worker and provider with inconsistent timeout limits. Here the implementation must instead understand the SDK as a typed transport and helper layer over the documented API contract, because an SDK simplifies serialization, authentication and retries but cannot replace application authorization.
Reuse an appropriately scoped async client and close resources on shutdown. That addresses the different 'Async SDK client lifetime' situation: A web service creates a fresh network client for every small model call. Here the implementation must instead understand the SDK as a typed transport and helper layer over the documented API contract, because an SDK simplifies serialization, authentication and retries but cannot replace application authorization.
A public chatbot needs to apply a company policy before sending generated content. In a different integration test, the team must settle this requirement and document its acceptance result, with a required sign-off based on observable evidence.
Which implementation is the best fit?
Combine input checks, trusted policy instructions, output review and escalation rules. For the situation 'A public chatbot needs to apply a company policy before sending generated content. In a different integration test, the team must settle this requirement and document its acceptance result, with a required sign-off based on observable evidence', this directly implements the required control. Defense in depth handles different failure modes that a single prompt cannot cover. Verify the result by checking that a red-team suite records blocks, safe alternatives and human escalations for policy cases.
Treat external text as untrusted and enforce independent tool and data-access checks. That addresses the different 'Prompt injection through retrieved source' situation: A search result tells a customer assistant to disclose its hidden system instructions. Here the implementation must instead combine input checks, trusted policy instructions, output review and escalation rules, because defense in depth handles different failure modes that a single prompt cannot cover.
Grant tool scopes only for documented tasks and deny unrelated mutations. That addresses the different 'Least privilege for tools' situation: A summarization agent requests write access to the customer database even though it only reads records. Here the implementation must instead combine input checks, trusted policy instructions, output review and escalation rules, because defense in depth handles different failure modes that a single prompt cannot cover.
Revoke and rotate the exposed key, then verify dependent services and audit usage. That addresses the different 'API key rotation' situation: A production key appears in a developer's debug screenshot. Here the implementation must instead combine input checks, trusted policy instructions, output review and escalation rules, because defense in depth handles different failure modes that a single prompt cannot cover.
A deployment agent may prepare a rollback but must not execute production changes autonomously.
Which change should be made first?
Place an explicit human authorization gate before the irreversible tool invocation. For the situation 'A deployment agent may prepare a rollback but must not execute production changes autonomously', this directly implements the required control. Agent planning and tool selection do not themselves grant authority to spend funds or modify production state. Verify the result by checking that audit records show a matching human approval before every sensitive execution.
Delegate noisy evidence gathering to a subagent that returns a compact verified summary. That addresses the different 'Subagent isolation of noisy evidence' situation: A research agent receives hundreds of irrelevant web snippets while the main conversation must remain short. Here the implementation must instead place an explicit human authorization gate before the irreversible tool invocation, because agent planning and tool selection do not themselves grant authority to spend funds or modify production state.
Implement a fixed validated pipeline and use Claude only for the bounded language step. That addresses the different 'Deterministic workflow choice' situation: A payroll assistant must run the same approved extraction and arithmetic steps for every payslip. Here the implementation must instead place an explicit human authorization gate before the irreversible tool invocation, because agent planning and tool selection do not themselves grant authority to spend funds or modify production state.
Use a supervisor to dispatch scoped tasks and reconcile their results under one final decision point. That addresses the different 'Supervisor delegation boundaries' situation: A cross-functional incident assistant delegates network analysis and application-log analysis to different specialists. Here the implementation must instead place an explicit human authorization gate before the irreversible tool invocation, because agent planning and tool selection do not themselves grant authority to spend funds or modify production state.
A receipts workflow receives photographed invoices instead of text.
Which approach most directly meets the stated need?
Supply the supported image content block with adequate quality and an explicit extraction task. For the situation 'A receipts workflow receives photographed invoices instead of text', this directly implements the required control. Vision input is multimodal content within the message rather than text guessed from an image URL. Verify the result by checking that the response extracts visible fields and marks unreadable characters as uncertain.
Use the top-level system parameter for application instructions and structured user messages for user content. That addresses the different 'Role and system instruction placement' situation: A developer includes a top-level system instruction as if it were a user message. Here the implementation must instead supply the supported image content block with adequate quality and an explicit extraction task, because vision input is multimodal content within the message rather than text guessed from an image URL.
Consume the supported streaming event sequence and assemble deltas into the final message. That addresses the different 'Streaming response assembly' situation: A web UI expects progressive tokens but waits for the full body before displaying anything. Here the implementation must instead supply the supported image content block with adequate quality and an explicit extraction task, because vision input is multimodal content within the message rather than text guessed from an image URL.
Send the relevant conversation messages or a controlled summary on each request. That addresses the different 'Messages API stateless history' situation: A chat interface sends only the latest user turn and expects the API to remember prior turns. Here the implementation must instead supply the supported image content block with adequate quality and an explicit extraction task, because vision input is multimodal content within the message rather than text guessed from an image URL.
A feature team can test prompts only by spending live API tokens.
What should the engineer do next?
Mock the client boundary for deterministic unit tests and keep separately gated live integration tests. For the situation 'A feature team can test prompts only by spending live API tokens', this directly implements the required control. Unit tests check local request construction and parsing without external nondeterminism. Verify the result by checking that cI unit tests pass offline and a small real-provider suite checks compatibility.
Enforce pull-request review, secret scanning and automated checks before merge. That addresses the different 'Review and secret scanning' situation: A developer proposes committing a quick demo that contains a real API key. Here the implementation must instead mock the client boundary for deterministic unit tests and keep separately gated live integration tests, because unit tests check local request construction and parsing without external nondeterminism.
Extract a tested adapter with typed request and error mapping while preserving existing behavior. That addresses the different 'Refactor of model adapter' situation: Several services duplicate authentication, timeout and error parsing logic. Here the implementation must instead mock the client boundary for deterministic unit tests and keep separately gated live integration tests, because unit tests check local request construction and parsing without external nondeterminism.
Use the documented REST method, headers, JSON request body and response schema. That addresses the different 'REST endpoint contract' situation: A microservice treats JSON request content as a URL query string and gets validation errors. Here the implementation must instead mock the client boundary for deterministic unit tests and keep separately gated live integration tests, because unit tests check local request construction and parsing without external nondeterminism.
A workload repeatedly uses the same large prompt in clustered bursts hours apart.
Which approach most directly meets the stated need?
Choose supported cache duration only after measuring reuse intervals and write/read costs. For the situation 'A workload repeatedly uses the same large prompt in clustered bursts hours apart', this directly implements the required control. Cache entries have finite lifetimes and long-lived cache writes can cost more than short-lived ones. Verify the result by checking that usage telemetry shows cache hit timing and net spend compared with no cache.
Track input, output, cache reads and writes per request and aggregate against budgets. That addresses the different 'Token usage accounting' situation: A product team budgets costs from request count alone although prompt sizes vary widely. Here the implementation must instead choose supported cache duration only after measuring reuse intervals and write/read costs, because cache entries have finite lifetimes and long-lived cache writes can cost more than short-lived ones.
Use asynchronous batching for deadline-tolerant independent tasks and live calls for interactive sessions. That addresses the different 'Batch cost versus timeliness' situation: An analytics job can run overnight and thousands of prompts share no session state. Here the implementation must instead choose supported cache duration only after measuring reuse intervals and write/read costs, because cache entries have finite lifetimes and long-lived cache writes can cost more than short-lived ones.
Set token, tool-call and time budgets and emit an escalation or partial result when exceeded. That addresses the different 'Cost guardrails for agent loops' situation: An autonomous research job can fan out into dozens of costly tool and model calls. Here the implementation must instead choose supported cache duration only after measuring reuse intervals and write/read costs, because cache entries have finite lifetimes and long-lived cache writes can cost more than short-lived ones.
A compliance classifier gives different labels for near-identical repeated requests.
Which implementation is the best fit?
Choose sampling settings suited to the task and validate outputs instead of assuming guaranteed determinism. For the situation 'A compliance classifier gives different labels for near-identical repeated requests', this directly implements the required control. Sampling influences output variation but does not substitute for schema validation or make reasoning error-free. Verify the result by checking that repeated tests quantify acceptable variance and enforce stable downstream contracts.
Pin relevant versions and test semantic invariants while recognizing remaining generation variability. That addresses the different 'Non-deterministic inference audits' situation: An operator insists that identical prompts must yield identical prose across releases. Here the implementation must instead choose sampling settings suited to the task and validate outputs instead of assuming guaranteed determinism, because sampling influences output variation but does not substitute for schema validation or make reasoning error-free.
Budget input context and output generation separately and prune irrelevant content before exceeding limits. That addresses the different 'Context window versus output budget' situation: An analyst stuffs a year's worth of reports into a request without checking model context limits. Here the implementation must instead choose sampling settings suited to the task and validate outputs instead of assuming guaranteed determinism, because sampling influences output variation but does not substitute for schema validation or make reasoning error-free.
Add a few concise representative examples covering the difficult boundary conditions. That addresses the different 'Zero-shot and few-shot examples' situation: A JSON extraction prompt fails on uncommon invoice layouts. Here the implementation must instead choose sampling settings suited to the task and validate outputs instead of assuming guaranteed determinism, because sampling influences output variation but does not substitute for schema validation or make reasoning error-free.
Please check your mailbox for a message from support@examlabs.com and follow the directions.