Question 520
The current design of a retrieval pipeline pipeline does not adequately stop stale log dumps from crowding out new evidence during an agent session. Which improvement resolves the gap?
- Prune obsolete tool outputs
- Use scoped subagent contexts
- Refresh stale evidence before reuse
- Separate long-term memory from active scratchpad
Explanation
Correct Answer
A:Tool-result pruning removes redundant bulky observations after their findings are retained; this behavior directly supports the need to stop stale log dumps from crowding out new evidence during an agent session. Keeping all raw logs forever does not guarantee better reasoning.
Incorrect Answers
B:This approach serves the separate need to prevent a specialist's exhaustive document scan from contaminating the coordinator's working context because isolated workers return concise findings while retaining intermediate detail within their own window; it does not establish the outcome to stop stale log dumps from crowding out new evidence during an agent session, and sharing every search hit with every agent multiplies noise and cost.
C:Freshness checks determine whether a saved passage remains authoritative for a dynamic fact; despite being useful when a service must avoid answering a pricing question from last month's retrieved cache, it is not a solution to stop stale log dumps from crowding out new evidence during an agent session; high semantic similarity says nothing about timeliness.
D:For the alternate objective to prevent outdated user preferences from being treated as current task instructions, explicit storage and freshness rules govern what is retained and when it is reintroduced; the feature here must stop stale log dumps from crowding out new evidence during an agent session, and an unbounded persistent transcript can accumulate contradictory assumptions.
Question 521
An application security build contains an upstream function and a separate downstream function. The upstream work must prevent a read-only support tool from modifying billing tables; the downstream work must prevent unreviewed bulk downloads triggered by an agent's tool plan. Which configuration pair covers both?
- First component: Scope database credentials by tenant and operation. Second component: Limit external network egress for agents.
- First component: Limit external network egress for agents. Second component: Encrypt sensitive data in transit.
- First component: Encrypt sensitive data in transit. Second component: Add an explicit export approval check.
- First component: Scope database credentials by tenant and operation. Second component: Add an explicit export approval check.
- First component: Use output escaping to prevent XSS. Second component: Limit external network egress for agents.
Explanation
Correct Answer
D:The first proposal fits its assigned role because least-privilege identity limits the damage from a manipulated tool call, while the second proposal fits its assigned role because a separate authorization or human approval step can gate high-impact operations; their respective acceptance criteria are to prevent a read-only support tool from modifying billing tables and to prevent unreviewed bulk downloads triggered by an agent's tool plan.
Incorrect Answers
A:The first proposal fits its assigned role because least-privilege identity limits the damage from a manipulated tool call, while the second proposal serves the different purpose to prevent a compromised tool step from sending internal files to arbitrary destinations instead of the assigned second role because network policy restricts which services a tool process can contact; their respective acceptance criteria are to prevent a read-only support tool from modifying billing tables and to prevent unreviewed bulk downloads triggered by an agent's tool plan.
B:The first proposal serves the different purpose to prevent a compromised tool step from sending internal files to arbitrary destinations instead of the assigned first role because network policy restricts which services a tool process can contact, while the second proposal serves the different purpose to protect payload confidentiality between the application and its API endpoint instead of the assigned second role because modern transport encryption limits interception across network boundaries; their respective acceptance criteria are to prevent a read-only support tool from modifying billing tables and to prevent unreviewed bulk downloads triggered by an agent's tool plan.
C:The first proposal serves the different purpose to protect payload confidentiality between the application and its API endpoint instead of the assigned first role because modern transport encryption limits interception across network boundaries, while the second proposal fits its assigned role because a separate authorization or human approval step can gate high-impact operations; their respective acceptance criteria are to prevent a read-only support tool from modifying billing tables and to prevent unreviewed bulk downloads triggered by an agent's tool plan.
E:The first proposal serves the different purpose to display generated customer notes safely in a browser instead of the assigned first role because context-aware encoding prevents text from being interpreted as active HTML or JavaScript, while the second proposal serves the different purpose to prevent a compromised tool step from sending internal files to arbitrary destinations instead of the assigned second role because network policy restricts which services a tool process can contact; their respective acceptance criteria are to prevent a read-only support tool from modifying billing tables and to prevent unreviewed bulk downloads triggered by an agent's tool plan.
Question 522
During a customer platform rollout, two different failure paths need remediation. The first component must detect unsafe permissions and schema changes before merging an agent tool; separately, the second must activate a new tool execution path for only internal testers. Which changes should be adopted?
- First component: Use pull requests and focused code review. Second component: Use feature flags for risky behavior changes.
- First component: Use pull requests and focused code review. Second component: Use asynchronous I/O for concurrent requests.
- First component: Use asynchronous I/O for concurrent requests. Second component: Validate JSON before deserialization.
- First component: Validate JSON before deserialization. Second component: Use feature flags for risky behavior changes.
Explanation
Correct Answer
A:The first proposal fits its assigned role because peer review creates an explicit checkpoint for correctness, security, and maintainability, while the second proposal fits its assigned role because runtime controls can segment rollout and permit quick disabling without a code rebuild; their respective acceptance criteria are to detect unsafe permissions and schema changes before merging an agent tool and to activate a new tool execution path for only internal testers.
Incorrect Answers
B:The first proposal fits its assigned role because peer review creates an explicit checkpoint for correctness, security, and maintainability, while the second proposal serves the different purpose to serve independent API calls without blocking a worker thread for each network wait instead of the assigned second role because async execution overlaps I/O-bound tasks while maintaining control over concurrency; their respective acceptance criteria are to detect unsafe permissions and schema changes before merging an agent tool and to activate a new tool execution path for only internal testers.
C:The first proposal serves the different purpose to serve independent API calls without blocking a worker thread for each network wait instead of the assigned first role because async execution overlaps I/O-bound tasks while maintaining control over concurrency, while the second proposal serves the different purpose to reject a malformed tool argument payload before calling a payroll service instead of the assigned second role because a parser and schema validator catch missing types and invalid syntax before side effects; their respective acceptance criteria are to detect unsafe permissions and schema changes before merging an agent tool and to activate a new tool execution path for only internal testers.
D:The first proposal serves the different purpose to reject a malformed tool argument payload before calling a payroll service instead of the assigned first role because a parser and schema validator catch missing types and invalid syntax before side effects, while the second proposal fits its assigned role because runtime controls can segment rollout and permit quick disabling without a code rebuild; their respective acceptance criteria are to detect unsafe permissions and schema changes before merging an agent tool and to activate a new tool execution path for only internal testers.
Question 523
Two separate tickets in a latency optimization backlog require different controls. One needs to avoid confusing allowable prompt size with maximum generated response length; the other needs to allocate more deliberate computation to a hard multi-step planning problem. Which implementation pair is correct?
- First component: Budget tokens rather than characters. Second component: Use contrasting few-shot examples.
- First component: Distinguish input from output token limits. Second component: Budget tokens rather than characters.
- First component: Recognize next-token generation. Second component: Budget tokens rather than characters.
- First component: Use contrasting few-shot examples. Second component: Enable supported extended or adaptive reasoning.
- First component: Distinguish input from output token limits. Second component: Enable supported extended or adaptive reasoning.
Explanation
Correct Answer
E:The first proposal fits its assigned role because the context budget constrains total material considered while output ceilings bound what a single generation can emit, while the second proposal fits its assigned role because thinking controls can improve complex reasoning at the expense of latency or token usage depending on the model; their respective acceptance criteria are to avoid confusing allowable prompt size with maximum generated response length and to allocate more deliberate computation to a hard multi-step planning problem.
Incorrect Answers
A:The first proposal serves the different purpose to estimate whether a multilingual request will fit a model context window instead of the assigned first role because tokenization splits text into model-specific units, so character counts are not a reliable context proxy, while the second proposal serves the different purpose to distinguish borderline policy labels with examples of both allowed and disallowed cases instead of the assigned second role because multiple representative cases help define a decision boundary and reduce ambiguity; their respective acceptance criteria are to avoid confusing allowable prompt size with maximum generated response length and to allocate more deliberate computation to a hard multi-step planning problem.
B:The first proposal fits its assigned role because the context budget constrains total material considered while output ceilings bound what a single generation can emit, while the second proposal serves the different purpose to estimate whether a multilingual request will fit a model context window instead of the assigned second role because tokenization splits text into model-specific units, so character counts are not a reliable context proxy; their respective acceptance criteria are to avoid confusing allowable prompt size with maximum generated response length and to allocate more deliberate computation to a hard multi-step planning problem.
C:The first proposal serves the different purpose to explain why a plausible answer can still contain an unsupported factual claim instead of the assigned first role because the model predicts likely continuations conditioned on context rather than querying an authoritative truth database by default, while the second proposal serves the different purpose to estimate whether a multilingual request will fit a model context window instead of the assigned second role because tokenization splits text into model-specific units, so character counts are not a reliable context proxy; their respective acceptance criteria are to avoid confusing allowable prompt size with maximum generated response length and to allocate more deliberate computation to a hard multi-step planning problem.
D:The first proposal serves the different purpose to distinguish borderline policy labels with examples of both allowed and disallowed cases instead of the assigned first role because multiple representative cases help define a decision boundary and reduce ambiguity, while the second proposal fits its assigned role because thinking controls can improve complex reasoning at the expense of latency or token usage depending on the model; their respective acceptance criteria are to avoid confusing allowable prompt size with maximum generated response length and to allocate more deliberate computation to a hard multi-step planning problem.
Question 524
A production API build contains an upstream function and a separate downstream function. The upstream work must prevent a supposedly read-only status lookup from changing a server-side record; the downstream work must prevent API credentials from being exposed through shared repository history. Which configuration pair covers both?
- First component: Separate integration tests from unit tests. Second component: Keep secrets out of source control.
- First component: Use explicit HTTP method semantics. Second component: Use exponential backoff with jitter.
- First component: Use explicit HTTP method semantics. Second component: Keep secrets out of source control.
- First component: Use exponential backoff with jitter. Second component: Separate integration tests from unit tests.
- First component: Enforce concurrency limits. Second component: Use exponential backoff with jitter.
Explanation
Correct Answer
C:The first proposal fits its assigned role because gET should retrieve resources while state changes use appropriate mutation methods and authorization checks, while the second proposal fits its assigned role because secret stores or environment injection keep production tokens out of committed code; their respective acceptance criteria are to prevent a supposedly read-only status lookup from changing a server-side record and to prevent API credentials from being exposed through shared repository history.
Incorrect Answers
A:The first proposal serves the different purpose to verify that a real staging tool and its API contract work together instead of the assigned first role because integration tests exercise boundaries and serialization that isolated mocks may miss, while the second proposal fits its assigned role because secret stores or environment injection keep production tokens out of committed code; their respective acceptance criteria are to prevent a supposedly read-only status lookup from changing a server-side record and to prevent API credentials from being exposed through shared repository history.
B:The first proposal fits its assigned role because gET should retrieve resources while state changes use appropriate mutation methods and authorization checks, while the second proposal serves the different purpose to recover from transient 429 responses without synchronized retry storms instead of the assigned second role because increasing randomized delays reduce contention and respect service throttling signals; their respective acceptance criteria are to prevent a supposedly read-only status lookup from changing a server-side record and to prevent API credentials from being exposed through shared repository history.
D:The first proposal serves the different purpose to recover from transient 429 responses without synchronized retry storms instead of the assigned first role because increasing randomized delays reduce contention and respect service throttling signals, while the second proposal serves the different purpose to verify that a real staging tool and its API contract work together instead of the assigned second role because integration tests exercise boundaries and serialization that isolated mocks may miss; their respective acceptance criteria are to prevent a supposedly read-only status lookup from changing a server-side record and to prevent API credentials from being exposed through shared repository history.
E:The first proposal serves the different purpose to prevent bursts of document jobs from overwhelming rate limits and memory instead of the assigned first role because a semaphore or bounded queue keeps in-flight work within measured capacity, while the second proposal serves the different purpose to recover from transient 429 responses without synchronized retry storms instead of the assigned second role because increasing randomized delays reduce contention and respect service throttling signals; their respective acceptance criteria are to prevent a supposedly read-only status lookup from changing a server-side record and to prevent API credentials from being exposed through shared repository history.
Question 525
A workflow automation group is preparing a production change intended to recover agent state when a container restarts during a lengthy customer case. Which technique matches that intent?
- Forward tool_result blocks with matching identifiers
- Use the Claude Agent SDK for an integrated tool-driven agent
- Keep user-specific state out of a shared agent process
- Use a durable session store
Explanation
Correct Answer
D:External persistence holds the conversation and workflow metadata needed to resume safely; this behavior directly supports the need to recover agent state when a container restarts during a lengthy customer case. Process-local variables disappear with the worker.
Incorrect Answers
A:This approach serves the separate need to let Claude continue after a client tool returns a transaction status because results must reference the corresponding tool_use IDs and be included in the next conversation turn; it does not establish the outcome to recover agent state when a container restarts during a lengthy customer case, and sending a human-readable summary without the tool correlation can break the protocol.
B:The SDK provides agent-loop primitives and integrations that remove much of the custom harness work; despite being useful when a service must build a coding agent that needs managed tool execution, sessions, and event handling, it is not a solution to recover agent state when a container restarts during a lengthy customer case; it still requires explicit permissions, safety policies, and operational boundaries.
C:For the alternate objective to serve many tenants without mixing their tool outputs or prior messages, per-request identity and session boundaries prevent cross-tenant context leakage; the feature here must recover agent state when a container restarts during a lengthy customer case, and shared conversation histories can inadvertently expose unrelated customers' data.
Question 526
Two features of a workflow automation system are under review. One feature must keep a customer service application operating when an expensive specialist agent cannot complete; the other must detect mistakes in an agent-generated SQL migration before running it. Which plan matches the respective needs?
- First component: Use a graceful fallback path. Second component: Use an independent verifier step.
- First component: Use a graceful fallback path. Second component: Use a framework only when its primitives fit.
- First component: Use bounded memory with explicit provenance. Second component: Use an independent verifier step.
- First component: Use a framework only when its primitives fit. Second component: Use bounded memory with explicit provenance.
Explanation
Correct Answer
A:The first proposal fits its assigned role because a bounded failure branch can return a safe partial result or route to a human rather than loop indefinitely, while the second proposal fits its assigned role because a separate validation stage checks the artifact against explicit tests and constraints, limiting self-confirming errors; their respective acceptance criteria are to keep a customer service application operating when an expensive specialist agent cannot complete and to detect mistakes in an agent-generated SQL migration before running it.
Incorrect Answers
B:The first proposal fits its assigned role because a bounded failure branch can return a safe partial result or route to a human rather than loop indefinitely, while the second proposal serves the different purpose to select orchestration dependencies for a project that already has a stable task engine instead of the assigned second role because frameworks can help with graphs, retries, and checkpoints but create maintenance and integration costs; their respective acceptance criteria are to keep a customer service application operating when an expensive specialist agent cannot complete and to detect mistakes in an agent-generated SQL migration before running it.
C:The first proposal serves the different purpose to preserve customer preferences across permitted sessions while distinguishing facts from assumptions instead of the assigned first role because typed, attributable records prevent outdated or unverified memories from becoming unquestioned instructions, while the second proposal fits its assigned role because a separate validation stage checks the artifact against explicit tests and constraints, limiting self-confirming errors; their respective acceptance criteria are to keep a customer service application operating when an expensive specialist agent cannot complete and to detect mistakes in an agent-generated SQL migration before running it.
D:The first proposal serves the different purpose to select orchestration dependencies for a project that already has a stable task engine instead of the assigned first role because frameworks can help with graphs, retries, and checkpoints but create maintenance and integration costs, while the second proposal serves the different purpose to preserve customer preferences across permitted sessions while distinguishing facts from assumptions instead of the assigned second role because typed, attributable records prevent outdated or unverified memories from becoming unquestioned instructions; their respective acceptance criteria are to keep a customer service application operating when an expensive specialist agent cannot complete and to detect mistakes in an agent-generated SQL migration before running it.
Question 527
An external system access build contains an upstream function and a separate downstream function. The upstream work must identify whether slow agent replies come from a payment gateway rather than the model; the downstream work must speed up independent product lookups without racing dependent account updates. Which configuration pair covers both?
- First component: Write task-specific tool descriptions. Second component: Handle parallel tool requests carefully.
- First component: Capture tool latency and failure metrics. Second component: Handle parallel tool requests carefully.
- First component: Return structured tool errors. Second component: Write task-specific tool descriptions.
- First component: Capture tool latency and failure metrics. Second component: Return structured tool errors.
- First component: Restrict tool network credentials. Second component: Return structured tool errors.
Explanation
Correct Answer
B:The first proposal fits its assigned role because per-tool tracing separates external execution time from inference and highlights unhealthy dependencies, while the second proposal fits its assigned role because independent reads can run concurrently but dependent mutations need ordering or transactions; their respective acceptance criteria are to identify whether slow agent replies come from a payment gateway rather than the model and to speed up independent product lookups without racing dependent account updates.
Incorrect Answers
A:The first proposal serves the different purpose to let Claude distinguish a read-only invoice lookup from an invoice update instead of the assigned first role because clear capabilities and side effects guide tool selection without granting new authority, while the second proposal fits its assigned role because independent reads can run concurrently but dependent mutations need ordering or transactions; their respective acceptance criteria are to identify whether slow agent replies come from a payment gateway rather than the model and to speed up independent product lookups without racing dependent account updates.
C:The first proposal serves the different purpose to let an assistant recover from a missing order without inventing its details instead of the assigned first role because machine-readable failures distinguish not-found, permission denied, and transient errors for appropriate follow-up, while the second proposal serves the different purpose to let Claude distinguish a read-only invoice lookup from an invoice update instead of the assigned second role because clear capabilities and side effects guide tool selection without granting new authority; their respective acceptance criteria are to identify whether slow agent replies come from a payment gateway rather than the model and to speed up independent product lookups without racing dependent account updates.
D:The first proposal fits its assigned role because per-tool tracing separates external execution time from inference and highlights unhealthy dependencies, while the second proposal serves the different purpose to let an assistant recover from a missing order without inventing its details instead of the assigned second role because machine-readable failures distinguish not-found, permission denied, and transient errors for appropriate follow-up; their respective acceptance criteria are to identify whether slow agent replies come from a payment gateway rather than the model and to speed up independent product lookups without racing dependent account updates.
E:The first proposal serves the different purpose to stop a directory lookup function from also gaining unrestricted database write access instead of the assigned first role because minimal capabilities reduce risk when generated arguments or retrieved text are hostile, while the second proposal serves the different purpose to let an assistant recover from a missing order without inventing its details instead of the assigned second role because machine-readable failures distinguish not-found, permission denied, and transient errors for appropriate follow-up; their respective acceptance criteria are to identify whether slow agent replies come from a payment gateway rather than the model and to speed up independent product lookups without racing dependent account updates.
Question 528
An engineer extending a privacy controls workflow has been asked to avoid committing provider credentials inside a shared repository. Which choice addresses the request most precisely?
- Rotate a compromised API key promptly
- Separate human and service identities
- Load keys from a managed secret service
- Protect secrets in error traces
- Audit sensitive credential use
Explanation
Correct Answer
C:Secrets managers support controlled retrieval, rotation, and access logs; this behavior directly supports the need to avoid committing provider credentials inside a shared repository. Obscuring a literal string in source is not adequate key protection.
Incorrect Answers
A:Revocation plus replacement ends use of the leaked credential and requires checking for misuse; this applies to the different goal to cut off an exposed token discovered in CI logs, not the requirement to avoid committing provider credentials inside a shared repository; merely deleting a log message leaves the old token valid.
B:When an application needs to attribute tool actions to the right workload rather than a developer's personal account, distinct principals simplify least privilege, revocation, and audit attribution; the current capability must instead avoid committing provider credentials inside a shared repository, while a shared personal login makes operational accountability difficult.
D:This approach serves the separate need to prevent stack traces and debugging telemetry from disclosing tokens because redaction at logging boundaries avoids accidentally copying credentials to broad observability systems; it does not establish the outcome to avoid committing provider credentials inside a shared repository, and encrypted storage does not help when secrets are printed into logs.
E:Usage and access logs support incident investigation and anomaly response; despite being useful when a service must detect unexpected API key activity from an unfamiliar process, it is not a solution to avoid committing provider credentials inside a shared repository; a successful API call alone does not establish that use was authorized.
Question 529
A developer is reviewing alternatives for a privacy controls feature that must avoid transmitting unnecessary customer identifiers with a summarization request. Which option is a defensible fit?
- Use output escaping to prevent XSS
- Apply retention limits to diagnostic logs
- Minimize personally identifiable information
- Encrypt sensitive data in transit
Explanation
Correct Answer
C:Redaction and selective fields reduce exposure before data enters model or logging paths; this behavior directly supports the need to avoid transmitting unnecessary customer identifiers with a summarization request. Logging every full prompt can defeat otherwise careful minimization.
Incorrect Answers
A:Context-aware encoding prevents text from being interpreted as active HTML or JavaScript; the supported outcome is to display generated customer notes safely in a browser, whereas this scenario requires the ability to avoid transmitting unnecessary customer identifiers with a summarization request; an instruction to the model not to write scripts is not a rendering control.
B:This approach serves the separate need to reduce exposure of customer documents copied into application telemetry because data minimization and controlled retention reduce the duration and audience of sensitive log content; it does not establish the outcome to avoid transmitting unnecessary customer identifiers with a summarization request, and an internal log is still a data store requiring access controls.
D:For the alternate objective to protect payload confidentiality between the application and its API endpoint, modern transport encryption limits interception across network boundaries; the feature here must avoid transmitting unnecessary customer identifiers with a summarization request, and merely obfuscating a prompt is not transport security.
Question 530
A Claude application build contains an upstream function and a separate downstream function. The upstream work must actually retrieve a customer's order status requested by Claude; the downstream work must match returned batch results to the right source documents despite varying completion order. Which configuration pair covers both?
- First component: Read the HTTP error status before retrying. Second component: Reconcile batch responses by custom_id.
- First component: Process tool_use responses in the application. Second component: Send tool_result content back to Claude.
- First component: Process tool_use responses in the application. Second component: Reconcile batch responses by custom_id.
- First component: Send tool_result content back to Claude. Second component: Read the HTTP error status before retrying.
Explanation
Correct Answer
C:The first proposal fits its assigned role because client tools execute in application code; the model emits structured requests but does not invoke external functions itself, while the second proposal fits its assigned role because a caller-assigned identifier links each result to the original request independently of result ordering; their respective acceptance criteria are to actually retrieve a customer's order status requested by Claude and to match returned batch results to the right source documents despite varying completion order.
Incorrect Answers
A:The first proposal serves the different purpose to distinguish an invalid request from a temporary provider or rate-limit failure instead of the assigned first role because status codes and structured errors guide correction versus bounded retry, while the second proposal fits its assigned role because a caller-assigned identifier links each result to the original request independently of result ordering; their respective acceptance criteria are to actually retrieve a customer's order status requested by Claude and to match returned batch results to the right source documents despite varying completion order.
B:The first proposal fits its assigned role because client tools execute in application code; the model emits structured requests but does not invoke external functions itself, while the second proposal serves the different purpose to produce a user-facing answer after a successful inventory lookup instead of the assigned second role because a result block tied to the tool call returns the external observation to the model for synthesis; their respective acceptance criteria are to actually retrieve a customer's order status requested by Claude and to match returned batch results to the right source documents despite varying completion order.
D:The first proposal serves the different purpose to produce a user-facing answer after a successful inventory lookup instead of the assigned first role because a result block tied to the tool call returns the external observation to the model for synthesis, while the second proposal serves the different purpose to distinguish an invalid request from a temporary provider or rate-limit failure instead of the assigned second role because status codes and structured errors guide correction versus bounded retry; their respective acceptance criteria are to actually retrieve a customer's order status requested by Claude and to match returned batch results to the right source documents despite varying completion order.