Question 390
A team maintaining a model behavior experiment must meet 2 separate acceptance criteria: (1) account for different plausible answers from the same input on repeated runs; (2) explain a billing increase after lengthy system instructions are added. Which two implementation actions directly satisfy the stated requirements? Choose TWO.
- Select an available effort level after measuring task performance.
- Measure input-token usage per request and track the prompt components.
- Check each response block's type before extracting its fields.
- Design for stochastic output and evaluate behavior over representative repeats.
- Measure cache-write overhead against subsequent cache-read savings.
Explanation
Correct Answers
B:The test to explain a billing increase after lengthy system instructions are added is met because repeated prefixes and conversation history consume billable input, so cost cannot be inferred from output length alone; the remaining selection covers the separate need to account for different plausible answers from the same input on repeated runs.
D:The test to account for different plausible answers from the same input on repeated runs is met because sampling and model execution can produce variation; important correctness must be checked rather than assumed identical on every call; the remaining selection covers the separate need to explain a billing increase after lengthy system instructions are added.
Incorrect Answers
A:The action is useful for the separate capability to trade answer latency and computation against solution quality on supported models because reasoning effort is an inference-time tradeoff; lowering it may reduce costs or latency while harming difficult-case accuracy; however, the required test outcomes are to explain a billing increase after lengthy system instructions are added and to account for different plausible answers from the same input on repeated runs.
C:The action is useful for the separate capability to prevent a tool_use block from being displayed as if it were natural-language text because typed response objects can contain several block families; assuming every block has a text field causes logic errors; however, the required test outcomes are to explain a billing increase after lengthy system instructions are added and to account for different plausible answers from the same input on repeated runs.
E:The action is useful for the separate capability to reduce repeated cost for a stable lengthy policy prefix reused many times because cache writes may cost extra while hits are cheaper; the reuse frequency determines whether the optimization saves money; however, the required test outcomes are to explain a billing increase after lengthy system instructions are added and to account for different plausible answers from the same input on repeated runs.
Question 391
In a customer-facing AI feature, testing reveals that the system cannot debug a failed request without exposing the user's confidential document and cannot send a model inference request with the operation expected by the REST endpoint. Select the two targeted actions that close these gaps. Choose TWO.
- Require peer review focused on API, security, and tool-side effects.
- Classify permanent client errors separately from transient failures.
- Log status, timing, and correlation IDs with sensitive fields redacted.
- Configure the max_tokens request parameter appropriately.
- Use the API's documented POST request with a JSON body.
Explanation
Correct Answers
C:To debug a failed request without exposing the user's confidential document as part of a design that must also send a model inference request with the operation expected by the REST endpoint, operational records can identify a failure path without retaining raw secrets or protected prompt content; this is why the action is one of the two required selections.
E:To send a model inference request with the operation expected by the REST endpoint as part of a design that must also debug a failed request without exposing the user's confidential document, a state-changing inference operation is submitted as an HTTP request with an explicit method and payload, not inferred from a browser URL alone; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to catch unsafe credentials and incorrect tool calls before deployment because human review should check trust boundaries and external actions in addition to style; successful compilation cannot prove these behaviors are safe; the required outcomes are instead to debug a failed request without exposing the user's confidential document and to send a model inference request with the operation expected by the REST endpoint.
B:This alternative serves the separate goal to avoid retrying a malformed request that the API consistently rejects because a deterministic validation or authorization error requires fixing the request or credential, not another identical attempt; the required outcomes are instead to debug a failed request without exposing the user's confidential document and to send a model inference request with the operation expected by the REST endpoint.
D:This alternative serves the separate goal to cap the maximum output generated by a Messages API request because a generation limit controls maximum output length, not total cost or correctness; too low a value can truncate useful answers; the required outcomes are instead to debug a failed request without exposing the user's confidential document and to send a model inference request with the operation expected by the REST endpoint.
Question 392
In a multi-stage support automation, testing reveals that the system cannot restrict a development agent to a defined set of file and command capabilities and cannot keep a failed tool from being mistaken for successful completion of an objective. Select the two targeted actions that close these gaps. Choose TWO.
- Catch tool failures and report typed errors into the agent loop.
- Alternate model tool-use requests with tool results until completion.
- Configure tool permissions rather than depending only on a prompt.
- Record stage-level traces and intermediate validation outcomes.
- Deploy the agent runner in the organization's own environment.
Explanation
Correct Answers
A:To keep a failed tool from being mistaken for successful completion of an objective as part of a design that must also restrict a development agent to a defined set of file and command capabilities, explicit failure messages let the model or controller choose recovery; swallowing exceptions makes later actions rely on results that never existed; this is why the action is one of the two required selections.
C:To restrict a development agent to a defined set of file and command capabilities as part of a design that must also keep a failed tool from being mistaken for successful completion of an objective, runtime permissions constrain what actions can run even if the model requests more access; prompt instructions alone are not a security boundary; this is why the action is one of the two required selections.
Incorrect Answers
B:This alternative serves the separate goal to plan another step only after inspecting the result of a requested external operation because the loop returns observations to the model so subsequent decisions are informed by actual tool output rather than imagined execution; the required outcomes are instead to restrict a development agent to a defined set of file and command capabilities and to keep a failed tool from being mistaken for successful completion of an objective.
D:This alternative serves the separate goal to pinpoint which known workflow stage failed when the final artifact is incomplete because deterministic stages are operationally useful when their boundaries are observable; a final answer alone cannot reveal which step produced the fault; the required outcomes are instead to restrict a development agent to a defined set of file and command capabilities and to keep a failed tool from being mistaken for successful completion of an objective.
E:This alternative serves the separate goal to keep orchestration runtime and internal tool handlers inside company-managed infrastructure because self-hosting puts tool execution, networking, and operational controls under the application's responsibility, subject to its own deployment constraints; the required outcomes are instead to restrict a development agent to a defined set of file and command capabilities and to keep a failed tool from being mistaken for successful completion of an objective.
Question 393
In a tool-calling Claude workflow, testing reveals that the system cannot let an MCP client invoke a business capability through a standard server interface and cannot expose an MCP server to clients across a network boundary. Select the two targeted actions that close these gaps. Choose TWO.
- Publish a properly described MCP tool and its input contract.
- Expose the material as an MCP resource with a stable identifier.
- Configure a supported remote HTTP transport with authentication and deployment controls.
- Configure the supported tool_choice behavior for the request.
- Configure the built-in capability instead of recreating it as a local handler.
Explanation
Correct Answers
A:To let an MCP client invoke a business capability through a standard server interface as part of a design that must also expose an MCP server to clients across a network boundary, MCP tools represent callable operations with typed parameters; the server executes authorized behavior rather than only providing reference text; this is why the action is one of the two required selections.
C:To expose an MCP server to clients across a network boundary as part of a design that must also let an MCP client invoke a business capability through a standard server interface, remote connectivity needs network routing, identity, and authorization; a local stdio subprocess is not a remotely reachable service; this is why the action is one of the two required selections.
Incorrect Answers
B:This alternative serves the separate goal to make reference material available for clients to read as context because resources represent consumable data, contrasting with tools that invoke an operation or prompts that package reusable instructions; the required outcomes are instead to let an MCP client invoke a business capability through a standard server interface and to expose an MCP server to clients across a network boundary.
D:This alternative serves the separate goal to require or restrict tool use for a specific turn when the API supports that control because tool-selection controls influence whether Claude may call tools, but cannot grant permissions to the underlying systems; the required outcomes are instead to let an MCP client invoke a business capability through a standard server interface and to expose an MCP server to clients across a network boundary.
E:This alternative serves the separate goal to obtain a capability already provided as a supported Anthropic server tool because provider tools simplify execution ownership, though availability, cost, and data handling still require assessment; the required outcomes are instead to let an MCP client invoke a business capability through a standard server interface and to expose an MCP server to clients across a network boundary.
Question 394
A team maintaining a document grounding pipeline must meet 3 separate acceptance criteria: (1) keep only evidence that matters to the question when retrieval returns hundreds of documents; (2) avoid processing a truncated structured response as a complete record; (3) leave space for a model to generate a complete answer after adding source documents. Which three implementation actions directly satisfy the stated requirements? Choose THREE.
- Reserve an output budget while enforcing input-context limits.
- Mark untrusted quoted material with explicit boundaries and role context.
- Recheck current plans against a stored objective and constraints.
- Catch the parsing error and apply a bounded repair or retry path.
- Require a completed stop condition before accepting the parsed result.
- Rank and select relevant passages before building the model context.
Explanation
Correct Answers
A:The test to leave space for a model to generate a complete answer after adding source documents is met because input instructions, history, and evidence share the overall model capacity with generation, so filling it entirely can truncate output; the remaining selections covers the separate need to avoid processing a truncated structured response as a complete record and need to keep only evidence that matters to the question when retrieval returns hundreds of documents.
E:The test to avoid processing a truncated structured response as a complete record is met because a response cut off by token limits may parse incompletely or omit required content; completion status matters in addition to syntax; the remaining selections covers the separate need to leave space for a model to generate a complete answer after adding source documents and need to keep only evidence that matters to the question when retrieval returns hundreds of documents.
F:The test to keep only evidence that matters to the question when retrieval returns hundreds of documents is met because relevance filtering reduces distracting information and token usage; dumping every retrieved page can degrade grounding and exceed limits; the remaining selections covers the separate need to leave space for a model to generate a complete answer after adding source documents and need to avoid processing a truncated structured response as a complete record.
Incorrect Answers
B:The action is useful for the separate capability to distinguish a user's instructions from a quoted document containing imperatives because delimiters clarify that imported content is data to analyze, not a new authority to change tools or objectives; however, the required test outcomes are to leave space for a model to generate a complete answer after adding source documents and to avoid processing a truncated structured response as a complete record and to keep only evidence that matters to the question when retrieval returns hundreds of documents.
C:The action is useful for the separate capability to identify when a long agent discussion begins solving a different problem than the user approved because explicit objective comparison detects drift before tool actions diverge from the original task; extra history alone cannot guarantee alignment; however, the required test outcomes are to leave space for a model to generate a complete answer after adding source documents and to avoid processing a truncated structured response as a complete record and to keep only evidence that matters to the question when retrieval returns hundreds of documents.
D:The action is useful for the separate capability to handle a JSON parse failure without silently accepting partial data because defensive parsing makes failures explicit and limits reattempts; swallowing errors can propagate corrupt records; however, the required test outcomes are to leave space for a model to generate a complete answer after adding source documents and to avoid processing a truncated structured response as a complete record and to keep only evidence that matters to the question when retrieval returns hundreds of documents.
Question 395
While planning a hosted document-processing service, the product owner specifies that it must connect execution output to the exact tool request Claude made. Which solution fulfills the requirement?
- Branch on stop_reason tool_use and dispatch the declared calls.
- Assemble messages with correct user and assistant roles.
- Handle stop_reason max_tokens as truncation and continue or revise the limit.
- Return tool_result blocks containing the corresponding tool_use_id.
Explanation
Correct Answer
D:To connect execution output to the exact tool request Claude made in this hosted document-processing service, tool correlation preserves call-to-result semantics in the message sequence, especially when several tools were requested together; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to recognize that the model is asking the application to execute a client tool because a tool-use stop requires host-side handling and a follow-up message containing results, not presenting the call as final prose; that mechanism does not meet the different requirement to connect execution output to the exact tool request Claude made.
B:The proposed alternative helps to distinguish an end user's request from previous assistant turns in a dialogue because conversation structure influences how the model interprets dialogue and tool history; flattening roles into one text string loses that structure; that mechanism does not meet the different requirement to connect execution output to the exact tool request Claude made.
C:The proposed alternative helps to recover when a response ends because its generation budget was reached because a truncated completion may contain unfinished content, so treating it as a validated final answer risks losing required fields; that mechanism does not meet the different requirement to connect execution output to the exact tool request Claude made.
Question 396
In a production incident affecting a Claude endpoint, a release requirement is to distinguish a syntactically valid but low-quality answer from a transport outage. Which implementation addresses that specific requirement?
- Examine correlated request, tool, and transformation traces stage by stage.
- Compare versioned prompts and representative eval cases against model responses.
- Inspect the HTTP 429 status and rate-limit metadata before retrying.
- Read the 400 error details and validate the request payload.
Explanation
Correct Answer
B:To distinguish a syntactically valid but low-quality answer from a transport outage in this production incident affecting a Claude endpoint, a successful HTTP call only proves the protocol worked; quality regressions require output-level evidence and controlled comparisons; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to locate which component of a multi-tool answer introduced the wrong value because structured traces reveal whether retrieval, tool execution, postprocessing, or generation caused the defect; reading only the final text cannot isolate it; that mechanism does not meet the different requirement to distinguish a syntactically valid but low-quality answer from a transport outage.
C:The proposed alternative helps to distinguish an upstream throttling response from a malformed model answer because a rate limit is a request-layer capacity problem; the response needs controlled pacing rather than a prompt rewrite; that mechanism does not meet the different requirement to distinguish a syntactically valid but low-quality answer from a transport outage.
D:The proposed alternative helps to find a request schema error instead of repeatedly changing the system prompt because an invalid API field or incompatible parameter cannot be fixed by natural-language instructions within the malformed request; that mechanism does not meet the different requirement to distinguish a syntactically valid but low-quality answer from a transport outage.
Question 397
Two acceptance tests block a latency-sensitive model gateway: one requires the ability to reduce repeated cost for a stable lengthy policy prefix reused many times; the other requires the ability to cut cost for a nightly noninteractive summarization workload. Which plan clears both tests?
- Perform both steps: (1) Propagate cancellation to the active network request when supported; (2) evaluate message batches instead of synchronous requests.
- Perform both steps: (1) Propagate cancellation to the active network request when supported; (2) compare quality-adjusted cost per accepted result across candidate models.
- Perform both steps: (1) Measure cache-write overhead against subsequent cache-read savings; (2) compare quality-adjusted cost per accepted result across candidate models.
- Perform both steps: (1) Measure cache-write overhead against subsequent cache-read savings; (2) evaluate message batches instead of synchronous requests.
Explanation
Correct Answer
D:The first change enables the team to reduce repeated cost for a stable lengthy policy prefix reused many times because cache writes may cost extra while hits are cheaper; the reuse frequency determines whether the optimization saves money; the second addresses the separate need to cut cost for a nightly noninteractive summarization workload because asynchronous batches can offer discounted processing when the application can tolerate deferred completion and result collection.
Incorrect Answers
A:The second step meets the requirement to cut cost for a nightly noninteractive summarization workload because asynchronous batches can offer discounted processing when the application can tolerate deferred completion and result collection; the first step would only help to stop a no-longer-needed inference when the user's request is cancelled because cancelling work can free local resources and avoid processing obsolete results, though already-incurred provider work may still be billed, leaving the separate requirement to reduce repeated cost for a stable lengthy policy prefix reused many times unmet.
B:Both steps target different results—stop a no-longer-needed inference when the user's request is cancelled and choose a cheaper model only when the workload-level economics improve—because cancelling work can free local resources and avoid processing obsolete results, though already-incurred provider work may still be billed and a lower token price can be offset by retries, higher failure rates, or excessive output, so accepted-result cost is the useful measure; the required capabilities are instead to reduce repeated cost for a stable lengthy policy prefix reused many times and to cut cost for a nightly noninteractive summarization workload.
C:The first step is appropriate for the requirement to reduce repeated cost for a stable lengthy policy prefix reused many times because cache writes may cost extra while hits are cheaper; the reuse frequency determines whether the optimization saves money; the other step instead aims to choose a cheaper model only when the workload-level economics improve because a lower token price can be offset by retries, higher failure rates, or excessive output, so accepted-result cost is the useful measure, which does not meet the second requirement to cut cost for a nightly noninteractive summarization workload.
Question 398
A team maintaining a Python Claude API backend has two different engineering requirements: (1) show generated text progressively instead of waiting for the full response, and (2) prevent duplicate purchases or tickets if an agent repeats a tool call. Which TWO independent changes directly meet them? Choose TWO.
- Give mutating operations an application-level idempotency key.
- Use the provider-specific endpoint, authentication, and request conventions.
- Enable streaming and consume server-sent events in order.
- Handle stop_reason max_tokens as truncation and continue or revise the limit.
- Detect transport interruption and mark incomplete generated content.
Explanation
Correct Answers
A:To prevent duplicate purchases or tickets if an agent repeats a tool call as part of a design that must also show generated text progressively instead of waiting for the full response, idempotency ensures replays of the same intended action do not create duplicate real-world effects even when orchestration retries; this is why the action is one of the two required selections.
C:To show generated text progressively instead of waiting for the full response as part of a design that must also prevent duplicate purchases or tickets if an agent repeats a tool call, streaming transmits partial deltas and completion events, allowing earlier display while requiring the client to assemble content safely; this is why the action is one of the two required selections.
Incorrect Answers
B:This alternative serves the separate goal to support Claude models accessed through different supported cloud offerings because Claude API, Bedrock, and Vertex-style integrations are not interchangeable URLs; host authentication and service wrappers differ; the required outcomes are instead to show generated text progressively instead of waiting for the full response and to prevent duplicate purchases or tickets if an agent repeats a tool call.
D:This alternative serves the separate goal to recover when a response ends because its generation budget was reached because a truncated completion may contain unfinished content, so treating it as a validated final answer risks losing required fields; the required outcomes are instead to show generated text progressively instead of waiting for the full response and to prevent duplicate purchases or tickets if an agent repeats a tool call.
E:This alternative serves the separate goal to avoid silently treating a broken streaming connection as a complete answer because network termination before a final message event can leave a partial response, which needs explicit recovery rather than success handling; the required outcomes are instead to show generated text progressively instead of waiting for the full response and to prevent duplicate purchases or tickets if an agent repeats a tool call.
Question 399
A team maintaining an autonomous repository maintenance job has two different engineering requirements: (1) deliver intermediate agent events to the client as they occur, and (2) execute a requested internal business function inside the application's trusted process. Which TWO independent changes directly meet them? Choose TWO.
- Configure tool permissions rather than depending only on a prompt.
- Consume the agent runtime's streamed event sequence.
- Inspect the tool_use block, invoke the authorized handler, and return tool_result.
- Use the Claude Agent SDK for the agent's execution harness.
- Give an agent a bounded objective and a tool-selection loop.
Explanation
Correct Answers
B:To deliver intermediate agent events to the client as they occur as part of a design that must also execute a requested internal business function inside the application's trusted process, event-driven consumption lets the application display progress and inspect tool actions without waiting for the entire multi-step run to finish; this is why the action is one of the two required selections.
C:To execute a requested internal business function inside the application's trusted process as part of a design that must also deliver intermediate agent events to the client as they occur, client tools are executed by the application, not by merely declaring a schema; every returned result must be matched to its tool-use identifier; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to restrict a development agent to a defined set of file and command capabilities because runtime permissions constrain what actions can run even if the model requests more access; prompt instructions alone are not a security boundary; the required outcomes are instead to deliver intermediate agent events to the client as they occur and to execute a requested internal business function inside the application's trusted process.
D:This alternative serves the separate goal to build a Claude-powered coding agent with an established runtime for tool orchestration because the SDK provides structured primitives for agent sessions and tool execution, reducing the custom loop infrastructure the application must maintain; the required outcomes are instead to deliver intermediate agent events to the client as they occur and to execute a requested internal business function inside the application's trusted process.
E:This alternative serves the separate goal to pursue an open-ended investigation where the next action depends on intermediate evidence because agentic control lets the model choose among permitted steps as observations arrive; budgets and termination conditions still bound its autonomy; the required outcomes are instead to deliver intermediate agent events to the client as they occur and to execute a requested internal business function inside the application's trusted process.
Question 400
For an enterprise MCP client, the missing capability is to expose a business lookup with predictable typed arguments. What should the developers implement?
- Define a descriptive tool name and validated input schema.
- Expose the material as an MCP resource with a stable identifier.
- Put an approval gate in the host-side write handler.
- Describe each tool's purpose, required inputs, and limitations clearly.
Explanation
Correct Answer
A:To expose a business lookup with predictable typed arguments in this enterprise MCP client, well-described schemas help Claude select a capability and emit usable arguments; the backend still validates authorization and meaning; the proposed implementation directly supplies that capability.
Incorrect Answers
B:The proposed alternative helps to make reference material available for clients to read as context because resources represent consumable data, contrasting with tools that invoke an operation or prompts that package reusable instructions; that mechanism does not meet the different requirement to expose a business lookup with predictable typed arguments.
C:The proposed alternative helps to ensure an agent obtains explicit authorization before updating a customer record because an irreversible or sensitive write must be permitted by trusted application logic, not merely because the model selected a tool; that mechanism does not meet the different requirement to expose a business lookup with predictable typed arguments.
D:The proposed alternative helps to prevent two similarly named lookup tools from being confused because tool descriptions influence the model's selection, so overlapping or vague names make dispatch less reliable; that mechanism does not meet the different requirement to expose a business lookup with predictable typed arguments.