Question 270
A customer-facing chat feature must render an initial response inside an agreed performance budget. What should be implemented to solve this problem?
- Capture explicit nonfunctional latency targets
- Write testable functional acceptance criteria
- Benchmark baseline latency and cost
- Define the authority of each tool action
Explanation
Correct Answer
A:A latency requirement defines measurable service-level timing and informs streaming and model selection; the important constraint is that correct semantic output does not prove the product meets a response-time constraint.
Incorrect Answers
B:Requirements should specify observable inputs, citation fields, and acceptance tests for the behavior; the requirement instead turns on this behavior: a latency requirement defines measurable service-level timing and informs streaming and model selection; a statement that the system should be helpful is not independently verifiable.
C:Capturing tokens, response times, failure rate, and quality before changes makes comparisons meaningful; this cannot substitute for the behavior that a latency requirement defines measurable service-level timing and informs streaming and model selection, because subjective demos cannot quantify a regression from the original system.
D:Access requirements tie each permitted side effect to identity, scope, and approval evidence; in contrast, a latency requirement defines measurable service-level timing and informs streaming and model selection, while a model's confidence in a request is not proof of caller authority.
Question 271
Streaming produces multiple content blocks and updates that can refer to different active blocks. Which engineering practice is the strongest match?
- Associate deltas with their content block indices
- Use typed response variants where applicable
- Apply UI rendering backpressure
- Handle a disconnect during generation
Explanation
Correct Answer
A:Block-index tracking assembles each text or tool input stream correctly; its operational boundary is that appending every delta to a single string can mix text with tool parameters.
Incorrect Answers
B:A discriminated union or type dispatch handles text, tool calls, and other supported blocks correctly; this addresses a separate concern, not the fact that block-index tracking assembles each text or tool input stream correctly; treating all blocks as plain strings discards structural information.
C:Batching display updates preserves order while reducing unnecessary layout work; here, the controlling capability is that block-index tracking assembles each text or tool input stream correctly, but excessive rendering frequency can cause jank even when API streaming is fast.
D:Stream lifecycle logic records interruption and avoids falsely marking partial output complete; the missing capability is more specific: block-index tracking assembles each text or tool input stream correctly; the final message-stop signal has not been observed after a broken connection.
Question 272
An extended migration assessment needs auditable partial results as each independent stage finishes. What is the most direct implementation choice?
- Revise the plan after a failed prerequisite
- Use ephemeral scratch context for one run
- Use a fallback to a human decision-maker
- Use checkpointed milestones
Explanation
Correct Answer
D:Milestone artifacts preserve progress and support a safe resume after transient interruptions; a crucial qualification is that checkpoints must be consistent with any external actions already committed.
Incorrect Answers
A:The agent re-evaluates dependencies and selects a safe next step based on the observed failure; in contrast, milestone artifacts preserve progress and support a safe resume after transient interruptions, while it should not bypass authorization or invent missing file contents.
B:Transient context supports local reasoning without creating long-term customer state; this addresses a separate concern, not the fact that milestone artifacts preserve progress and support a safe resume after transient interruptions; it should not be mistaken for durable memory across new sessions.
C:Escalation transfers the ambiguous decision with relevant evidence and uncertainties; here, the controlling capability is that milestone artifacts preserve progress and support a safe resume after transient interruptions, but generating a confident answer is not an acceptable replacement for the required human approval.
Question 273
A nightly document enrichment job has no interactive SLA and can process results later. Which change would satisfy the constraint?
- Evaluate a smaller tier against quality requirements
- Batch asynchronous independent requests
- Move unchanged long instructions into a shared prefix
- Reduce irrelevant retrieval context
Explanation
Correct Answer
B:Batch processing trades immediate availability for efficient high-volume execution, although it cannot replace streaming chat when users await instant responses.
Incorrect Answers
A:Task-specific benchmarks may show a lower-priced model meets the acceptance threshold; the needed capability is different—batch processing trades immediate availability for efficient high-volume execution—and selecting a model by cost alone can generate costly correction work.
C:Stable prefix design allows eligible prompt caching to amortize repeated input processing; however, the critical mechanism here is that batch processing trades immediate availability for efficient high-volume execution, and putting request-specific content before a cache checkpoint defeats reuse.
D:Targeted retrieval cuts input token use and often improves answer focus; the requirement instead turns on this behavior: batch processing trades immediate availability for efficient high-volume execution; removing critical evidence solely to save cost can reduce accuracy.
Question 274
The API rejects a request that uses an unsupported field or invalid JSON shape. What is the correct engineering decision?
- Correct a malformed request before resubmission
- Inspect stop_reason before returning output
- Treat repeated server errors as a dependency outage
- Back off on rate limiting
Explanation
Correct Answer
A:Client-side schema validation fixes the payload and prevents fruitless retries; the important constraint is that a network backoff cannot make an invalid request body well formed.
Incorrect Answers
B:The completion reason tells the client whether to deliver, dispatch, or handle truncation; the requirement instead turns on this behavior: client-side schema validation fixes the payload and prevents fruitless retries; treating all returned content as a complete final answer can hide partial results.
C:A circuit breaker and fallback degrade gracefully while limiting repeated failed traffic; this cannot substitute for the behavior that client-side schema validation fixes the payload and prevents fruitless retries, because a longer prompt or higher max_tokens does not restore an unavailable upstream server.
D:Rate-limit handling respects retry hints and adds capped exponential delays with jitter; in contrast, client-side schema validation fixes the payload and prevents fruitless retries, while immediate repeated calls worsen overload and do not change the assigned quota.
Question 275
An application must answer about one narrow policy clause within a large knowledge base. What is the right implementation response?
- Inject task-specific retrieval into an API call
- Apply authorization before retrieval
- Retrieve only topically relevant passages
- Preserve source references alongside snippets
Explanation
Correct Answer
C:Search or retrieval supplies a bounded evidence set instead of the entire collection; sending all documents raises cost, noise, and exposure without improving source precision.
Incorrect Answers
A:Retrieval supplies authorized source excerpts as contextual content in the request; the missing capability is more specific: search or retrieval supplies a bounded evidence set instead of the entire collection; model training data is not a reliable substitute for current private documents.
B:The retrieval layer filters sources by verified caller access before any text reaches Claude; by comparison, the intended solution relies on this: search or retrieval supplies a bounded evidence set instead of the entire collection; filtering only the final answer cannot undo earlier disclosure to the model.
D:Provenance metadata allows citations and later source checks for each retrieved excerpt, whereas the requirement calls for another behavior: search or retrieval supplies a bounded evidence set instead of the entire collection; a plausible paragraph with no reference cannot be independently traced.
Question 276
A response contains a complete explanation and the stop reason indicates the assistant has finished. Which choice should be used here?
- Handle tool_use by dispatching the requested tool
- Handle end_turn as normal completion
- Trace the external tool service
- Handle max_tokens as an incomplete completion
Explanation
Correct Answer
B:The caller can finalize the output without fabricating further tool actions; notably, additional automatic continuations risk duplicating the answer.
Incorrect Answers
A:The application executes authorized client tools and continues the conversation with their results; the requirement instead turns on this behavior: the caller can finalize the output without fabricating further tool actions; presenting tool-use JSON directly to the user skips the required integration step.
C:A distributed trace follows the tool dispatcher to the failing downstream dependency; in contrast, the caller can finalize the output without fabricating further tool actions, while rewriting system instructions will not repair an unavailable invoice endpoint.
D:The client detects truncation and adjusts or continues the generation under controlled rules; this addresses a separate concern, not the fact that the caller can finalize the output without fabricating further tool actions; a partially formed response should not be stored as complete structured data.
Question 277
A client needs to submit a structured body that asks the API to generate a new assistant response. What should be implemented to solve this problem?
- Use request headers for API authentication
- Parse an HTTP status before decoding success payload
- Use typed deserialization for a structured result
- Use POST for a Messages generation request
Explanation
Correct Answer
D:The endpoint creates a new inference result from a JSON request and is invoked as an HTTP POST—with this limitation: treating it as a cacheable read-only GET would not express the required request body.
Incorrect Answers
A:The service authenticates the API credential through its designated HTTP headers; the needed capability is different—the endpoint creates a new inference result from a JSON request and is invoked as an HTTP POST—and including a secret in model messages would expose it to prompt handling and logging.
B:The caller distinguishes transport/application failure from successful responses before parsing their bodies, whereas the requirement calls for another behavior: the endpoint creates a new inference result from a JSON request and is invoked as an HTTP POST; attempting to deserialize every response as a Claude message conceals gateway faults.
C:Typed parsing converts validated JSON into an explicit application data contract; however, the critical mechanism here is that the endpoint creates a new inference result from a JSON request and is invoked as an HTTP POST, and free-form text parsing with ad hoc regular expressions is brittle under wording changes.
Question 278
A low-maintenance prototype favors supported hosted agent runtime rather than operating its own sandbox pool. Which implementation mechanism is needed?
- Separate planning from execution
- Run the harness in a controlled private environment
- Use Anthropic-hosted managed execution where supported
- Use a local function dispatcher for private integrations
Explanation
Correct Answer
C:Managed runtime can reduce infrastructure ownership for supported agent operations; a crucial qualification is that hosted deployment still requires review of data paths, available tools, and platform limitations.
Incorrect Answers
A:The application can review and authorize the plan before handing it to a restricted executor; this addresses a separate concern, not the fact that managed runtime can reduce infrastructure ownership for supported agent operations; treating a plan as permission to execute is a serious privilege error.
B:A self-operated worker provides network and runtime control for executing the permitted functions; here, the controlling capability is that managed runtime can reduce infrastructure ownership for supported agent operations, but the operator must maintain patching, scaling, observability, and worker isolation.
D:Application code executes a narrowly defined local tool and returns selected results to Claude; by comparison, the intended solution relies on this: managed runtime can reduce infrastructure ownership for supported agent operations; the API itself does not have arbitrary access to a customer's private internal network.
Question 279
A QA system sends entire manuals even though only two passages are relevant per question. What is the best fit for the described situation?
- Set output length limits by business task
- Batch asynchronous independent requests
- Compare cache TTL with request arrival pattern
- Reduce irrelevant retrieval context
Explanation
Correct Answer
D:Targeted retrieval cuts input token use and often improves answer focus; the important constraint is that removing critical evidence solely to save cost can reduce accuracy.
Incorrect Answers
A:A tight validated output contract avoids unnecessary generated tokens; by comparison, the intended solution relies on this: targeted retrieval cuts input token use and often improves answer focus; limits must remain sufficient for required fields or responses will truncate.
B:Batch processing trades immediate availability for efficient high-volume execution; the needed capability is different—targeted retrieval cuts input token use and often improves answer focus—and it cannot replace streaming chat when users await instant responses.
C:Lifetime selection must account for actual reuse frequency and write overhead, whereas the requirement calls for another behavior: targeted retrieval cuts input token use and often improves answer focus; a longer cache is not automatically economical for rarely repeated prompts.
Question 280
A large research task has multiple deliverables and progress is becoming hard to verify. Which of these alternatives serves the stated goal?
- Segment work into explicit milestones
- Use an external source refresh for changing facts
- Keep unresolved questions explicit
- Preserve immutable business facts in structured state
Explanation
Correct Answer
A:Milestones with acceptance criteria limit aimless elaboration and provide reliable checkpoints; the implementation must still recognize that a plan without tested completion criteria will still drift.
Incorrect Answers
B:Refetching authoritative information avoids treating outdated context as eternally current; the missing capability is more specific: milestones with acceptance criteria limit aimless elaboration and provide reliable checkpoints; the model should not invent a change simply because its history is old.
C:Recording open issues prevents compaction from converting uncertainty into an invented guarantee; by comparison, the intended solution relies on this: milestones with acceptance criteria limit aimless elaboration and provide reliable checkpoints; suppressing gaps for a cleaner paragraph undermines factual reliability.
D:The application records authoritative facts outside model-generated summaries and supplies them when needed; the needed capability is different—milestones with acceptance criteria limit aimless elaboration and provide reliable checkpoints—and conversation recollection can drift or omit earlier commitments.