Question 230
A procurement UI displays a proposed purchase order awaiting final approval. How should the implementation handle this need?
- Clearly distinguish a draft from a committed action
- Separate display text from operational commands
- Expose a safe retry action after transient faults
- Provide an escalation channel for uncertain outcomes
Explanation
Correct Answer
A:Labels and separate commit controls prevent users from assuming a draft has been submitted; model-generated wording should not make a simulated operation appear executed.
Incorrect Answers
B:The service distinguishes a human-readable recommendation from an authorized tool action, whereas the requirement calls for another behavior: labels and separate commit controls prevent users from assuming a draft has been submitted; parsing ordinary prose to infer permission for a write is unsafe.
C:The UI can offer a bounded retry with clear status rather than silently losing the task; however, the critical mechanism here is that labels and separate commit controls prevent users from assuming a draft has been submitted, and the backend must still prevent duplicated side effects when retrying.
D:Escalation transfers context to an authorized person instead of fabricating a final decision; the requirement instead turns on this behavior: labels and separate commit controls prevent users from assuming a draft has been submitted; human review must be a real operational path, not only a sentence in a prompt.
Question 231
The knowledge assistant keeps quoting a policy that was replaced yesterday. Which choice should be used here?
- Retrieve only topically relevant passages
- Refresh an index when content changes
- Use an event-driven trigger for external updates
- Preserve source references alongside snippets
Explanation
Correct Answer
B:A freshness pipeline updates search representations and source versions when documents change, subject to this requirement: more prompt instructions cannot correct an out-of-date underlying index.
Incorrect Answers
A:Search or retrieval supplies a bounded evidence set instead of the entire collection; in contrast, a freshness pipeline updates search representations and source versions when documents change, while sending all documents raises cost, noise, and exposure without improving source precision.
C:Event handlers initiate the approved model workflow on a real business change; here, the controlling capability is that a freshness pipeline updates search representations and source versions when documents change, but polling or repeated user prompts are unnecessary when a reliable event is available.
D:Provenance metadata allows citations and later source checks for each retrieved excerpt; the missing capability is more specific: a freshness pipeline updates search representations and source versions when documents change; a plausible paragraph with no reference cannot be independently traced.
Question 232
An application seeks permission to read a user's mailbox through an external integration. Which choice should be used here?
- Audit approval decisions for high-impact actions
- Check end-user permissions before using a customer tool
- Use separate credentials for development and production
- Require consent for delegated third-party scopes
Explanation
Correct Answer
D:A proper authorization and consent flow limits the scopes granted to the integration; model-generated text cannot silently supply the user's valid consent.
Incorrect Answers
A:A durable record captures the approver, scope, timestamp, and action approved; here, the controlling capability is that a proper authorization and consent flow limits the scopes granted to the integration, but an assistant's paraphrase of approval is not equivalent to an auditable authorization event.
B:The backend verifies the caller is allowed to access that specific object; the missing capability is more specific: a proper authorization and consent flow limits the scopes granted to the integration; a valid session establishes identity but not ownership of every possible resource.
C:Environment isolation makes accidental or compromised test execution less damaging; by comparison, the intended solution relies on this: a proper authorization and consent flow limits the scopes granted to the integration; a single unrestricted key creates unnecessary blast radius across environments.
Question 233
Hundreds of calls reuse the same large reference instructions before different user questions. How should this requirement be met?
- Use batch processing for noninteractive volume
- Estimate token usage with supported token counting
- Cache a reusable prompt prefix
- Select a smaller sufficient model
Explanation
Correct Answer
C:Eligible prompt caching can avoid repeatedly processing unchanged prefix tokens; cache savings require actual hits and depend on write/read prices.
Incorrect Answers
A:A batch interface is suited to many independent requests with no immediate response requirement; the missing capability is more specific: eligible prompt caching can avoid repeatedly processing unchanged prefix tokens; interactive users cannot depend on eventual batch completion.
B:Token counting estimates model tokens more accurately than character length or word count; by comparison, the intended solution relies on this: eligible prompt caching can avoid repeatedly processing unchanged prefix tokens; different formats and models may tokenize the same text differently.
D:Choosing the least expensive model that meets a measured accuracy floor can reduce recurring spending, whereas the requirement calls for another behavior: eligible prompt caching can avoid repeatedly processing unchanged prefix tokens; cheap but inaccurate outputs can produce costly downstream corrections.
Question 234
Intermittent network failures are expected but the user request must not wait indefinitely. Which of these alternatives serves the stated goal?
- Handle pause_turn as a resumable server operation
- Quarantine malformed output for review
- Use a retry budget for transient calls
- Apply safe fallback when retries exhaust
Explanation
Correct Answer
C:A bounded attempt count and deadline balance recovery against cost and responsiveness—with this limitation: endless retries can exhaust quotas and mask permanent faults.
Incorrect Answers
A:The client follows the documented continuation flow for that intermediate condition, whereas the requirement calls for another behavior: a bounded attempt count and deadline balance recovery against cost and responsiveness; a paused operation is not necessarily a finished user answer.
B:Failed artifacts are retained securely for diagnostics and excluded from the production write path; however, the critical mechanism here is that a bounded attempt count and deadline balance recovery against cost and responsiveness, and automatically coercing unknown fields risks corrupting downstream ledgers.
D:Returning a clear incomplete status or known safe alternative avoids false success claims; this cannot substitute for the behavior that a bounded attempt count and deadline balance recovery against cost and responsiveness, because inventing an answer to preserve a green status is operationally misleading.
Question 235
A CRM integration requires a customer category selected from a defined enumeration and a numeric confidence field. How should the implementation handle this need?
- Use a validated typed response contract
- Instrument output schema failure rate
- Separate display text from operational commands
- Map model fields to application fields explicitly
Explanation
Correct Answer
A:Typed output constraints and independent schema validation keep data machine consumable; the important constraint is that type validity does not prove the chosen category reflects the actual evidence.
Incorrect Answers
B:Tracking validation failures isolates content contract problems from transport availability; the requirement instead turns on this behavior: typed output constraints and independent schema validation keep data machine consumable; HTTP success is not equivalent to a valid business payload.
C:The service distinguishes a human-readable recommendation from an authorized tool action; this cannot substitute for the behavior that typed output constraints and independent schema validation keep data machine consumable, because parsing ordinary prose to infer permission for a write is unsafe.
D:An adapter transforms and validates values at the boundary rather than assuming identical schemas; in contrast, typed output constraints and independent schema validation keep data machine consumable, while directly sending raw model content to a write endpoint creates avoidable coupling.
Question 236
An answer contains accurate-sounding citations that may not match the referenced documents. Which of these alternatives serves the stated goal?
- Show structured refusals or errors faithfully
- Escape text before inserting into HTML
- Use parameterized queries for user values
- Separate citations from generated claims
Explanation
Correct Answer
D:The application verifies source mapping and clearly displays provenance when available; a crucial qualification is that formatting fake-looking references beautifully does not provide evidence.
Incorrect Answers
A:The client handles refusal or error states without fabricating a completed action; in contrast, the application verifies source mapping and clearly displays provenance when available, while hiding these states may incorrectly imply the backend executed something.
B:Output encoding ensures untrusted characters display as text rather than executable DOM content; this addresses a separate concern, not the fact that the application verifies source mapping and clearly displays provenance when available; JSON validation is not a browser security measure.
C:Parameters keep values separate from SQL structure and prevent injection from changing the query grammar; here, the controlling capability is that the application verifies source mapping and clearly displays provenance when available, but escaping output for HTML would not prevent SQL injection.
Question 237
Production logs may point to unknown failure sources that require choosing diagnostic queries dynamically. What is the right implementation response?
- Use a model-directed agent loop
- Prefer a hybrid workflow-agent design
- Prefer an agent for exploratory diagnostics
- Prefer a static lookup and rule table
Explanation
Correct Answer
C:An agent observes evidence and selects the next tool based on new findings, subject to this requirement: it still requires restricted read-only tools and a bounded investigation scope.
Incorrect Answers
A:Claude selects an action after observing each result, with the application enforcing iteration and permission limits; this cannot substitute for the behavior that an agent observes evidence and selects the next tool based on new findings, because the autonomy adds variability and demands hard budgets, logs, and a stopping policy.
B:Code preserves mandatory outer checkpoints while an agent explores only within an approved segment; in contrast, an agent observes evidence and selects the next tool based on new findings, while failure to isolate the exploratory stage could let it bypass the required controls.
D:A rule engine evaluates the defined cases predictably and yields transparent reasons; here, the controlling capability is that an agent observes evidence and selects the next tool based on new findings, but a language model would introduce avoidable nondeterminism into a deterministic policy.
Question 238
A search result contains attacker-controlled notes that may try to steer the agent into another operation. Which implementation mechanism is needed?
- Include stable identifiers in tool results
- Limit untrusted text in tool outputs
- Return only the fields necessary for a decision
- Validate and execute the tool outside the model
Explanation
Correct Answer
B:Treating tool output as low-trust evidence and trimming unnecessary text reduces injection surfaces, although a tool result is not an application-level system command.
Incorrect Answers
A:IDs let downstream operations refer unambiguously to retrieved business objects; the needed capability is different—treating tool output as low-trust evidence and trimming unnecessary text reduces injection surfaces—and human-readable names alone may collide across tenants or records.
C:Structured filtering reduces context load and unnecessary data disclosure; however, the critical mechanism here is that treating tool output as low-trust evidence and trimming unnecessary text reduces injection surfaces, and the model should not receive personal or unrelated fields merely because they exist upstream.
D:Application code enforces permission checks and performs the actual side effect or read; the requirement instead turns on this behavior: treating tool output as low-trust evidence and trimming unnecessary text reduces injection surfaces; the presence of tool_use content is not evidence the backend was queried.
Question 239
A frontend receives tiny text deltas faster than its expensive DOM updates can render smoothly. Which response is most defensible under these conditions?
- Apply UI rendering backpressure
- Associate deltas with their content block indices
- Use a raw HTTPS REST client when necessary
- Parse SSE frames at event boundaries
Explanation
Correct Answer
A:Batching display updates preserves order while reducing unnecessary layout work—with this limitation: excessive rendering frequency can cause jank even when API streaming is fast.
Incorrect Answers
B:Block-index tracking assembles each text or tool input stream correctly; this cannot substitute for the behavior that batching display updates preserves order while reducing unnecessary layout work, because appending every delta to a single string can mix text with tool parameters.
C:Direct REST requests can call the same documented endpoint with correct headers and body; in contrast, batching display updates preserves order while reducing unnecessary layout work, while the developer must implement encoding, retries, and response parsing independently.
D:A buffered parser reconstructs complete event frames before decoding their data; this addresses a separate concern, not the fact that batching display updates preserves order while reducing unnecessary layout work; treating every TCP chunk as one whole JSON object will fail unpredictably.
Question 240
A customer assistant needs to look up an order through a controlled function rather than describe a made-up query. What is the correct engineering decision?
- Use an explicit tool definition for callable business actions
- Use a user content block for the actual request
- Use CLAUDE.md for repository guidance in Claude Code
- Use a dedicated tool adapter for private systems
Explanation
Correct Answer
A:Tool schemas advertise an available operation and define its structured inputs; a prose instruction mentioning a function does not register it with the API.
Incorrect Answers
B:A user message carries the current request as task data subordinate to the system rules, whereas the requirement calls for another behavior: tool schemas advertise an available operation and define its structured inputs; treating customer input as a new system instruction would invert the intended trust hierarchy.
C:Repository instruction files provide persistent project context to the Claude Code environment; however, the critical mechanism here is that tool schemas advertise an available operation and define its structured inputs, and they are not automatically loaded into unrelated Messages API clients.
D:An adapter exposes narrowly typed operations and translates requests into the legacy interface; the requirement instead turns on this behavior: tool schemas advertise an available operation and define its structured inputs; the model does not acquire direct private-network access by seeing the system's name.