Question 150
A support system offers automatic escalation for low-confidence cases but no definition of what low confidence means. What design improvement helps?
- Specify the intended action and confirm authorization before choosing either operation
- Provide the case to a human approver with amount and policy evidence
- Define escalation signals based on evidence gaps and policy-critical uncertainty
- Mark the missing signature and request document correction or human review
Explanation
Correct Answer
C:Observable criteria are more actionable than a model's unsupported self-confidence score. Explicit missing fields and conflicting sources can trigger consistent review.
Incorrect Answers
A:Destructive and reversible operations are not interchangeable; that serves clarifying an ambiguous destructive request, whereas the case requires operationalizing uncertainty-based escalation.
B:Because threshold exceptions require explicit authority, the measure supports routing above-limit refunds to a human rather than the needed operationalizing uncertainty-based escalation.
D:Critical missing evidence cannot be filled from a language model's guess; supporting escalating missing legally required evidence cannot replace the required operationalizing uncertainty-based escalation.
Question 151
A downstream processor expects a list of line items but sometimes receives an object instead. What schema element enforces the desired shape?
- Maintain versions of the result contract and test consumers before deploying schema changes
- Identify nonstandard stop or refusal outcomes before treating content as a schema result
- Model line items as an array with a defined item object schema
- Check tenant authorization and business references against the system of record
- Streamline the schema to supported constructs and validate remaining rules in application code
Explanation
Correct Answer
C:The declared array type tells the consumer how to iterate through repeated records. A free-form response allows unexpected container shapes that break integration.
Incorrect Answers
A:Structured outputs create a stable interface that downstream systems depend upon; the stated problem requires constraining collection shape in extraction output rather than managing downstream compatibility of structured outputs.
B:Schema-oriented APIs may have special refusal or termination paths; a method suited to handling non-result terminations in structured workflows does not meet the need for constraining collection shape in extraction output.
D:JSON types and patterns cannot establish whether an identifier is authorized for the caller; that may serve validating authorization beyond JSON shape, but it is no substitute for constraining collection shape in extraction output.
E:Constrained decoding has a documented supported JSON Schema subset; this may support respecting structured-output schema limitations but cannot alone meet the requirement for constraining collection shape in extraction output.
Question 152
An action tool looks read-only in its name but sends an email to customers. Which metadata avoids hidden side effects?
- Differentiate the read-only lookup from the authorized state-changing operation
- Take a stable idempotency key for mutation requests
- Separate the overloaded interface into cohesive operations with narrow schemas
- State the mutation and external communication effect explicitly in the tool description
- Express the supported reason codes as a constrained enumeration
Explanation
Correct Answer
D:Callers need to distinguish observation from state change before choosing tools. A contract that hides the email side effect undermines authorization and approval design.
Incorrect Answers
A:Although tool metadata should expose whether a call merely inspects or mutates an order, the choice addresses clarifying read versus write tool intent and not the requested signaling irreversible tool side effects.
B:A client-provided operation identifier lets the service recognize repeat submissions and return the prior outcome; the deciding condition is signaling irreversible tool side effects, whereas this action concerns protecting a mutating tool against replay.
C:Smaller purpose-built tools make argument requirements and authorization easier to reason about; the option would serve reducing an overloaded tool schema, not signaling irreversible tool side effects as specified in the stem.
E:Enumerated fields constrain inputs to a documented business vocabulary and support deterministic validation; that relates to limiting parameters to valid business values, not the necessary signaling irreversible tool side effects.
Question 153
A company wants to review only failed extraction documents after a batch ends. How should it organize outputs?
- Store outcomes by input ID and create a retry queue from non-success statuses
- Send independent requests through the asynchronous Message Batches API
- Constrain batch result access and enforce the organization's data retention policy
- Eliminate streaming from batch requests and process completed result artifacts
Explanation
Correct Answer
A:Structured reconciliation lets teams preserve successful results and focus intervention on failures. Reprocessing all items would waste cost and may alter validated data.
Incorrect Answers
B:When addressing selecting asynchronous processing for independent bulk work, batch processing targets high-volume work without low-latency requirements and can reduce cost; the present task instead calls for constructing targeted post-batch retries.
C:Bulk result files can concentrate sensitive information; protecting sensitive bulk-processing results and constructing targeted post-batch retries require different controls in this situation.
D:Batch execution yields collected request outcomes rather than an interactive token stream; the unsatisfied requirement is constructing targeted post-batch retries, not using supported response delivery for batch processing.
Question 154
A developer knows an error string but not the file that contains it. Which search tool is a better first choice than reading random files?
- Use a scoped Edit with an exact matching target
- Adopt Glob to enumerate files matching the path pattern
- Open the indicated path and relevant region directly
- Use Grep to locate matching text across the repository
Explanation
Correct Answer
D:Grep searches contents and identifies files or lines containing a pattern. It answers a text-location question that a filename glob cannot resolve.
Incorrect Answers
A:A targeted replacement can preserve neighboring configuration content; the action supports making a minimal configuration edit but falls short of finding a phrase inside repository files in this case.
B:Glob resolves matching file paths by name or path shape; this can serve enumerating files by filename pattern, but leaves the requirement for finding a phrase inside repository files unmet.
C:A precise location is already supplied, so broad search adds noise and latency; that addresses avoiding unnecessary repository-wide discovery, whereas this case calls for finding a phrase inside repository files.
Question 155
A task retries after a network failure, but the failed branch might already have created a support ticket. What safeguard matters?
- Reconcile the external operation using an idempotency identifier before replay
- Record a partial workflow outcome and identify the unavailable branch explicitly
- Document the evidence gap and either retry safely or abstain from the unsupported claim
- Tell apart tool failure from a valid search with zero matches
Explanation
Correct Answer
A:Distributed errors may arrive after a side effect has occurred. State reconciliation prevents duplicate tickets when a previous acknowledgment was lost.
Incorrect Answers
B:Partial success is not whole-task success; supporting preserving partial-failure status across worker aggregation cannot replace the required preventing duplicate side effects in retrying workers.
C:Failed retrieval does not authorize fabricating authoritative state; this contributes to preventing fabricated facts after upstream errors without meeting the need for preventing duplicate side effects in retrying workers.
D:Infrastructure errors must propagate as errors, not negative evidence; that serves propagating search errors without treating them as no-match evidence, whereas the case requires preventing duplicate side effects in retrying workers.
Question 156
A model ignores the requested output structure after several inconsistent demonstrations. How should the prompt be repaired?
- Carry forward a small representative few-shot set and evaluate the trade-off empirically
- Make examples conform to a single documented schema and labeling convention
- Include an example that correctly returns an unknown or escalation category
- Monitor example-set versions and compare outcomes on a fixed test suite
- Embed a missing-field example using the schema's defined null behavior
Explanation
Correct Answer
B:Contradictory examples undermine explicit instructions. Consistent examples reinforce which fields and formats are mandatory.
Incorrect Answers
A:For controlling context cost from examples, large demonstrations consume context and tokens; however, this requirement concerns eliminating inconsistent example output formats.
C:Boundary examples teach that abstention is acceptable; this may support calibrating abstention with a boundary example but cannot alone meet the requirement for eliminating inconsistent example output formats.
D:Versioned few-shot experiments reveal the impact of changes; the stated problem requires eliminating inconsistent example output formats rather than measuring few-shot changes with controlled evaluations.
E:A deliberate absent-value demonstration discourages invented totals; a method suited to demonstrating missing-field semantics does not meet the need for eliminating inconsistent example output formats.
Question 157
A customer asks a follow-up about a refund discussed yesterday, but the agent has no stable case identifier. What should the session state contain?
- Store the verified case ID and current resolution status as durable fields
- Remove redundant narration while preserving user constraints and observed tool results
- Keep a concise referenced policy finding and its source version
- Persist claim-to-source mappings alongside the condensed findings
Explanation
Correct Answer
A:Stable identifiers and status survive conversational paraphrasing. A narrative summary alone may not reliably distinguish one customer case from another.
Incorrect Answers
B:Model-authored commentary has lower evidentiary value than original requirements and verified observations; this addresses prioritizing authoritative context over redundant narration, while the question is about preserving stable case identity across turns.
C:Cached validated findings reduce repetitive reads while retaining provenance; that relates to avoiding repeated retrieval of unchanged evidence, not the necessary preserving stable case identity across turns.
D:Although compression should preserve provenance links for verifiable conclusions, the choice addresses maintaining citations during context compression and not the requested preserving stable case identity across turns.
Question 158
A reviewer invents style violations when a PR has none. Which instruction change helps calibration?
- Document task scope, stopping conditions and prohibited side quests
- Label style complaints as blocking whenever the reviewer sounds confident, even without a cited defect
- Specify the exact fields, types and normalization rules required downstream
- State the defect categories and require a cited code location for every finding
Explanation
Correct Answer
D:Evidence-based criteria distinguish observed defects from speculative criticism. The prompt should permit an empty findings set when no qualifying issue is found.
Incorrect Answers
A:Bounded instructions tell the agent what enough evidence looks like; defining a stopping condition for research and preventing unsupported PR review findings require different controls in this situation.
B:Confidence is not proof a style violation exists. Requiring a named category and an actual code location is the control that reduces invented findings.
C:Explicit extraction targets guide attention to operationally meaningful values; in this scenario, defining bounded extraction fields is secondary to preventing unsupported PR review findings.
Question 159
Several hooks compete to rewrite the same output and cause inconsistent behavior. What governance practice helps?
- Define ordered responsibilities and nonconflicting hook contracts
- Use a PreToolUse hook that denies matching unsafe invocations
- Apply protected-path checks in a pre-tool permission handler
- Perform a PostToolUse handler after successful file-edit tools
Explanation
Correct Answer
A:Clear handler scope and explicit failure precedence prevent accidental interactions. Uncoordinated policy and formatting hooks can otherwise obscure final execution decisions.
Incorrect Answers
B:PreToolUse runs before a tool call and can participate in the decision to block it; this concerns blocking disallowed commands before tool execution, leaving the requirement for resolving conflicting lifecycle handlers outstanding.
C:A programmatic check can compare the requested path to restricted locations before access occurs; denying sensitive file reads before access and resolving conflicting lifecycle handlers are distinct responsibilities under these constraints.
D:A post-tool callback can inspect the completed edit and trigger formatting or verification in response; the action supports reacting to a completed editing tool but falls short of resolving conflicting lifecycle handlers in this case.
Question 160
One MCP service is shared across tenants, and a tool accepts a caller-provided tenant ID. What must the backend enforce?
- Derive or verify tenant authorization on the server for every tool request
- Examine and approve the project server before granting it access
- Confirm required environment variables are injected in the CI runtime
- Inspect a reviewed project .mcp.json definition into version control
Explanation
Correct Answer
A:User-supplied identifiers are untrusted inputs, not authorization. The MCP server must scope data access to the authenticated principal to prevent cross-tenant disclosure.
Incorrect Answers
B:Repository-supplied configurations can execute processes or contact services; that serves reviewing untrusted project MCP definitions, whereas the case requires enforcing tenant isolation at the MCP backend.
C:Because an MCP configuration that expands environment references depends on that process's environment, the measure supports supplying MCP configuration variables in CI rather than the needed enforcing tenant isolation at the MCP backend.
D:Project-scoped MCP configuration can be distributed with the repository; its benefits for sharing an MCP server configuration with a project do not resolve the need for enforcing tenant isolation at the MCP backend.