Question 490
A document-processing agent invokes external services while extracting invoice fields. A tool schema requires a numeric invoice total but Claude supplies a string. Which response is most reliable?
- Validate tool output against the expected result contract before reasoning
- Track pending work in durable application state until the actual result arrives
- Apply a retry cap and bounded backoff outside the model
- Gate the payment tool behind authorization and confirmation before execution
- Validate tool-call inputs against the declared argument schema
Explanation
Correct Answer
E:Schema checking at the host boundary prevents type errors and unsafe side effects from malformed model-generated arguments.
Incorrect Answers
A:This choice is relevant when the OCR service sometimes returns an empty string rather than recognized text; an empty result may reflect OCR failure, not an intentionally blank invoice field; validation stops it being promoted to fact. Here, however, a tool schema requires a numeric invoice total but Claude supplies a string.
B:For the separate situation where tool execution takes several minutes, but the model has already emitted the request, a long-running call must not be represented as success before completion, especially where later steps depend on its output; the current task is to reject invalid tool arguments before invoking the service.
C:An application-owned retry policy prevents infinite loops and makes downstream reliability predictable under outages; the benefit is tied to an extraction workflow repeats one expensive tool call after a transient error. It is not the immediate control for the need to reject invalid tool arguments before invoking the service.
D:Prompt wording alone is not a reliable transaction guard; the execution layer must verify that the action is approved; it is a safeguard for a payment API can create a real charge, but model responses may be replayed, not the specific situation described: a tool schema requires a numeric invoice total but Claude supplies a string.
Question 491
A review agent must obey application-level guarantees under adversarial prompts. A tool operation must obey a daily account limit. What should the team do to resolve this particular gap?
- Check a central rate or quota counter at execution time
- Validate target identifier and cardinality in tool arguments before execution
- Persist the rejection and close the pending mutation authorization
- Apply a confirmation checkpoint enforced by the host workflow
Explanation
Correct Answer
A:Per-prompt reminders cannot coordinate usage across multiple agents; an authoritative service counter can enforce shared limits.
Incorrect Answers
B:Target and batch-size validation blocks unintended bulk changes even when a model builds syntactically valid arguments; it is a safeguard for a tool can modify thousands of records although the task requires one record, not the specific situation described: a tool operation must obey a daily account limit.
C:For the separate situation where a human reviewer rejects a proposed account adjustment, a durable rejection should invalidate the action token; otherwise a replayed model output might still reach the mutation endpoint; the current task is to enforce aggregate quota across sessions.
D:A required approval checkpoint converts a human-control requirement into execution logic, rather than merely advising the model to ask first; the benefit is tied to a user requests deletion, but the policy requires independent confirmation. It is not the immediate control for the need to enforce aggregate quota across sessions.
Question 492
A customer-service assistant may hand tasks to billing, returns, and policy specialists. An escalation specialist is assigned a case that has already been resolved. Which control is most directly relevant?
- Configure only the needed read-only policy tools for that specialist
- Make identity verification an explicit prerequisite in the coordinator workflow
- Check the current case state and ownership before starting an escalated job
- Pass narrowly scoped task context and redact irrelevant customer information
Explanation
Correct Answer
C:State validation at handoff keeps asynchronous specialists from acting on superseded requests or producing redundant outcomes.
Incorrect Answers
A:Least-privilege tool access prevents a policy task from accidentally or maliciously exercising financial operations; it is a safeguard for a policy specialist can answer without any payment-system access, not the specific situation described: an escalation specialist is assigned a case that has already been resolved.
B:For the separate situation where a returns worker needs a decision made by the identity-verification worker, a worker should not process a customer-specific return against an unverified identity; graph ordering enforces the prerequisite; the current task is to avoid stale duplicate work after reassignment.
D:This choice is relevant when each specialist should see only the customer details it needs; a smaller context packet reduces leakage and helps a specialist focus on the authorized decision instead of broad account history. Here, however, an escalation specialist is assigned a case that has already been resolved.
Question 493
A developer asks Claude Code to implement a new serialization routine. A developer wants to know why the proposed algorithm is acceptable. How should the workflow be adjusted?
- Add unseen edge cases and regression checks
- Inspect complexity assumptions and test evidence against acceptance criteria
- Use the failing test output to make a targeted correction
- Ask for representative input/output pairs and edge cases
Explanation
Correct Answer
B:A concise rationale should be backed by measured or inspectable behavior, not by the model's own confidence. For the stated case, the check is whether the system can require a verifiable explanation of trade-offs; this approach supplies that control.
Incorrect Answers
A:For the separate situation where a generated solution passes only the examples it was shown, overfitting to a few examples can hide incorrect general behavior; independent cases test whether the implementation is robust; the current task is to require a verifiable explanation of trade-offs.
C:Compilation checks syntax and types, not all behavior; a failing edge-case test provides precise evidence for improvement; it is a safeguard for Claude produces a patch that compiles but breaks a boundary case, not the specific situation described: a developer wants to know why the proposed algorithm is acceptable.
D:This choice is relevant when the exact expected encoding is ambiguous in the feature request; concrete examples expose ambiguity in the contract before implementation, reducing incorrect assumptions that tests might otherwise miss. Here, however, a developer wants to know why the proposed algorithm is acceptable.
Question 494
An MCP service encounters errors while fetching customer records. An invalid date format fails argument validation before tool execution. Which implementation decision is the best fit?
- Classify the issue as transient unavailable and provide a safe diagnostic identifier
- Return a structured validation error identifying the affected field
- Return a permission-denied outcome and require an authorized path
- Return a structured rate-limit error and retry-after guidance
Explanation
Correct Answer
B:A field-specific error supports a corrected retry, whereas generic failure text makes it hard to choose an appropriate next action.
Incorrect Answers
A:Clear error categorization lets orchestration retry selectively while keeping internal stack traces out of model-facing content; it is a safeguard for a database loses connectivity during a lookup, not the specific situation described: an invalid date format fails argument validation before tool execution.
C:For the separate situation where a tool call is rejected because the caller lacks access to the account, a permission error cannot be fixed by repeating the same call; it needs identity correction or escalation without leaking account details; the current task is to make invalid input distinguishable from server outages.
D:This choice is relevant when a backend returns HTTP 429 with a retry window; throttling is transient and should be handled with bounded delay, not treated as an absent customer record. Here, however, an invalid date format fails argument validation before tool execution.
Question 495
An AI team uses a generator and reviewer for compliance reports. A dispute remains after the independent reviewer raises a high-risk concern. What should the architect specify in the design?
- Report the claim, evidence gap, and suggested bounded repair
- Preserve both positions and send the evidence to a human approver
- Use an independent reviewer prompt or agent grounded in source evidence
- Keep review decisions in a distinct controlled stage or human gate
- Provide the reviewer the cited sources and a claim-verification rubric
Explanation
Correct Answer
B:Persistent disagreement is a signal for accountable judgment, not a reason to keep agents debating indefinitely. Here it serves the explicit need to escalate instead of forcing automated consensus without adding a separate unverified inference.
Incorrect Answers
A:For the separate situation where the reviewer identifies one unsupported paragraph among otherwise valid sections, targeted feedback lets the writer fix the failing span without regenerating a document that already passed most checks; the current task is to escalate instead of forcing automated consensus.
C:This choice is relevant when the writer evaluates its own output and overlooks repeated factual errors; a separate review role with explicit criteria can catch mistakes that a writer may repeat during unstructured self-review. Here, however, a dispute remains after the independent reviewer raises a high-risk concern.
D:An independent check loses value if the generator can overwrite or ignore a failed result without accountability; it is a safeguard for the writer is allowed to alter the reviewer verdict before publication, not the specific situation described: a dispute remains after the independent reviewer raises a high-risk concern.
E:Without reference evidence, the reviewer can only assess plausibility and may approve fabricated claims; the benefit is tied to the reviewer has no access to source documents and simply judges fluency. It is not the immediate control for the need to escalate instead of forcing automated consensus.
Question 496
A support team exposes several similar billing tools through an MCP server. A tool returns a large raw object although callers need just three fields. Which change most directly addresses this condition?
- Differentiate names, descriptions, required inputs, and result semantics by real capability
- Return a concise typed result with the required fields and stable meanings
- Describe the active-account limitation and expected error behavior in the tool contract
- Declare meaningful JSON Schema types, required fields, and relevant constraints
Explanation
Correct Answer
B:A narrow result format saves context and keeps downstream reasoning focused on validated data rather than incidental service metadata.
Incorrect Answers
A:For the separate situation where two tools have nearly identical names and descriptions despite different output formats, precise boundaries are more effective than extra prompt reminders when Claude must select between overlapping functions; the current task is to publish a focused output contract.
C:A precondition affects whether the model should choose the tool; hiding it leads to avoidable failures and misleading answers; it is a safeguard for an account lookup can handle only active accounts, which is absent from its description, not the specific situation described: a tool returns a large raw object although callers need just three fields.
D:Clear argument schemas improve generated calls and let the host reject malformed or missing identifiers before sensitive execution; the benefit is tied to a refund tool accepts order IDs but its schema describes an untyped free-form string. It is not the immediate control for the need to publish a focused output contract.
Question 497
A research pipeline asks Claude to emit machine-readable evidence records. A tool-call payload satisfies syntax but cites an unknown document ID. What is the most defensible next step?
- Use an enum for allowed verification statuses
- Check source IDs against the approved evidence registry after parsing
- Use a list of claim objects, each with its own source references and stance
- Define source_id and publication_date as required schema properties
Explanation
Correct Answer
B:JSON Schema checks shape and types, not whether a purported reference actually exists or supports the claim. For the stated case, the check is whether the system can validate reference integrity outside the schema; this approach supplies that control.
Incorrect Answers
A:Enumerated values make downstream control flow predictable and prevent speculative status text from being treated as a recognized gate; the benefit is tied to the model invents unrecognized status strings such as 'sort-of-verified'. It is not the immediate control for the need to validate reference integrity outside the schema.
C:For the separate situation where results need to preserve multiple contradictory claims from one source set, structured claim-level provenance prevents competing interpretations from being collapsed into one misleading free-text conclusion; the current task is to validate reference integrity outside the schema.
D:This choice is relevant when a citation must include both source ID and publication date; required fields expose missing citation metadata early instead of allowing evidence records that cannot later be traced. Here, however, a tool-call payload satisfies syntax but cites an unknown document ID.
Question 498
A support application selects tool-use policies for sensitive operations. An agent repeatedly chooses an obsolete lookup despite a new supported endpoint. Which approach satisfies the stated constraint?
- Set tool_choice to none on the request that should not dispatch a tool
- Update the tool registry and descriptions so only the current lookup is eligible
- Keep the refund capability unavailable or execution-blocked for this state
- Permit automatic tool selection within a safe allowlist
Explanation
Correct Answer
B:Retiring ambiguous or obsolete tools attacks the selection problem at its source instead of adding reminders to avoid the old one.
Incorrect Answers
A:The none mode prevents tool calls on that request even when tool definitions are present; later actions still need application-side authorization and controls; it is a safeguard for an audit-only response must not invoke any available tools while explaining a policy decision, not the specific situation described: an agent repeatedly chooses an obsolete lookup despite a new supported endpoint.
C:Tool choice is not the same as permission; the financial action must be gated on verified identity and policy; the benefit is tied to a tool can issue refunds but the current conversation has not passed identity verification. It is not the immediate control for the need to remove the superseded capability from discovery.
D:For the separate situation where a user asks an open-ended policy question that does not necessarily require a tool, over-forcing one retrieval tool can cause needless calls; controlled automatic choice suits variable informational needs; the current task is to remove the superseded capability from discovery.
Question 499
A codebase migration process must decide when to spawn specialists. Several workers share a mutable global configuration during analysis. Which mechanism should be selected?
- Run schema discovery before generating or applying migration steps
- Serialize updates or give workers isolated copies before concurrency
- Delegate each service to a scoped worker and compare results afterward
- Create smaller file- or component-scoped subtasks with explicit output summaries
Explanation
Correct Answer
B:Parallel actions that change the same state can race; independence must include write effects, not merely different prompts.
Incorrect Answers
A:A migration plan based on guessed schema can break data, so dependency evidence must be present first; the benefit is tied to a database migration depends on a schema inventory that does not yet exist. It is not the immediate control for the need to avoid unsafe shared-state parallelism.
C:This choice is relevant when two services have unrelated APIs and can be analyzed separately; independent boundaries permit concurrency without creating cross-service state conflicts. Here, however, several workers share a mutable global configuration during analysis.
D:For the separate situation where a large task repeatedly overwhelms a worker's context window, artifact-based partitions control context size while leaving traceable, mergeable findings; the current task is to avoid unsafe shared-state parallelism.
Question 500
Claude Code is exploring a large monorepo for a maintenance task. An authorized edit must replace a precisely identified line in a tracked file. What should be implemented at the appropriate boundary?
- Use a targeted content search with a bounded file scope
- Use an appropriate file-edit operation with a specific expected match
- Run the build or test using a controlled shell or task tool
- Use a file glob or filename discovery operation
- Use a file-read operation on the known path and relevant range
Explanation
Correct Answer
B:A focused edit is easier to review and verify than regenerating an entire file from model memory. The relevant requirement is to make a minimal targeted source change, and this measure operates at that decision point.
Incorrect Answers
A:Text search finds matching symbols inside files; filename discovery alone cannot identify call sites; the benefit is tied to an engineer needs every reference to a deprecated function in source text. It is not the immediate control for the need to make a minimal targeted source change.
C:For the separate situation where a scripted maintenance operation must compile the project and observe test output, only an actual process invocation establishes compiler and test behavior; inspection tools cannot substitute for execution; the current task is to make a minimal targeted source change.
D:This choice is relevant when an engineer knows a filename pattern but not its directory; glob-style search identifies paths by name pattern without reading or executing each file in the repository. Here, however, an authorized edit must replace a precisely identified line in a tracked file.
E:Direct reading preserves surrounding context when a file is already identified and avoids broad repository scans; it is a safeguard for the engineer knows the exact configuration file and needs to inspect one section, not the specific situation described: an authorized edit must replace a precisely identified line in a tracked file.