Question 40
Several thousand requests use identical policy rules followed by unique customer questions. What should the team do at this decision point?
- Compare cache TTL with request arrival pattern
- Move unchanged long instructions into a shared prefix
- Remove unnecessary cache breakpoints
- Compute cost from input and output token usage
Explanation
Correct Answer
B:Stable prefix design allows eligible prompt caching to amortize repeated input processing; a crucial qualification is that putting request-specific content before a cache checkpoint defeats reuse.
Incorrect Answers
A:Lifetime selection must account for actual reuse frequency and write overhead; here, the controlling capability is that stable prefix design allows eligible prompt caching to amortize repeated input processing, but a longer cache is not automatically economical for rarely repeated prompts.
C:Simpler eligible breakpoint design reduces confusion and aligns with documented limits; by comparison, the intended solution relies on this: stable prefix design allows eligible prompt caching to amortize repeated input processing; arbitrary markers cannot create savings if prefixes keep changing.
D:Per-model input and output token rates combine with measured usage for accurate costing; the needed capability is different—stable prefix design allows eligible prompt caching to amortize repeated input processing—and number of messages alone is not an adequate unit of resource consumption.
Question 41
A finance app needs a machine-readable object but the model sometimes emits invalid punctuation. Which choice should be used here?
- Validate values against a schema
- Parse generated JSON with a real parser
- Apply business rules after schema checks
- Treat generated SQL as untrusted text
Explanation
Correct Answer
B:Standard JSON parsing catches syntactic errors instead of relying on visual plausibility; successfully parsed JSON can still violate expected business types.
Incorrect Answers
A:Schema validation rejects type and enumeration mismatches before downstream use; by comparison, the intended solution relies on this: standard JSON parsing catches syntactic errors instead of relying on visual plausibility; the model being instructed to use JSON is not a runtime guarantee.
C:Independent business validation enforces domain-specific ranges and account scope, whereas the requirement calls for another behavior: standard JSON parsing catches syntactic errors instead of relying on visual plausibility; pure JSON Schema cannot determine whether a payment is authorized.
D:Query validation and read-only permissions constrain execution against approved tables and patterns; however, the critical mechanism here is that standard JSON parsing catches syntactic errors instead of relying on visual plausibility, and text generation does not certify the safety or accuracy of the SQL.
Question 42
A production deployment must recreate the tested SDK and parser behavior after a package update. What change is best aligned with the goal?
- Categorize and triage production incidents
- Pin reproducible dependencies
- Maintain a change log with impact scope
- Require pull-request review
Explanation
Correct Answer
B:Lockfiles and controlled versions reduce unplanned changes between test and production, although automatically taking every new major dependency version can break stable interfaces.
Incorrect Answers
A:Incident classification routes problems to the correct service, integration, or prompt team; the needed capability is different—lockfiles and controlled versions reduce unplanned changes between test and production—and treating every failure as bad model reasoning conceals infrastructure issues.
C:Release records state compatibility, affected endpoints, and migration actions; however, the critical mechanism here is that lockfiles and controlled versions reduce unplanned changes between test and production, and a model-generated summary alone does not define the actual deployed contract.
D:Peer review examines diff, tests, and ownership before a controlled merge; the requirement instead turns on this behavior: lockfiles and controlled versions reduce unplanned changes between test and production; direct unreviewed edits reduce accountability and increase regression risk.
Question 43
Operational traces capture prompts and headers that may contain credentials or confidential customer values. Which engineering practice is the strongest match?
- Authorize access to stored conversation history
- Redact secrets from observability logs
- Minimize personal fields before inference
- Isolate risky browsing from privileged tools
Explanation
Correct Answer
B:Redaction removes sensitive fields before events reach metrics and log sinks; the important constraint is that encrypting logs does not justify logging unnecessary secrets indefinitely.
Incorrect Answers
A:Access-control checks at the storage layer prevent cross-account conversation disclosure, whereas the requirement calls for another behavior: redaction removes sensitive fields before events reach metrics and log sinks; a hidden session identifier is not enough to authorize retrieval.
C:Data minimization removes unrelated personal information prior to sending content to the model; the requirement instead turns on this behavior: redaction removes sensitive fields before events reach metrics and log sinks; a request to disregard a field still exposes that field if it is transmitted.
D:Separate trust zones and scoped workers prevent public content from directly wielding private capabilities; this cannot substitute for the behavior that redaction removes sensitive fields before events reach metrics and log sinks, because isolation fails if credentials or tool results leak back across the boundary.
Question 44
A former employee's connected tool still has a token that can query company data. Which change would satisfy the constraint?
- Require consent for delegated third-party scopes
- Check end-user permissions before using a customer tool
- Monitor key usage anomalies
- Revoke integration access when offboarding
Explanation
Correct Answer
D:Offboarding revokes credentials and grants to prevent future unauthorized use; in production, deleting the employee's saved chat does not revoke external tool credentials.
Incorrect Answers
A:A proper authorization and consent flow limits the scopes granted to the integration; this addresses a separate concern, not the fact that offboarding revokes credentials and grants to prevent future unauthorized use; model-generated text cannot silently supply the user's valid consent.
B:The backend verifies the caller is allowed to access that specific object; here, the controlling capability is that offboarding revokes credentials and grants to prevent future unauthorized use, but a valid session establishes identity but not ownership of every possible resource.
C:Usage attribution, budget alerts, and access logs can expose unauthorized patterns for investigation; the missing capability is more specific: offboarding revokes credentials and grants to prevent future unauthorized use; a key that still works is not evidence that its use is legitimate.
Question 45
A team reduces prompt tokens but accuracy declines and humans must correct many outputs. Which capability is necessary for this outcome?
- Compute cost from input and output token usage
- Set a per-customer token budget
- Tie cost optimization to measured quality
- Alert on unusual token spikes
Explanation
Correct Answer
C:Total cost analysis includes downstream review and failure impact, not just provider charges; the important constraint is that a cheaper inference call is not a net saving if error handling multiplies workload.
Incorrect Answers
A:Per-model input and output token rates combine with measured usage for accurate costing; the needed capability is different—total cost analysis includes downstream review and failure impact, not just provider charges—and number of messages alone is not an adequate unit of resource consumption.
B:Usage attribution and quota enforcement limit spend by tenant and billing period, whereas the requirement calls for another behavior: total cost analysis includes downstream review and failure impact, not just provider charges; a global API key does not automatically impose tenant-level financial fairness.
D:Cost monitoring can detect and halt anomalous demand before it causes significant overspend; the requirement instead turns on this behavior: total cost analysis includes downstream review and failure impact, not just provider charges; monthly billing review alone detects runaway costs too late.
Question 46
A search call fails with a temporary server-side outage and has no business side effects. What is the most suitable pattern?
- Use an idempotency key for external writes
- Use a compensating action for a committed write
- Revise the plan after a failed prerequisite
- Retry a failed read with bounded backoff
Explanation
Correct Answer
D:Retrying after increasing delays can recover a transient read failure without changing external state—with this limitation: the caller must stop after a limited number of attempts and surface persistent failure.
Incorrect Answers
A:Reusing a stable operation key lets the business endpoint recognize retries as the same action; the needed capability is different—retrying after increasing delays can recover a transient read failure without changing external state—and unique keys per attempt would defeat deduplication and risk double charging.
B:A compensating operation undoes a completed business change when atomic rollback spans unavailable services, whereas the requirement calls for another behavior: retrying after increasing delays can recover a transient read failure without changing external state; compensation must itself be auditable and may require authorized human review.
C:The agent re-evaluates dependencies and selects a safe next step based on the observed failure; however, the critical mechanism here is that retrying after increasing delays can recover a transient read failure without changing external state, and it should not bypass authorization or invent missing file contents.
Question 47
A narrow category routing task does not benefit from the cost of a higher-capability model in benchmark tests. What is the correct engineering decision?
- Cache a reusable prompt prefix
- Use deterministic validation after generation
- Select a smaller sufficient model
- Shorten redundant system context
Explanation
Correct Answer
C:Choosing the least expensive model that meets a measured accuracy floor can reduce recurring spending; a crucial qualification is that cheap but inaccurate outputs can produce costly downstream corrections.
Incorrect Answers
A:Eligible prompt caching can avoid repeatedly processing unchanged prefix tokens; this addresses a separate concern, not the fact that choosing the least expensive model that meets a measured accuracy floor can reduce recurring spending; cache savings require actual hits and depend on write/read prices.
B:Business code checks numeric bounds independently of the model's prose; here, the controlling capability is that choosing the least expensive model that meets a measured accuracy floor can reduce recurring spending, but fluent explanations cannot override a failed validation rule.
D:Trimming repeated instructions reduces input tokens without sacrificing unique requirements; by comparison, the intended solution relies on this: choosing the least expensive model that meets a measured accuracy floor can reduce recurring spending; cutting security-critical constraints to save tokens can be counterproductive.
Question 48
Investigators must identify the precise code and prompt state that served a disputed response. Which development approach should be selected?
- Link commits to deployed build artifacts
- Assign semantic versions to prompts
- Run a configuration-diff preflight
- Audit configuration changes
Explanation
Correct Answer
A:Immutable artifact identifiers connect deployment state to reviewed source revisions; the implementation must still recognize that a human-readable release label alone may not uniquely identify deployed bytes.
Incorrect Answers
B:Versioned templates link each inference to the rules actually active during its execution; the missing capability is more specific: immutable artifact identifiers connect deployment state to reviewed source revisions; keeping only the newest text prevents reliable regression analysis.
C:Automated checks compare effective values against the approved deployment baseline; by comparison, the intended solution relies on this: immutable artifact identifiers connect deployment state to reviewed source revisions; assuming staging and production are identical is not a verification method.
D:Change logs capture approvals, diffs, and rollout outcomes for accountable administration; the needed capability is different—immutable artifact identifiers connect deployment state to reviewed source revisions—and a chat transcript is not a complete record of production configuration edits.
Question 49
Engineers need to confirm whether a prompt optimization is actually reducing repeated input processing. Which solution matches the actual constraint?
- Read usage counts from the response
- Place reusable material before per-user content
- Cache a stable shared prompt prefix
- Inspect cache read and creation usage
Explanation
Correct Answer
D:Cache usage metrics distinguish newly written content from tokens read from cache; in production, an assumed hit without usage evidence can hide prompt-prefix changes.
Incorrect Answers
A:Response usage fields provide the token measures used for billing and diagnostics; this addresses a separate concern, not the fact that cache usage metrics distinguish newly written content from tokens read from cache; character count is not an exact substitute for model tokenization.
B:Organizing requests into a shared prefix and variable suffix improves the chance of cache hits; here, the controlling capability is that cache usage metrics distinguish newly written content from tokens read from cache, but if the variable field appears before a checkpoint, the hashed prefix changes per request.
C:Prompt caching can reuse an identical eligible prefix instead of reprocessing it fully on every call; the missing capability is more specific: cache usage metrics distinguish newly written content from tokens read from cache; changing text or tool definitions ahead of the checkpoint can invalidate prefix reuse.
Question 50
A company must impose nonoptional tool access controls across developer machines. What is the most direct implementation choice?
- Use organization-managed policy for enforced restrictions
- Maintain repository CLAUDE.md instructions
- Keep secrets out of settings files committed to Git
- Use local settings for workstation-only behavior
Explanation
Correct Answer
A:Managed settings supply centrally governed guardrails rather than relying on voluntary user configuration; in production, ordinary project instructions are not equivalent to an enforced corporate security policy.
Incorrect Answers
B:Project memory files make scoped guidance available in Claude Code working contexts; the needed capability is different—managed settings supply centrally governed guardrails rather than relying on voluntary user configuration—and they should not contain credentials or private production secrets.
C:Secrets belong in protected secret stores or environment injection rather than tracked source, whereas the requirement calls for another behavior: managed settings supply centrally governed guardrails rather than relying on voluntary user configuration; repository history can preserve credentials even after a later edit deletes them.
D:Local configuration can hold machine-specific client preferences outside shared version control; however, the critical mechanism here is that managed settings supply centrally governed guardrails rather than relying on voluntary user configuration, and committing private machine policy could surprise teammates.