Question 240
Engineers are splitting a language-model integration service into two independently tested functions. Function A must estimate model-token input demand before launching a large processing job, while function B must smooth sudden ingestion spikes before workers call a capacity-limited model API. Which plan is sound?
- First component: Use the Messages count_tokens capability. Second component: Use a queue for burst absorption.
- First component: Use the Messages count_tokens capability. Second component: Use the official SDK for standard requests.
- First component: Choose WebSockets for bidirectional realtime exchange. Second component: Use a queue for burst absorption.
- First component: Use the official SDK for standard requests. Second component: Choose WebSockets for bidirectional realtime exchange.
Explanation
Correct Answer
A:The first proposal fits its assigned role because token counting helps check input budgets before generation and cost planning, while the second proposal fits its assigned role because queueing decouples producers from consumer throughput and enables controlled retries; their respective acceptance criteria are to estimate model-token input demand before launching a large processing job and to smooth sudden ingestion spikes before workers call a capacity-limited model API.
Incorrect Answers
B:The first proposal fits its assigned role because token counting helps check input budgets before generation and cost planning, while the second proposal serves the different purpose to simplify authentication, serialization, and response typing in a Python service instead of the assigned second role because maintained client libraries wrap the HTTP API and expose structured response objects; their respective acceptance criteria are to estimate model-token input demand before launching a large processing job and to smooth sudden ingestion spikes before workers call a capacity-limited model API.
C:The first proposal serves the different purpose to implement an interactive collaboration channel requiring messages in both directions instead of the assigned first role because persistent two-way channels fit interactive event exchange where the client also sends messages during a session, while the second proposal fits its assigned role because queueing decouples producers from consumer throughput and enables controlled retries; their respective acceptance criteria are to estimate model-token input demand before launching a large processing job and to smooth sudden ingestion spikes before workers call a capacity-limited model API.
D:The first proposal serves the different purpose to simplify authentication, serialization, and response typing in a Python service instead of the assigned first role because maintained client libraries wrap the HTTP API and expose structured response objects, while the second proposal serves the different purpose to implement an interactive collaboration channel requiring messages in both directions instead of the assigned second role because persistent two-way channels fit interactive event exchange where the client also sends messages during a session; their respective acceptance criteria are to estimate model-token input demand before launching a large processing job and to smooth sudden ingestion spikes before workers call a capacity-limited model API.
Question 241
A technical specification for a data pipeline application assigns two jobs to separate modules: module A must compute discounts through verified business code rather than generated arithmetic alone, and module B must route uncertain medical-style recommendations to an authorized human instead of issuing final decisions. Which two-part solution is appropriate?
- First component: Keep user tasks in the user message. Second component: Limit retained context to authorized history.
- First component: Separate model reasoning from authoritative calculations. Second component: Design an explicit escalation path.
- First component: Limit retained context to authorized history. Second component: Design an explicit escalation path.
- First component: Separate model reasoning from authoritative calculations. Second component: Keep user tasks in the user message.
Explanation
Correct Answer
B:The first proposal fits its assigned role because deterministic services can enforce exact formulas and rounding before the model explains the result, while the second proposal fits its assigned role because risk-based thresholds separate assistance from decisions reserved for accountable staff; their respective acceptance criteria are to compute discounts through verified business code rather than generated arithmetic alone and to route uncertain medical-style recommendations to an authorized human instead of issuing final decisions.
Incorrect Answers
A:The first proposal serves the different purpose to separate an end user's request from the developer's stable operating instructions instead of the assigned first role because explicit message roles distinguish requested work from higher-priority operational framing, while the second proposal serves the different purpose to prevent a new user from inheriting another user's document excerpts instead of the assigned second role because context assembly must apply access checks before adding prior turns or retrieved evidence; their respective acceptance criteria are to compute discounts through verified business code rather than generated arithmetic alone and to route uncertain medical-style recommendations to an authorized human instead of issuing final decisions.
C:The first proposal serves the different purpose to prevent a new user from inheriting another user's document excerpts instead of the assigned first role because context assembly must apply access checks before adding prior turns or retrieved evidence, while the second proposal fits its assigned role because risk-based thresholds separate assistance from decisions reserved for accountable staff; their respective acceptance criteria are to compute discounts through verified business code rather than generated arithmetic alone and to route uncertain medical-style recommendations to an authorized human instead of issuing final decisions.
D:The first proposal fits its assigned role because deterministic services can enforce exact formulas and rounding before the model explains the result, while the second proposal serves the different purpose to separate an end user's request from the developer's stable operating instructions instead of the assigned second role because explicit message roles distinguish requested work from higher-priority operational framing; their respective acceptance criteria are to compute discounts through verified business code rather than generated arithmetic alone and to route uncertain medical-style recommendations to an authorized human instead of issuing final decisions.
Question 242
A developer is reviewing alternatives for a source-control workflow feature that must share coding conventions with every collaborator entering the same repository. Which option is a defensible fit?
- Use a pre-execution hook for deterministic checks
- Use headless invocation for automation
- Use a project-level CLAUDE.md file
- Define a custom slash command workflow
Explanation
Correct Answer
C:A checked-in memory file supplies persistent project context across relevant coding sessions; this behavior directly supports the need to share coding conventions with every collaborator entering the same repository. A personal user-level instruction file does not automatically impose a shared team standard.
Incorrect Answers
A:When an application needs to block edits to a protected deployment file before a tool writes them, tool lifecycle hooks enforce programmable validation at defined execution points; the current capability must instead share coding conventions with every collaborator entering the same repository, while post-hoc code review cannot prevent the initial unauthorized edit.
B:Noninteractive execution lets scripts integrate agent work into existing pipelines with controlled formats; the supported outcome is to run Claude Code inside a CI job and capture its output without interactive prompts, whereas this scenario requires the ability to share coding conventions with every collaborator entering the same repository; treating interactive terminal output as a stable machine interface is fragile.
D:Command-based workflows supply repeatable user-invoked instructions and arguments; despite being useful when a service must provide a consistent shortcut for a common repository maintenance task, it is not a solution to share coding conventions with every collaborator entering the same repository; a command does not on its own grant additional operating-system permissions.
Question 243
An output validation group is preparing a production change intended to avoid invented contract dates when the uploaded document lacks them. Which technique matches that intent?
- Constrain response audience and purpose
- Specify the handling of missing information
- State one measurable outcome per instruction
- Separate system policy from user content
Explanation
Correct Answer
B:An explicit unknown or null rule makes uncertainty visible in the requested output; this behavior directly supports the need to avoid invented contract dates when the uploaded document lacks them. A strict field list is not permission to fabricate absent values.
Incorrect Answers
A:Audience constraints determine useful terminology, specificity, and level of detail; despite being useful when a service must generate a technical incident summary suitable for an on-call engineer instead of an executive, it is not a solution to avoid invented contract dates when the uploaded document lacks them; style guidance alone cannot make inaccurate facts true.
C:Clear task goals and acceptance criteria reduce competing interpretations; this applies to the different goal to stop a summarizer from producing unrelated analysis instead of required action items, not the requirement to avoid invented contract dates when the uploaded document lacks them; a vague request for a good summary provides no testable target.
D:When an application needs to prevent a customer message from overriding the application's escalation rules, stable higher-priority instructions should be represented in the designated instruction channel; the current capability must instead avoid invented contract dates when the uploaded document lacks them, while user text is the task data, not a privileged configuration surface.
Question 244
During a production API rollout, two different failure paths need remediation. The first component must send extracted contract fields into a database that rejects unexpected shapes; separately, the second must reject a numeric quote that is syntactically valid but outside the permitted range. Which changes should be adopted?
- First component: Build a typed output envelope. Second component: Validate semantic business constraints after parsing.
- First component: Build a typed output envelope. Second component: Treat retrieval results as untrusted data.
- First component: Treat retrieval results as untrusted data. Second component: Deduplicate application events.
- First component: Deduplicate application events. Second component: Validate semantic business constraints after parsing.
Explanation
Correct Answer
A:The first proposal fits its assigned role because an explicit schema with required fields, types, and allowed values makes integration errors detectable, while the second proposal fits its assigned role because application logic must enforce business rules even after schema-valid output is produced; their respective acceptance criteria are to send extracted contract fields into a database that rejects unexpected shapes and to reject a numeric quote that is syntactically valid but outside the permitted range.
Incorrect Answers
B:The first proposal fits its assigned role because an explicit schema with required fields, types, and allowed values makes integration errors detectable, while the second proposal serves the different purpose to prevent a malicious help article from ordering the model to reveal secrets instead of the assigned second role because retrieved content should be framed as evidence, never upgraded to new tool or system authority; their respective acceptance criteria are to send extracted contract fields into a database that rejects unexpected shapes and to reject a numeric quote that is syntactically valid but outside the permitted range.
C:The first proposal serves the different purpose to prevent a malicious help article from ordering the model to reveal secrets instead of the assigned first role because retrieved content should be framed as evidence, never upgraded to new tool or system authority, while the second proposal serves the different purpose to avoid starting two extraction jobs for the same uploaded document after repeated browser submissions instead of the assigned second role because an idempotent job key lets the server recognize duplicates at its request boundary; their respective acceptance criteria are to send extracted contract fields into a database that rejects unexpected shapes and to reject a numeric quote that is syntactically valid but outside the permitted range.
D:The first proposal serves the different purpose to avoid starting two extraction jobs for the same uploaded document after repeated browser submissions instead of the assigned first role because an idempotent job key lets the server recognize duplicates at its request boundary, while the second proposal fits its assigned role because application logic must enforce business rules even after schema-valid output is produced; their respective acceptance criteria are to send extracted contract fields into a database that rejects unexpected shapes and to reject a numeric quote that is syntactically valid but outside the permitted range.
Question 245
During acceptance testing for a prompt engineering service, one requirement is to detect plausible dates or amounts that are absent from the provided document. What should the developer implement?
- Escape generated content in the UI
- Validate semantic business invariants
- Check evidence alignment after extraction
- Keep raw and normalized values distinct
Explanation
Correct Answer
C:Semantic verification compares fields to authoritative source spans; this behavior directly supports the need to detect plausible dates or amounts that are absent from the provided document. A high-confidence generated value is not proof that it was present.
Incorrect Answers
A:Output encoding or sanitization protects display contexts from untrusted markup; this applies to the different goal to show model-produced HTML snippets without allowing browser script injection, not the requirement to detect plausible dates or amounts that are absent from the provided document; a correct JSON wrapper does not make embedded HTML safe.
B:When an application needs to prevent a negative invoice total from reaching a payment ledger, domain rules check value ranges and cross-field relationships beyond syntactic shape; the current capability must instead detect plausible dates or amounts that are absent from the provided document, while schema type correctness cannot prove a transaction is permitted.
D:This approach serves the separate need to preserve auditability when an extractor reformats a date or currency because storing the original evidence and validated normalized value supports later reconciliation; it does not establish the outcome to detect plausible dates or amounts that are absent from the provided document, and overwriting the raw source eliminates a useful verification trail.
Question 246
A retrieval pipeline review requires two independent, explicitly defined outcomes: the first workstream must obtain named fields in a consistent response layout for subsequent processing; a second must prevent a customer message from overriding the application's escalation rules. Which TWO actions directly provide these capabilities? Choose TWO.
- Separate system policy from user content
- Specify output format in the prompt
- Specify the handling of missing information
- Delimit untrusted source material
- Use explicit refusal and escalation instructions
Explanation
Correct Answers
A:Stable higher-priority instructions should be represented in the designated instruction channel; this directly supports task 2 to prevent a customer message from overriding the application's escalation rules, not the separate task or tasks to obtain named fields in a consistent response layout for subsequent processing; user text is the task data, not a privileged configuration surface.
B:Explicit field descriptions guide generation toward the consumer's expected structure; this directly supports task 1 to obtain named fields in a consistent response layout for subsequent processing, not the separate task or tasks to prevent a customer message from overriding the application's escalation rules; formatting guidance still requires machine validation at the boundary.
Incorrect Answers
C:An explicit unknown or null rule makes uncertainty visible in the requested output; this implements the different outcome to avoid invented contract dates when the uploaded document lacks them rather than the required tasks to obtain named fields in a consistent response layout for subsequent processing and to prevent a customer message from overriding the application's escalation rules, and a strict field list is not permission to fabricate absent values, so it is not a direct solution to any of the assigned workstreams.
D:Clear source boundaries and explicit treatment as quoted evidence help reduce instruction confusion; this implements the different outcome to let the model summarize a hostile email without obeying its embedded commands rather than the required tasks to obtain named fields in a consistent response layout for subsequent processing and to prevent a customer message from overriding the application's escalation rules, and delimiters alone cannot replace permission checks on dangerous tools, so it is not a direct solution to any of the assigned workstreams.
E:Clear boundaries describe when to abstain or route to a qualified person; this implements the different outcome to prevent a customer-facing assistant from making final legal determinations without review rather than the required tasks to obtain named fields in a consistent response layout for subsequent processing and to prevent a customer message from overriding the application's escalation rules, and text instructions require supporting application enforcement for high-risk decisions, so it is not a direct solution to any of the assigned workstreams.
Question 247
An MCP interoperability team owns two independent components. The first must prevent a valid MCP client from reading another tenant's resources; the second must prevent a server update from returning incompatible payloads to clients. Which paired plan fulfills both?
- First component: Expose an MCP tool for an external action. Second component: Use a remote HTTP transport for shared MCP access.
- First component: Expose an MCP prompt template. Second component: Expose an MCP tool for an external action.
- First component: Apply authorization inside the MCP server. Second component: Validate MCP tool schemas and results.
- First component: Use a remote HTTP transport for shared MCP access. Second component: Validate MCP tool schemas and results.
- First component: Apply authorization inside the MCP server. Second component: Expose an MCP tool for an external action.
Explanation
Correct Answer
C:The first proposal fits its assigned role because the server must enforce caller identity and resource scope on each operation, while the second proposal fits its assigned role because contract tests check declared capabilities, argument shapes, and expected response content; their respective acceptance criteria are to prevent a valid MCP client from reading another tenant's resources and to prevent a server update from returning incompatible payloads to clients.
Incorrect Answers
A:The first proposal serves the different purpose to let multiple compatible clients request a controlled shipment lookup instead of the assigned first role because MCP tools advertise callable operations with named parameters and schemas across client integrations, while the second proposal serves the different purpose to serve approved tools to multiple distributed client environments instead of the assigned second role because an HTTP-based endpoint supports remotely hosted servers with authentication and network controls; their respective acceptance criteria are to prevent a valid MCP client from reading another tenant's resources and to prevent a server update from returning incompatible payloads to clients.
B:The first proposal serves the different purpose to share a repeatable analyst workflow across supported clients instead of the assigned first role because prompts describe reusable message templates or workflows offered by the server, while the second proposal serves the different purpose to let multiple compatible clients request a controlled shipment lookup instead of the assigned second role because MCP tools advertise callable operations with named parameters and schemas across client integrations; their respective acceptance criteria are to prevent a valid MCP client from reading another tenant's resources and to prevent a server update from returning incompatible payloads to clients.
D:The first proposal serves the different purpose to serve approved tools to multiple distributed client environments instead of the assigned first role because an HTTP-based endpoint supports remotely hosted servers with authentication and network controls, while the second proposal fits its assigned role because contract tests check declared capabilities, argument shapes, and expected response content; their respective acceptance criteria are to prevent a valid MCP client from reading another tenant's resources and to prevent a server update from returning incompatible payloads to clients.
E:The first proposal fits its assigned role because the server must enforce caller identity and resource scope on each operation, while the second proposal serves the different purpose to let multiple compatible clients request a controlled shipment lookup instead of the assigned second role because MCP tools advertise callable operations with named parameters and schemas across client integrations; their respective acceptance criteria are to prevent a valid MCP client from reading another tenant's resources and to prevent a server update from returning incompatible payloads to clients.
Question 248
During acceptance testing for a tool integration service, one requirement is to call a protected internal pricing API under the application's own credentials. What should the developer implement?
- Use system or repository instructions for stable behavior
- Publish an MCP server for reusable integrations
- Create a custom client-side tool
- Use a deterministic workflow for fixed stages
Explanation
Correct Answer
C:Local execution gives the developer direct control over authentication, validation, and side effects; this behavior directly supports the need to call a protected internal pricing API under the application's own credentials. A hosted generic search feature cannot access private endpoints automatically.
Incorrect Answers
A:When an application needs to make a coding or API assistant follow organization-wide conventions, instructions shape model behavior and task framing without executing external operations; the current capability must instead call a protected internal pricing API under the application's own credentials, while descriptive rules do not replace programmatic validation or IAM.
B:MCP standardizes tool and resource discovery across compatible applications; the supported outcome is to make one internal ticketing connector available to several agent clients, whereas this scenario requires the ability to call a protected internal pricing API under the application's own credentials; duplicated per-client wrappers increase maintenance across a growing ecosystem.
D:Explicit application control makes each transition testable and easier to audit; despite being useful when a service must automate the same classify-review-export path across predictable submissions, it is not a solution to call a protected internal pricing API under the application's own credentials; an autonomous agent is unnecessary when the path is already fixed.
Question 249
A workflow automation build contains an upstream function and a separate downstream function. The upstream work must serve many tenants without mixing their tool outputs or prior messages; the downstream work must retain complete control over a small set of proprietary tool calls and their execution order. Which configuration pair covers both?
- First component: Return a structured tool error to the model. Second component: Use the Claude Agent SDK for an integrated tool-driven agent.
- First component: Keep user-specific state out of a shared agent process. Second component: Implement a custom Messages API tool loop.
- First component: Deploy agent workers close to controlled data sources. Second component: Implement a custom Messages API tool loop.
- First component: Keep user-specific state out of a shared agent process. Second component: Use the Claude Agent SDK for an integrated tool-driven agent.
- First component: Use the Claude Agent SDK for an integrated tool-driven agent. Second component: Deploy agent workers close to controlled data sources.
Explanation
Correct Answer
B:The first proposal fits its assigned role because per-request identity and session boundaries prevent cross-tenant context leakage, while the second proposal fits its assigned role because the application receives tool requests, validates inputs, executes authorized functions, and sends tool results back; their respective acceptance criteria are to serve many tenants without mixing their tool outputs or prior messages and to retain complete control over a small set of proprietary tool calls and their execution order.
Incorrect Answers
A:The first proposal serves the different purpose to recover from a failed search while preserving the agent's chance to choose another path instead of the assigned first role because tool-result errors surface the failure without impersonating a successful action, while the second proposal serves the different purpose to build a coding agent that needs managed tool execution, sessions, and event handling instead of the assigned second role because the SDK provides agent-loop primitives and integrations that remove much of the custom harness work; their respective acceptance criteria are to serve many tenants without mixing their tool outputs or prior messages and to retain complete control over a small set of proprietary tool calls and their execution order.
C:The first proposal serves the different purpose to meet a requirement that proprietary repository contents remain within an approved execution environment instead of the assigned first role because a self-hosted harness can enforce infrastructure, network, and retention controls for the surrounding tools, while the second proposal fits its assigned role because the application receives tool requests, validates inputs, executes authorized functions, and sends tool results back; their respective acceptance criteria are to serve many tenants without mixing their tool outputs or prior messages and to retain complete control over a small set of proprietary tool calls and their execution order.
D:The first proposal fits its assigned role because per-request identity and session boundaries prevent cross-tenant context leakage, while the second proposal serves the different purpose to build a coding agent that needs managed tool execution, sessions, and event handling instead of the assigned second role because the SDK provides agent-loop primitives and integrations that remove much of the custom harness work; their respective acceptance criteria are to serve many tenants without mixing their tool outputs or prior messages and to retain complete control over a small set of proprietary tool calls and their execution order.
E:The first proposal serves the different purpose to build a coding agent that needs managed tool execution, sessions, and event handling instead of the assigned first role because the SDK provides agent-loop primitives and integrations that remove much of the custom harness work, while the second proposal serves the different purpose to meet a requirement that proprietary repository contents remain within an approved execution environment instead of the assigned second role because a self-hosted harness can enforce infrastructure, network, and retention controls for the surrounding tools; their respective acceptance criteria are to serve many tenants without mixing their tool outputs or prior messages and to retain complete control over a small set of proprietary tool calls and their execution order.
Question 250
During an incident investigation rollout, two different failure paths need remediation. The first component must fix an agent loop that repeatedly requests the same lookup without using the returned data; separately, the second must diagnose a generated summary that contradicts the latest database balance. Which changes should be adopted?
- First component: Trace a missing tool_result. Second component: Validate data before blaming model quality.
- First component: Diagnose a 5xx provider error. Second component: Validate data before blaming model quality.
- First component: Investigate a 400 invalid_request error. Second component: Diagnose a 5xx provider error.
- First component: Trace a missing tool_result. Second component: Investigate a 400 invalid_request error.
Explanation
Correct Answer
A:The first proposal fits its assigned role because inspecting message history and tool IDs reveals whether execution output reached the next model turn, while the second proposal fits its assigned role because source payloads, retrieval filters, and timestamps must be checked before attributing a wrong answer to inference; their respective acceptance criteria are to fix an agent loop that repeatedly requests the same lookup without using the returned data and to diagnose a generated summary that contradicts the latest database balance.
Incorrect Answers
B:The first proposal serves the different purpose to keep a batch pipeline resilient when the upstream service briefly fails instead of the assigned first role because server-side failures may warrant bounded retries, jitter, and a fallback rather than request-shape changes, while the second proposal fits its assigned role because source payloads, retrieval filters, and timestamps must be checked before attributing a wrong answer to inference; their respective acceptance criteria are to fix an agent loop that repeatedly requests the same lookup without using the returned data and to diagnose a generated summary that contradicts the latest database balance.
C:The first proposal serves the different purpose to diagnose a request that fails consistently before generating any model output instead of the assigned first role because validation failures point to malformed inputs or unsupported parameters that must be corrected, while the second proposal serves the different purpose to keep a batch pipeline resilient when the upstream service briefly fails instead of the assigned second role because server-side failures may warrant bounded retries, jitter, and a fallback rather than request-shape changes; their respective acceptance criteria are to fix an agent loop that repeatedly requests the same lookup without using the returned data and to diagnose a generated summary that contradicts the latest database balance.
D:The first proposal fits its assigned role because inspecting message history and tool IDs reveals whether execution output reached the next model turn, while the second proposal serves the different purpose to diagnose a request that fails consistently before generating any model output instead of the assigned second role because validation failures point to malformed inputs or unsupported parameters that must be corrected; their respective acceptance criteria are to fix an agent loop that repeatedly requests the same lookup without using the returned data and to diagnose a generated summary that contradicts the latest database balance.