Question 20
To ship a TypeScript Claude integration, the application must recognize that the model is asking the application to execute a client tool and handle a response containing reasoning-related blocks without confusing them with ordinary final text. Which pair of listed actions is necessary for those stated capabilities? Choose TWO.
- Parse response content by block type and follow current thinking-field rules.
- Treat stop_reason end_turn as a completed assistant turn.
- Branch on stop_reason tool_use and dispatch the declared calls.
- Submit independent requests through the Message Batches API.
- Send instructions using the request's top-level system field.
Explanation
Correct Answers
A:To handle a response containing reasoning-related blocks without confusing them with ordinary final text as part of a design that must also recognize that the model is asking the application to execute a client tool, structured content may contain distinct block types and signatures; a parser that assumes only plain text can discard important protocol data; this is why the action is one of the two required selections.
C:To recognize that the model is asking the application to execute a client tool as part of a design that must also handle a response containing reasoning-related blocks without confusing them with ordinary final text, a tool-use stop requires host-side handling and a follow-up message containing results, not presenting the call as final prose; this is why the action is one of the two required selections.
Incorrect Answers
B:This alternative serves the separate goal to detect that the assistant has naturally finished a response because the completion signal is explicit in the response metadata; it should not be inferred solely from a sentence ending in punctuation; the required outcomes are instead to recognize that the model is asking the application to execute a client tool and to handle a response containing reasoning-related blocks without confusing them with ordinary final text.
D:This alternative serves the separate goal to process a large queue of independent, noninteractive requests at a lower-cost asynchronous pace because batch processing is suited to deferred work with eventual result collection and is not a substitute for an interactive low-latency chat endpoint; the required outcomes are instead to recognize that the model is asking the application to execute a client tool and to handle a response containing reasoning-related blocks without confusing them with ordinary final text.
E:This alternative serves the separate goal to set consistent developer-controlled behavior separately from untrusted user text because the system field separates higher-priority application guidance from user-message content and should not be simulated by ordinary quoted text; the required outcomes are instead to recognize that the model is asking the application to execute a client tool and to handle a response containing reasoning-related blocks without confusing them with ordinary final text.
Question 21
The technical owner of a knowledge-grounded assistant has to safely render generated text in a browser without executing embedded markup. A separate requirement is to avoid treating fluent model wording as evidence that a claim is verified. Which two-part remediation covers both?
- Perform both steps: (1) Escape or sanitize model text in the output presentation layer; (2) ground consequential statements in retrieved evidence or external checks.
- Perform both steps: (1) Validate parsed output against the application's declared schema; (2) ground consequential statements in retrieved evidence or external checks.
- Perform both steps: (1) Escape or sanitize model text in the output presentation layer; (2) have a scoped subagent process sources and return a concise verified handoff.
- Perform both steps: (1) Validate parsed output against the application's declared schema; (2) have a scoped subagent process sources and return a concise verified handoff.
Explanation
Correct Answer
A:The first change enables the team to safely render generated text in a browser without executing embedded markup because generated content is untrusted for HTML rendering; injection into the DOM must not become executable client-side code; the second addresses the separate need to avoid treating fluent model wording as evidence that a claim is verified because linguistic confidence is not a calibrated truth guarantee, so factual correctness requires independent support.
Incorrect Answers
B:The second step meets the requirement to avoid treating fluent model wording as evidence that a claim is verified because linguistic confidence is not a calibrated truth guarantee, so factual correctness requires independent support; the first step would only help to reject model output missing a field that a downstream service requires because parsing proves a string is legal JSON, but schema validation checks required keys, types, and structural constraints, leaving the separate requirement to safely render generated text in a browser without executing embedded markup unmet.
C:The first step is appropriate for the requirement to safely render generated text in a browser without executing embedded markup because generated content is untrusted for HTML rendering; injection into the DOM must not become executable client-side code; the other step instead aims to analyze a large source set without exposing every raw document to the parent agent because separate contexts let specialists work deeply while the coordinator sees only claims and references needed for the final decision, which does not meet the second requirement to avoid treating fluent model wording as evidence that a claim is verified.
D:Both steps target different results—reject model output missing a field that a downstream service requires and analyze a large source set without exposing every raw document to the parent agent—because parsing proves a string is legal JSON, but schema validation checks required keys, types, and structural constraints and separate contexts let specialists work deeply while the coordinator sees only claims and references needed for the final decision; the required capabilities are instead to safely render generated text in a browser without executing embedded markup and to avoid treating fluent model wording as evidence that a claim is verified.
Question 22
A team maintaining a model behavior experiment must meet 2 separate acceptance criteria: (1) trade answer latency and computation against solution quality on supported models; (2) deliver moderately complex development assistance with balanced quality, cost, and latency. Which two implementation actions directly satisfy the stated requirements? Choose TWO.
- Evaluate a Sonnet-family model against a realistic task set.
- Budget total context for instructions, history, tools, and output.
- Evaluate Message Batches instead of synchronous requests.
- Run contract and integration tests against the upgraded SDK in staging.
- Select an available effort level after measuring task performance.
Explanation
Correct Answers
A:The test to deliver moderately complex development assistance with balanced quality, cost, and latency is met because a balanced model tier often offers useful capability without the latency or cost of the most expensive tier; evaluation should drive final selection; the remaining selection covers the separate need to trade answer latency and computation against solution quality on supported models.
E:The test to trade answer latency and computation against solution quality on supported models is met because reasoning effort is an inference-time tradeoff; lowering it may reduce costs or latency while harming difficult-case accuracy; the remaining selection covers the separate need to deliver moderately complex development assistance with balanced quality, cost, and latency.
Incorrect Answers
B:The action is useful for the separate capability to know why a long prompt plus a proposed response may exceed the model's accepted context because a context window bounds what can be processed in one request; large tool results consume it along with user messages; however, the required test outcomes are to deliver moderately complex development assistance with balanced quality, cost, and latency and to trade answer latency and computation against solution quality on supported models.
C:The action is useful for the separate capability 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; however, the required test outcomes are to deliver moderately complex development assistance with balanced quality, cost, and latency and to trade answer latency and computation against solution quality on supported models.
D:The action is useful for the separate capability to detect changed library behavior before rolling a new version into production because client-library version shifts can affect serialization or errors even without changes to business prompts, so they deserve release validation; however, the required test outcomes are to deliver moderately complex development assistance with balanced quality, cost, and latency and to trade answer latency and computation against solution quality on supported models.
Question 23
For a customer-facing AI feature, a design is acceptable only if it can prevent a document-upload endpoint from passing unsupported bytes to the model while also being able to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs. Which paired implementation is sufficient?
- Perform both steps: (1) Place stable application rules in system instructions and untrusted requests in user content; (2) persist explicit job states with allowed transitions.
- Perform both steps: (1) Validate file type, size, and allowed content conversion before API submission; (2) buffer structured data until it can be parsed and validated before ui commit.
- Perform both steps: (1) Place stable application rules in system instructions and untrusted requests in user content; (2) buffer structured data until it can be parsed and validated before ui commit.
- Perform both steps: (1) Validate file type, size, and allowed content conversion before API submission; (2) persist explicit job states with allowed transitions.
Explanation
Correct Answer
D:The first change enables the team to prevent a document-upload endpoint from passing unsupported bytes to the model because client filenames are not enough to establish content validity; ingestion must enforce protocol and product constraints; the second addresses the separate need to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs because a state machine prevents an incomplete tool operation from being shown as successful and makes retries and cancellation predictable.
Incorrect Answers
A:The second step meets the requirement to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs because a state machine prevents an incomplete tool operation from being shown as successful and makes retries and cancellation predictable; the first step would only help to keep application policy separate from a user's question because instruction placement preserves the distinction between developer intent and user-supplied data; concatenating everything blurs that boundary, leaving the separate requirement to prevent a document-upload endpoint from passing unsupported bytes to the model unmet.
B:The first step is appropriate for the requirement to prevent a document-upload endpoint from passing unsupported bytes to the model because client filenames are not enough to establish content validity; ingestion must enforce protocol and product constraints; the other step instead aims to display partial sentences without publishing malformed structured records because a text stream can arrive in fragments; consumers must distinguish presentation updates from complete machine-readable objects, which does not meet the second requirement to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs.
C:Both steps target different results—keep application policy separate from a user's question and display partial sentences without publishing malformed structured records—because instruction placement preserves the distinction between developer intent and user-supplied data; concatenating everything blurs that boundary and a text stream can arrive in fragments; consumers must distinguish presentation updates from complete machine-readable objects; the required capabilities are instead to prevent a document-upload endpoint from passing unsupported bytes to the model and to distinguish queued, running, waiting-for-approval, failed, and completed agent jobs.
Question 24
In an internal agent-extension rollout, a release requirement is to let an MCP client invoke a business capability through a standard server interface. Which implementation addresses that specific requirement?
- Register a prompt template with its required arguments.
- Configure the built-in capability instead of recreating it as a local handler.
- Publish a properly described MCP tool and its input contract.
- Validate model-supplied tool arguments against schema and domain rules.
Explanation
Correct Answer
C:To let an MCP client invoke a business capability through a standard server interface in this internal agent-extension rollout, MCP tools represent callable operations with typed parameters; the server executes authorized behavior rather than only providing reference text; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to offer users a reusable parameterized instruction template from an MCP server because MCP prompts provide structured prompt content, but by themselves do not perform external business actions; that mechanism does not meet the different requirement to let an MCP client invoke a business capability through a standard server interface.
B:The proposed alternative helps 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; that mechanism does not meet the different requirement to let an MCP client invoke a business capability through a standard server interface.
D:The proposed alternative helps to reject a date or identifier that violates business constraints before a service call because even syntactically correct generated inputs can violate account scope or allowed values, so execution must validate both levels; that mechanism does not meet the different requirement to let an MCP client invoke a business capability through a standard server interface.
Question 25
An architecture decision for a latency-sensitive model gateway must support explain why language-model output is generated step by step rather than fetched from a fixed response table and invite stylistic variety during noncritical brainstorming. Which option gives a complete rather than partial solution?
- Perform both steps: (1) Use the model's documented thinking capability within the latency budget; (2) provide one accurate input-output demonstration.
- Perform both steps: (1) Model the response as conditioned token generation; (2) provide one accurate input-output demonstration.
- Perform both steps: (1) Use the model's documented thinking capability within the latency budget; (2) use more exploratory sampling where supported and measure quality.
- Perform both steps: (1) Model the response as conditioned token generation; (2) use more exploratory sampling where supported and measure quality.
Explanation
Correct Answer
D:The first change enables the team to explain why language-model output is generated step by step rather than fetched from a fixed response table because autoregressive decoding selects subsequent tokens based on supplied context and prior output, which creates flexible but non-guaranteed wording; the second addresses the separate need to invite stylistic variety during noncritical brainstorming because higher sampling randomness broadens candidate phrasing but can reduce predictability, so it suits ideation better than strict extraction.
Incorrect Answers
A:Both steps target different results—allocate additional reasoning effort to a complex multistep decision where supported and teach a distinctive output format with one representative example—because reasoning settings can change token consumption and response latency and should be evaluated for the particular workload and a single example illustrates structure and conventions, but it may not reveal how to handle difficult edge cases; the required capabilities are instead to explain why language-model output is generated step by step rather than fetched from a fixed response table and to invite stylistic variety during noncritical brainstorming.
B:The first step is appropriate for the requirement to explain why language-model output is generated step by step rather than fetched from a fixed response table because autoregressive decoding selects subsequent tokens based on supplied context and prior output, which creates flexible but non-guaranteed wording; the other step instead aims to teach a distinctive output format with one representative example because a single example illustrates structure and conventions, but it may not reveal how to handle difficult edge cases, which does not meet the second requirement to invite stylistic variety during noncritical brainstorming.
C:The second step meets the requirement to invite stylistic variety during noncritical brainstorming because higher sampling randomness broadens candidate phrasing but can reduce predictability, so it suits ideation better than strict extraction; the first step would only help to allocate additional reasoning effort to a complex multistep decision where supported because reasoning settings can change token consumption and response latency and should be evaluated for the particular workload, leaving the separate requirement to explain why language-model output is generated step by step rather than fetched from a fixed response table unmet.
Question 26
Two approval criteria are still open for an internal coding-assistant workflow: the team must avoid adding orchestration infrastructure to a single request-and-response feature and continue a long agent run after intermediate observations dominate the context. Which two implementation actions satisfy them? Choose TWO.
- Define and validate a typed schema at the handoff.
- Compact prior progress into an accurate working summary.
- Delegate source analysis to a subagent and return a concise result.
- Retrieve only task-relevant memories into the active context.
- Prefer a simple API call over a general-purpose multi-agent framework.
Explanation
Correct Answers
B:To continue a long agent run after intermediate observations dominate the context as part of a design that must also avoid adding orchestration infrastructure to a single request-and-response feature, compaction preserves decisions and unresolved work while reducing token pressure; losing constraints in the summary can still cause errors; this is why the action is one of the two required selections.
E:To avoid adding orchestration infrastructure to a single request-and-response feature as part of a design that must also continue a long agent run after intermediate observations dominate the context, frameworks are useful for genuinely branching, long-lived execution, but increase complexity when no orchestration problem exists; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to pass reliable machine-readable outputs between independently developed agent stages because typed outputs make downstream contracts inspectable and reduce ambiguity caused by free-form prose passed as control data; the required outcomes are instead to avoid adding orchestration infrastructure to a single request-and-response feature and to continue a long agent run after intermediate observations dominate the context.
C:This alternative serves the separate goal to keep a large source-reading task from crowding the coordinator's working context because isolated workspaces let a specialist process extensive material while the parent receives only task-relevant evidence instead of every intermediate token; the required outcomes are instead to avoid adding orchestration infrastructure to a single request-and-response feature and to continue a long agent run after intermediate observations dominate the context.
D:This alternative serves the separate goal to stop old agent histories from burying the information needed for the current step because selective retrieval improves signal-to-noise and keeps token use bounded while retaining access to older information when required; the required outcomes are instead to avoid adding orchestration infrastructure to a single request-and-response feature and to continue a long agent run after intermediate observations dominate the context.
Question 27
An operational review of a hosted document-processing service reports distinct failures: it cannot need schema-conformant JSON for a downstream parser at generation time, and it cannot prevent a document-upload endpoint from passing unsupported bytes to the model. Which two repairs are required? Choose TWO.
- Enable required plugin or connector capabilities using least-privilege configuration.
- Parse response content by block type and follow current thinking-field rules.
- Place stable application rules in system instructions and untrusted requests in user content.
- Configure supported structured outputs with a JSON Schema.
- Validate file type, size, and allowed content conversion before API submission.
Explanation
Correct Answers
D:To need schema-conformant JSON for a downstream parser at generation time as part of a design that must also prevent a document-upload endpoint from passing unsupported bytes to the model, constrained JSON generation targets machine-parseable fields and types; free-form prompting alone does not establish the same guarantee; this is why the action is one of the two required selections.
E:To prevent a document-upload endpoint from passing unsupported bytes to the model as part of a design that must also need schema-conformant JSON for a downstream parser at generation time, client filenames are not enough to establish content validity; ingestion must enforce protocol and product constraints; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to expose external business tools only to workflows that actually need them because tools expand the application's action surface; indiscriminate activation increases risk and can confuse model selection among similar functions; the required outcomes are instead to need schema-conformant JSON for a downstream parser at generation time and to prevent a document-upload endpoint from passing unsupported bytes to the model.
B:This alternative serves the separate goal to handle a response containing reasoning-related blocks without confusing them with ordinary final text because structured content may contain distinct block types and signatures; a parser that assumes only plain text can discard important protocol data; the required outcomes are instead to need schema-conformant JSON for a downstream parser at generation time and to prevent a document-upload endpoint from passing unsupported bytes to the model.
C:This alternative serves the separate goal to keep application policy separate from a user's question because instruction placement preserves the distinction between developer intent and user-supplied data; concatenating everything blurs that boundary; the required outcomes are instead to need schema-conformant JSON for a downstream parser at generation time and to prevent a document-upload endpoint from passing unsupported bytes to the model.
Question 28
For a secure tool-execution boundary, the missing capability is to stop a coding agent from running commands that match a prohibited destructive pattern. What should the developers implement?
- Use layered policy enforcement and restrict powerful tools independently of chat text.
- Define fail-closed behavior for an enforcement hook and test failure paths.
- Enforce a pre-tool hook that denies the disallowed call.
- Combine prompt boundaries, scoped credentials, validation, and approval gates.
Explanation
Correct Answer
C:To stop a coding agent from running commands that match a prohibited destructive pattern in this secure tool-execution boundary, a deterministic hook checks the proposed command before execution, providing a stronger control than asking the agent to self-police; the proposed implementation directly supplies that capability.
Incorrect Answers
A:The proposed alternative helps to prevent an adversarial user from bypassing safety policy by roleplay instructions because adversarial prompting can target instruction hierarchy, so product controls and tool authorization must remain effective when wording is manipulated; that mechanism does not meet the different requirement to stop a coding agent from running commands that match a prohibited destructive pattern.
B:The proposed alternative helps to avoid accidentally allowing critical writes when a safety check crashes because a guardrail that silently skips checks on errors is not an effective boundary; failures must prevent the protected action when policy requires it; that mechanism does not meet the different requirement to stop a coding agent from running commands that match a prohibited destructive pattern.
D:The proposed alternative helps to secure an agent against both malicious retrieved text and unsafe tool execution because defense in depth assumes individual filters can fail; independent enforcement boundaries reduce the chance of harmful side effects; that mechanism does not meet the different requirement to stop a coding agent from running commands that match a prohibited destructive pattern.
Question 29
The owner of a model selection trial needs to deliver moderately complex development assistance with balanced quality, cost, and latency as well as choose between two supported model releases using evidence rather than reputation. Which two changes belong in the minimum remediation plan? Choose TWO.
- Compare both candidates on identical representative eval cases.
- Evaluate a Sonnet-family model against a realistic task set.
- Prefer a maintained SDK when its typed methods and retry behavior fit the integration.
- Iterate the SDK or HTTP event stream until its terminal event.
- Evaluate Message Batches instead of synchronous requests.
Explanation
Correct Answers
A:To choose between two supported model releases using evidence rather than reputation as part of a design that must also deliver moderately complex development assistance with balanced quality, cost, and latency, holding inputs and scoring constant reveals quality and latency changes that generic model descriptions cannot settle; this is why the action is one of the two required selections.
B:To deliver moderately complex development assistance with balanced quality, cost, and latency as part of a design that must also choose between two supported model releases using evidence rather than reputation, a balanced model tier often offers useful capability without the latency or cost of the most expensive tier; evaluation should drive final selection; this is why the action is one of the two required selections.
Incorrect Answers
C:This alternative serves the separate goal to choose between writing raw REST requests and using an official client library because sDKs wrap the same underlying service API and can simplify serialization, error types, and streaming without removing protocol constraints; the required outcomes are instead to deliver moderately complex development assistance with balanced quality, cost, and latency and to choose between two supported model releases using evidence rather than reputation.
D:This alternative serves the separate goal to process partial model output as it is delivered over a streaming connection because streaming clients must handle both content deltas and final status rather than assuming the first chunk is the complete response; the required outcomes are instead to deliver moderately complex development assistance with balanced quality, cost, and latency and to choose between two supported model releases using evidence rather than reputation.
E:This alternative serves the separate goal 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 required outcomes are instead to deliver moderately complex development assistance with balanced quality, cost, and latency and to choose between two supported model releases using evidence rather than reputation.
Question 30
A planned upgrade to an operations research assistant has two requirements that must both pass: pursue an open-ended investigation where the next action depends on intermediate evidence; pinpoint which known workflow stage failed when the final artifact is incomplete. Identify the two direct implementations. Choose TWO.
- Delegate source analysis to a subagent and return a concise result.
- Enforce explicit completion checks and a maximum iteration budget.
- Define and validate a typed schema at the handoff.
- Give an agent a bounded objective and a tool-selection loop.
- Record stage-level traces and intermediate validation outcomes.
Explanation
Correct Answers
D:To pursue an open-ended investigation where the next action depends on intermediate evidence as part of a design that must also pinpoint which known workflow stage failed when the final artifact is incomplete, agentic control lets the model choose among permitted steps as observations arrive; budgets and termination conditions still bound its autonomy; this is why the action is one of the two required selections.
E:To pinpoint which known workflow stage failed when the final artifact is incomplete as part of a design that must also pursue an open-ended investigation where the next action depends on intermediate evidence, deterministic stages are operationally useful when their boundaries are observable; a final answer alone cannot reveal which step produced the fault; this is why the action is one of the two required selections.
Incorrect Answers
A:This alternative serves the separate goal to keep a large source-reading task from crowding the coordinator's working context because isolated workspaces let a specialist process extensive material while the parent receives only task-relevant evidence instead of every intermediate token; the required outcomes are instead to pursue an open-ended investigation where the next action depends on intermediate evidence and to pinpoint which known workflow stage failed when the final artifact is incomplete.
B:This alternative serves the separate goal to stop iterative tool use when a success condition or resource budget is reached because bounded loops avoid unending tool calls and uncontrolled spend while making incomplete work visible instead of silently continuing; the required outcomes are instead to pursue an open-ended investigation where the next action depends on intermediate evidence and to pinpoint which known workflow stage failed when the final artifact is incomplete.
C:This alternative serves the separate goal to pass reliable machine-readable outputs between independently developed agent stages because typed outputs make downstream contracts inspectable and reduce ambiguity caused by free-form prose passed as control data; the required outcomes are instead to pursue an open-ended investigation where the next action depends on intermediate evidence and to pinpoint which known workflow stage failed when the final artifact is incomplete.