Courseiva

Claude Certified Architect - Professional (CCAR-P) — Questions 451–502

502 questions total · 7 pages · All types, answers revealed

Page 6

Page 7 of 7

451
MCQhard

During an incident where a Claude-powered agent is 'looping' (calling the same tool repeatedly with the same arguments), which diagnostic metric from the Messages API response is most useful for identifying the failure to progress?

A.Use the 'count_tokens' endpoint to verify if the repetitive tool results are causing the context window to exceed its limit.
B.Check the 'cache_read_input_tokens' metric to see if the model is correctly retrieving the tool's previous output from the cache.
C.Monitor the 'stop_reason' field; a sequence of identical 'tool_use' reasons without an 'end_turn' indicates a reasoning loop.
D.Analyze the 'stop_details' object to find the specific error code associated with the repetitive tool invocation.
AnswerC

The stop_reason tells you why the model stopped generating. In a loop, it will repeatedly stop with 'tool_use'. By tracking the tool name and arguments associated with this reason over several turns, developers can programmatically detect and break infinite loops that waste tokens and time.

Why this answer

When an agent is stuck in a loop, it continues to consume tokens without reaching an 'end_turn' stop_reason. The most critical field to monitor is the 'stop_reason'. If the stop_reason is consistently 'tool_use' for the same tool across multiple turns, it indicates the model is not satisfied with the results or is failing to reason about the next step.

Comparing the 'usage' (input_tokens) across these turns will also show a growing context as the conversation history (including the repetitive tool calls) is sent back to the model.

Exam trap

Looking for a 'loop_detected' flag or error code, which the API does not provide.

452
Multi-Selectmedium

An architect wants to improve the coherence of an agent that frequently makes 'leaps of logic' or misses obvious errors in its tool outputs. Which TWO techniques directly address this behavior?

Select 2 answers
A.Chain-of-Thought (CoT) in the assistant turns
B.Increasing the frequency of tool calls
C.Reducing the temperature to exactly 0.0
D.Using the 'tool_choice' parameter to force tool use
E.Implementing a self-reflection/critique loop
AnswersA, E

Encouraging the model to 'think out loud' before generating a tool call helps it process complex instructions more accurately. This explicit reasoning step allows the model to verify dependencies and logic internally, which significantly reduces the likelihood of making irrational or incorrect tool selections during complex tasks.

Why this answer

Coherence in agents is improved by forcing the model to externalize its reasoning and critique its own work. Chain-of-thought encourages the model to plan before acting, while self-reflection allows it to catch and correct its own mistakes in a subsequent turn, leading to much more reliable agentic behavior.

Exam trap

Candidates often suggest prompt engineering to 'tell the model to be smarter'. This is rarely effective for complex logic errors; structural improvements to the reasoning process are required instead.

453
MCQmedium

A stakeholder demands that your Claude-powered summarization tool achieve 'zero hallucinations.' As an architect, how do you incorporate this requirement into your evaluation contract?

A.Switch to a smaller, faster model so that the system generates shorter summaries, reducing the surface area for hallucinations.
B.Define a 'grounding score' in your evaluation contract that rejects any summary containing information not explicitly found in the source documents.
C.Agree to the requirement and include a disclaimer in the user interface stating that the model may occasionally hallucinate.
D.Increase the model's effort to its maximum level to ensure that the model is always as accurate as possible.
AnswerB

Defining a grounding score turns the abstract request for 'no hallucinations' into a measurable performance contract. By automating the check against source text, you give the team a clear target to optimize for and provide the stakeholder with an objective report on the system's performance.

Why this answer

You cannot guarantee 'zero' hallucinations in an LLM, but you can define a strict evaluation contract that penalizes any output not supported by the source text. By using citations or grounding checks as part of your automated evaluation pipeline, you create a measurable contract that defines the threshold for acceptable information extraction and hallucination mitigation, while also resetting the stakeholder's expectation to a measurable, technical standard.

Exam trap

Candidates often promise 'zero hallucinations' to stakeholders to appease them, failing to recognize that LLMs are probabilistic and that 'zero' is not a technical reality.

454
MCQmedium

Your team wants to adopt a 'Configuration-as-Code' approach for LLM prompts. Which tool is most suited for managing this?

A.A shared Excel spreadsheet on a local company server.
B.A Git-based repository integrated with a CI/CD pipeline.
C.Directly updating the prompts in the model provider's web console.
D.Hardcoding the prompts in a static configuration file inside the app binary.
AnswerB

Git provides the standard for versioning, peer-reviewed changes, and auditability. Integrating this into a CI/CD pipeline allows for automated testing of prompts against golden datasets before they are deployed. This is the professional, industry-standard approach for managing LLM configuration in a scalable and robust way.

Why this answer

Version control systems (like Git) combined with modern CI/CD pipelines are the best tools for Configuration-as-Code. By treating prompts as code, teams gain the benefits of peer reviews, version history, and automated testing, which are essential for LLM operational enablement. This approach ensures that changes to model behavior are transparent, reproducible, and easily reversible, significantly reducing the risk of production incidents and improving team collaboration on prompt engineering tasks.

Exam trap

Test-takers frequently select ad-hoc prompt management tools or local shared drives, ignoring that Git-based repositories integrated with CI/CD pipelines are required for true Configuration-as-Code workflows.

455
MCQmedium

You are building a Claude-based agent that must parse unstructured customer emails, extract line-item order data, and then call a fulfillment tool with the extracted values. During testing, the agent occasionally calls the fulfillment tool with empty or garbled line items when an email contains a forwarded message with a different formatting style. Which architectural change most directly reduces this failure?

A.Reduce the number of tools available to the agent so it focuses only on fulfillment during extraction.
B.Add a validation step that checks the extracted line items against the tool's JSON schema and returns a structured error to the model before any tool call is allowed.
C.Switch the fulfillment tool to accept free-form natural language instead of structured parameters so the model can pass whatever it extracted.
D.Increase the max_tokens parameter on the extraction call so the model has more room to emit complete line items.
AnswerB

A schema validation gate on the extracted payload catches malformed or empty line items before the fulfillment tool is invoked. Returning a structured error to the model lets it re-read the email and repair the extraction. This addresses the root cause of garbled output rather than masking it, and it keeps the tool boundary safe from invalid inputs. It is the most direct architectural fix for the described failure.

Why this answer

The failure occurs because extracted line items are not verified before the tool boundary is crossed. A validation gate that compares the extraction against the tool's JSON schema and returns a structured error gives the model a chance to repair its output. This keeps invalid data out of downstream systems and converts a silent corruption into a retryable, observable event.

Exam trap

The trap here is assuming that a larger output budget or a simpler tool interface will fix malformed extractions, when the actual defect is the absence of a validation boundary before tool invocation.

456
MCQhard

Your enterprise is building a system to generate personalized marketing content. The team wants to ensure the model does not produce stereotypical content. You decide to use a 'Red Teaming' approach. What is the most critical component of this red teaming exercise?

A.Limit red teaming to the development environment to avoid exposing the production API to potentially harmful adversarial queries.
B.Automate the red teaming process using a single, large-scale prompt that asks the model to generate all possible stereotypical outputs.
C.Develop a set of adversarial prompts that specifically probe for stereotypical associations in the context of your marketing campaigns.
D.Focus the red teaming effort on discovering 'jailbreaks' that could bypass the model's safety filters.
AnswerC

The most effective red teaming for bias involves creating targeted, adversarial prompts that are designed to uncover how the model handles sensitive demographic categories. By deliberately testing the model with scenarios that might elicit stereotypical responses, you can evaluate its fairness and identify the need for stronger system-level steering.

Why this answer

Red teaming for bias is built around adversarial prompts designed specifically to draw out stereotypical content in your own use case, here marketing campaigns across different audiences and demographic categories. Running a broad, targeted set of such prompts lets the team observe systematically where the model's output slips into stereotypes. Clear evaluation criteria then turn those findings into concrete changes to the system prompt or application design, and the exercise should be repeated as the system and its inputs evolve.

Exam trap

Candidates often believe red teaming is only for finding security vulnerabilities or 'jailbreaks', ignoring its critical role in identifying societal and demographic bias.

457
MCQmedium

Your team maintains a complex system prompt for a document extraction pipeline. You need to incorporate a new instruction about handling 'confidential' document headers. To minimize the impact on your prompt caching efficiency, what is the best strategy?

A.Append the new instruction to the end of the existing system prompt instructions.
B.Use the Files API to upload the new instructions as a document for the model to read.
C.Move all instructions into a separate user message to avoid system prompt invalidation.
D.Insert the new instruction at the very beginning of the system prompt to ensure the model sees it first.
AnswerA

Appending instructions to the end of the system prompt preserves the integrity of the initial, stable prompt prefix. This allows the caching mechanism to utilize the previously cached tokens for the earlier parts of the prompt, resulting in a more efficient use of the cache and lower token costs.

Why this answer

Prompt caching operates on a prefix match. Any change to the system prompt invalidates the cache for all subsequent content. By placing stable instructions at the beginning of the system prompt and appending the new, more volatile instructions toward the end, you ensure that the prefix remains consistent for as long as possible.

This minimizes cache invalidation and maintains the cost-efficiency of the caching strategy for the majority of your API requests that do not require the latest dynamic modifications.

Exam trap

Candidates often assume that any change to the system prompt requires a total re-caching of the entire prompt, ignoring the prefix-matching nature of the Anthropic cache.

458
MCQmedium

During a security audit of a Claude Code deployment, you find PreToolUse command hooks in settings.json that validate file paths for the Read tool. The auditor asks what happens when the hook identifies a path that violates the security policy. What is the standard blocking behavior for a Claude Code command hook?

A.The hook returns a 'tool_result' block with 'is_error: true' to the Messages API.
B.The hook exits with code 2, and the stderr content is provided to Claude as feedback.
C.The session is immediately terminated with a 403 Permission Denied error to prevent further exploitation.
D.The hook modifies the tool's input arguments to a safe default before allowing the execution to proceed.
AnswerB

This is the documented behavior for Claude Code shell hooks. Exit code 2 is the signal to block the tool invocation. By passing the error message through stderr, you give the agent context about the failure, which is safer and more robust than a silent failure or a generic crash of the session.

Why this answer

In Claude Code, hooks are used to intercept tool calls. If a 'PreToolUse' hook (configured as a shell command in settings.json) determines that a tool call should not proceed (e.g., because it attempts to read a forbidden directory), it should exit with code 2. This specific exit code signals to Claude Code that the tool call was blocked for a reason.

The contents of the hook's stderr are then fed back to Claude, allowing the model to understand why the action was denied and potentially try a different, allowed approach.

Exam trap

Confusing exit code 1 (general error) with exit code 2 (specific tool block signal) in Claude Code hooks.

459
MCQhard

Your organization is evaluating an agentic workflow that uses an MCP server to access internal data. You discover the agent's bias is heavily influenced by the retrieved data. How should you address this in your bias evaluation?

A.Modify the agent's system prompt to instruct it to ignore any data retrieved via the MCP server if the sentiment is negative.
B.Disable the MCP server and hard-code the required data into the agent's system prompt to prevent external bias.
C.Increase the 'effort' setting to 'max' on the agent so it can better identify and ignore biased data during its thinking process.
D.Incorporate the retrieved data sources into the bias evaluation audit and implement sanitization logic in the MCP server.
AnswerD

Since the agent's bias is driven by the data it retrieves, auditing those data sources is essential. Implementing sanitization or filtering within the MCP server layer addresses the root cause of the bias before it ever reaches the model, ensuring that the information provided to the agent is safer and fairer.

Why this answer

When an agent's bias is rooted in the retrieved data, the evaluation must move beyond just the model and include the data sources themselves. You need to audit the retrieved content for bias, implement filtering or sanitization in your MCP server, and potentially adjust the agent's system prompt to handle retrieved information with appropriate skepticism. Treating the data as a source of bias is a critical component of a comprehensive risk management strategy, as the model will faithfully reflect the patterns present in the data it is provided.

Exam trap

Assuming that bias is always a result of the LLM's internal weights and ignoring the fact that agents often rely on external data retrieved via MCP.

460
MCQmedium

An organization is building a customer-facing application where Claude acts as a research assistant. To ensure compliance with usage policies regarding harmful content, the architect needs to implement a robust verification layer. Which approach is most effective for ensuring that Claude's responses remain within the bounds of the Acceptable Use Policy while maintaining high usability?

A.Use a smaller, less capable model to reduce the risk of the assistant generating complex or harmful content.
B.Disable all safety features on the API side to ensure the model responds to every user prompt without interruption.
C.Rely exclusively on Anthropic's built-in safety classifiers to block all policy-violating requests at the API level.
D.Implement a custom evaluation layer that inspects model outputs for policy compliance and use system instructions to define behavioral boundaries.
AnswerD

Combining clear system instructions with an automated output monitoring layer provides a defense-in-depth strategy. This allows the application to enforce organization-specific safety policies while providing a mechanism to detect and mitigate potential harms that might bypass the model's base safety layers in unique or novel edge cases.

Why this answer

The most effective approach involves a multi-layered defense strategy. Relying solely on the model's inherent safety training is insufficient for high-stakes enterprise deployments. By implementing a combination of clear system instructions that define the assistant's boundaries and an automated evaluation layer that inspects model outputs for policy-violating content before final delivery to the end user, the architect creates a proactive safety perimeter.

This structure allows the application to gracefully handle edge cases where the model might produce content that is technically fluent but contextually inappropriate for the organization's specific safety standards.

Exam trap

Candidates often assume that Anthropic's internal safety filters are sufficient for all enterprise use cases, ignoring the architectural need for application-level guardrails and monitoring.

461
Multi-Selecthard

Which THREE technical strategies best support scaling prompt engineering across a large organization?

Select 3 answers
A.Encourage developers to share prompt snippets via chat platforms.
B.Implement automated CI/CD pipelines for prompt testing and deployment.
C.Adopt modular prompt design patterns using template engines.
D.Use a centralized repository for tracking prompt versions and metadata.
E.Limit access to the Claude API to a single dedicated team.
AnswersB, C, D

CI/CD pipelines allow teams to run tests against every prompt change automatically. This catches regressions early and ensures that deployment is consistent and repeatable. By automating the quality control process, teams can scale their output and maintain high standards without manual bottlenecks, which is critical for large-scale production systems.

Why this answer

Scalable prompt engineering requires treating prompts as code. This includes using version control, automated testing, and modular prompt design. By implementing these practices, organizations create a repeatable and transparent workflow that allows developers to iterate safely.

These strategies reduce the risk of regressions and enable effective collaboration, which is fundamental to maintaining high-quality AI outputs at scale without slowing down the overall development velocity.

Exam trap

Candidates often emphasize manual testing or individual expert review, failing to realize that scaling prompt engineering requires CI/CD, modularity, and programmatic version control similar to standard software development.

462
MCQmedium

A stakeholder group wants to use the Claude API for a new public-facing application. What is the first thing you should discuss with them?

A.The choice of programming language for the application frontend.
B.The implementation of rate limits to optimize the API cost structure.
C.The scope of safety guardrails and moderation policies required for public usage.
D.The timeline for the marketing launch of the new application.
AnswerC

Public-facing applications must be protected against misuse, such as prompt injection or hate speech generation. Discussing safety guardrails first ensures that the application is built securely from the ground up, protecting both the organization and its users from the risks associated with unmoderated public exposure to an LLM.

Why this answer

Before any technical implementation, understanding the regulatory and safety requirements of a public-facing application is the most important step. Public exposure introduces significant risks related to brand reputation, security, and potential legal issues. Starting the conversation here ensures that all safety guardrails, including content filtering and misuse protection, are properly addressed, which is essential for a safe and successful public release of AI-powered tools.

Exam trap

Candidates often jump straight to discussing model architecture or performance, ignoring that the primary concern for public-facing applications is safety, moderation, and legal liability regarding user input.

463
MCQhard

An organization is using the Messages API to process documents. They have a requirement that any secrets found within the uploaded files must be redacted before the files are sent to the API. Which strategy is most appropriate?

A.Enable the 'zero data retention' policy for the organization to ensure that the API automatically redacts any secrets during processing.
B.Perform deterministic scanning and redaction in the application layer before sending the file content to the Messages API.
C.Use the Files API to upload the documents and set the redaction flag in the API request metadata.
D.Include a system prompt instruction to identify and redact any secrets found in the provided document attachments.
AnswerB

Deterministic pre-processing in the application layer is the only way to ensure that sensitive data is removed before it reaches the API. This provides a clear, verifiable security boundary that protects the integrity of the data being sent to the model for processing.

Why this answer

The organization must implement a deterministic, pre-processing step that scans files for sensitive patterns (like API keys or passwords) and redacts them before the documents reach the Claude API. Because the API does not perform PII or secret redaction, and prompt instructions to 'ignore secrets' are not a security control, this must be handled by custom code in the application layer. This ensures that no sensitive material is ever part of the input tokens sent to the model.

Exam trap

Candidates often rely on system prompts or instructions to 'not leak' sensitive data, which does not prevent the data from being present in the input context window.

464
MCQhard

An agent orchestrator delegates work to three specialist sub-agents: a 'search' agent that returns ranked documents, an 'extract' agent that pulls structured fields from those documents, and a 'verify' agent that checks extracted fields against source text. During evaluation you find that verify frequently approves fields that extract hallucinated, because verify receives only the extracted JSON, not the source passages. Which change to the orchestration contract most directly fixes this?

A.Route all extracted fields back through the search agent so it can re-rank the documents before verification.
B.Increase the verify agent's temperature so it is more likely to question the extracted fields it receives.
C.Add a fourth 'audit' agent that independently re-runs the extract agent on the same documents and compares the two JSON outputs.
D.Have the extract agent include, for each field, the source span it was derived from, and pass those spans to the verify agent alongside the extracted JSON.
AnswerD

Verification is only possible against evidence. By propagating the exact source spans that back each extracted field, the verify agent can compare the claimed value to the text it supposedly came from, which is the only way to detect fabrication. This changes the orchestration contract to carry provenance, directly closing the gap that let hallucinated fields pass.

Why this answer

The verifier approves hallucinations because it is asked to judge extracted values without access to the text they were derived from. Propagating per-field source spans gives the verifier the evidence needed to confirm or refute each value against its origin. This is a contract change between extract and verify, ensuring provenance flows with the data rather than being reconstructed or guessed downstream.

Exam trap

The trap here is treating verification failures as a reasoning or sampling problem and adding temperature, re-ranking, or a redundant extractor, when the verifier simply lacks the source evidence needed to detect fabrication.

465
MCQmedium

What is the primary role of a 'Model Card' in the context of enterprise AI governance?

A.A list of all API keys associated with the model for billing purposes.
B.A comprehensive summary of the model's performance, limitations, and intended usage.
C.A tool for automatically deploying the model to production environments.
D.A physical card used for multi-factor authentication to access the API.
AnswerB

This is the core definition of a Model Card. It enables organizations to perform due diligence, ensuring that the model is appropriate for the proposed task and that the team understands its limitations, thereby reducing the risk of improper use and ensuring compliance with safety and governance standards.

Why this answer

Model Cards are essential documentation that provides transparency into a model's intended use, limitations, performance benchmarks, and known biases. For an enterprise architect, they serve as the technical source of truth for assessing whether a model is fit for a specific business use case. This documentation is critical for risk management, ensuring that deployments are grounded in a clear understanding of the model's capabilities and boundaries.

Exam trap

Candidates often mistake Model Cards for technical training logs or deployment scripts, missing their core purpose as a transparent summary of performance, limitations, and intended use.

466
MCQmedium

An enterprise agentic system using Claude needs to maintain strict state isolation across multiple concurrent user sessions while executing autonomous tool loops. Which architecture best ensures security and state integrity?

A.Maintain a single global conversation history array in memory and append all incoming user turns sequentially.
B.Store conversation history and intermediate scratchpads in an encrypted, session-scoped external database retrieved on each turn.
C.Rely entirely on Claude's native system prompt caching to automatically differentiate between distinct concurrent user sessions.
D.Encode all intermediate tool states directly into the client-side browser local storage and send the full payload to Claude.
AnswerB

Session-scoped external storage enforces isolation by keying every read and write to a unique session identifier, so concurrent agent loops cannot observe or mutate each other's scratchpads. Encryption at rest satisfies the security constraint, while per-turn retrieval keeps state authoritative rather than relying on in-context memory that could leak across sessions.

Why this answer

Isolating agent state at the session layer prevents context bleed and cross-user data contamination in enterprise environments. Stateless server designs combined with externalized transactional stores allow horizontal scaling while preserving deterministic tool execution history, which is critical for compliance and reliable multi-turn agent interactions.

Exam trap

Many candidates mistakenly choose to store session state within the agent's memory or prompt context, which leads to security risks like prompt injection or data leakage between concurrent user sessions.

467
MCQmedium

A media company uses Claude to moderate user-generated comments at high volume. The risk team wants a control that detects when the moderation model's behavior drifts, for example becoming unusually permissive or aggressive, before it affects the community at scale. Which control best fits this need?

A.Provide an appeal button so users can report comments they believe were moderated incorrectly.
B.Maintain a labeled evaluation set of representative comments and run scheduled regression tests that compare current moderation decisions against expected outcomes, alerting on threshold breaches.
C.Monitor average tokens per moderation request to detect changes in comment length.
D.Cache moderation verdicts for identical comments to reduce repeated inference costs.
AnswerB

A stable labeled evaluation set with scheduled regression runs turns drift into a measurable signal, comparing present behavior against known-good expectations. Alerts on threshold breaches catch permissiveness or aggression shifts before they spread across the community. The other options address cost, latency, or individual appeals rather than detecting systematic behavioral change over time.

Why this answer

Detecting behavioral drift requires a stable reference: a labeled evaluation set that defines expected moderation outcomes. Running scheduled regression tests against it converts drift into a measurable deviation and supports alerting before community-wide impact. Token monitoring, user appeals, and verdict caching each serve different purposes and cannot reveal systematic changes in how the model judges content.

Exam trap

The trap here is equating operational metrics or reactive user feedback with behavioral drift detection, when only repeated comparison against a fixed labeled benchmark exposes a shift in model judgment.

468
MCQeasy

A team wants an agent to answer questions about a large internal corpus. They notice the agent invents details when the retrieved chunks are only loosely related to the question. Which change most directly reduces fabricated answers grounded in weak evidence?

A.Instruct the agent in the system prompt to answer only from provided documents and to state when evidence is insufficient.
B.Raise the temperature setting so the model explores more diverse phrasings of the answer.
C.Increase the number of retrieved chunks returned by the vector search to fifty per query.
D.Switch the embedding model to one with a larger vector dimension for finer similarity scoring.
AnswerA

Grounding instructions tie generation to the supplied context and give the model an explicit escape hatch when retrieval is weak. By authorizing an 'insufficient evidence' response, you remove the pressure to fabricate a plausible answer. This is the most direct lever because it changes behavior at generation time regardless of retrieval quality, and it composes with retrieval improvements later.

Why this answer

The reported failure is generation overreach under weak retrieval, so the highest-leverage fix is a grounding instruction that scopes answers to supplied documents and explicitly permits declining. This directly constrains what the model may assert and gives it a safe alternative to invention, independent of any retrieval tuning that might follow.

Exam trap

The trap here is treating every hallucination as a retrieval problem and reaching for embeddings or more chunks, when the described behavior is generation overreach best fixed by grounding instructions.

469
Multi-Selectmedium

Your organization is standardizing a Claude-based internal assistant across three departments with different risk tolerances and workflows. Executive sponsors want a single governance model that keeps the program aligned and auditable as it grows. Which TWO practices should you establish as part of the lifecycle governance? (Choose two.)

Select 2 answers
A.Maintain a central registry of approved use cases, model versions, and evaluation results that all departments reference and update as the program evolves.
B.Define a lightweight change-control process that classifies prompt, model, and configuration changes by risk and requires review for high-impact ones.
C.Freeze all prompts and model versions for twelve months so that behavior cannot change while the governance model is being validated.
D.Let each department maintain its own independent prompt library, evaluation approach, and release cadence with no shared standards or reporting.
E.Require every department to use identical prompts and thresholds regardless of their differing workflows and risk tolerances.
AnswersA, B

A central registry creates a single source of truth for what is deployed, which models are approved, and how quality has been demonstrated. It enables reuse of proven patterns across departments, supports audits, and gives sponsors portfolio-level visibility. It also prevents the common failure where one team unknowingly deploys an unapproved configuration that another team already evaluated and rejected.

Why this answer

Effective lifecycle governance balances consistency with flexibility. A risk-tiered change-control process ensures high-impact modifications receive review while routine iteration stays fast, and a central registry provides shared visibility into approved use cases, models, and evaluation evidence. Together they let three departments with different needs operate under one auditable model without freezing progress or forcing one-size-fits-all artifacts.

Exam trap

The trap here is assuming governance must mean either total departmental autonomy or rigid uniformity, when the workable answer is shared standards plus risk-proportionate control.

470
MCQeasy

A stakeholder asks for a change in the model's tone to be 'more professional' for customer support. How should you translate this request into technical requirements?

A.Tell the stakeholder that tone is subjective and suggest we keep the default setting.
B.Create a clear system prompt with guidelines for tone, style, and vocabulary.
C.Change the model version to one that is specifically advertised as 'professional'.
D.Ask the stakeholder to rewrite the model's responses themselves to ensure it is correct.
AnswerB

A well-crafted system prompt is the standard way to enforce tone and style constraints in Claude. By defining guidelines for vocabulary and structure, the architect provides a repeatable, consistent behavior that meets the stakeholder's needs, transforming vague user expectations into a concrete, measurable technical requirement for the API integration.

Why this answer

Translating subjective feedback like 'professional tone' into concrete system instructions is a core task for an architect. By creating a specific system prompt and testing it against a set of representative inputs, you define what 'professional' means for the system. This provides a clear, verifiable standard that ensures consistent communication across all customer support interactions, improving both the quality of service and the reliability of the AI implementation.

Exam trap

Candidates often try to 'train' the model for tone, whereas the architecturally correct approach is to define tone within the system prompt and validate it through testing.

471
MCQmedium

Your enterprise is consolidating AI procurement across multiple platforms, including the Claude API, Amazon Bedrock, and Google Cloud Vertex AI. A senior stakeholder asks how to ensure consistent cost attribution across these diverse environments. What is the recommended architectural approach for this requirement?

A.Implement a centralized telemetry and logging pipeline that ingests usage data from each platform's native billing exports and API logs to normalize and report costs.
B.Configure cross-platform workspace synchronization in the Anthropic Admin API to aggregate billing metrics from Bedrock and Vertex into a single report.
C.Enable zero data retention across all platforms to ensure that billing logs are stripped of PII, simplifying the process of consolidating cost reports.
D.Use the standard metadata field in the Messages API to include a unique project ID that will be automatically propagated to all cloud provider billing consoles.
AnswerA

Centralized telemetry is the only viable method for enterprise-wide cost visibility when using multiple providers, as it allows you to normalize usage metrics and apply custom business logic for attribution.

Why this answer

Workspaces within the Anthropic platform allow for the separation of API keys, usage reporting, and rate limits, providing a clear mechanism for cost attribution. However, because each cloud provider (Bedrock, Vertex, Foundry) manages its own billing, identity, and usage reporting, there is no single cross-platform API for unified cost tracking. Architects must implement a centralized logging and telemetry service that aggregates usage metrics from each platform's native reporting APIs or billing exports, normalizing the data to provide a unified view of enterprise AI spend.

Exam trap

Candidates often assume that the Anthropic Admin API or workspace settings can aggregate billing data from third-party cloud platforms like AWS Bedrock or Google Vertex, which is functionally impossible.

472
MCQhard

An organization is using Claude to process incoming customer emails and draft responses. To prevent prompt injection where a customer email attempts to hijack the drafting process, the architect decides to use the 'evaluator-optimizer' pattern. Why is this pattern effective against prompt injection?

A.It increases the cost of the attack, making it economically unfeasible for attackers to continue attempting to inject malicious prompts.
B.It separates the generation of the response from the validation of the response, allowing for a dedicated security check before completion.
C.It uses the evaluator agent to automatically sanitize the input email by removing any potential keywords before the generator sees it.
D.It forces the model to re-process the input multiple times, which naturally dilutes the impact of any injected instructions.
AnswerB

By decoupling the generation and evaluation steps, the system can perform a dedicated security audit of the drafted content. The evaluator acts as a security filter that can detect if the generator was manipulated by an injection attack, ensuring that only safe, validated content is used for the final output.

Why this answer

Splitting the work lets a separate evaluator check each draft against the organization's policies before it is used. Because the evaluator reviews the output in its own context, a draft whose behavior was changed by an injected instruction can be caught and sent back rather than going straight to the customer. This adds a strong layer of defense; it does not guarantee that every injection is caught, so it should be combined with other controls.

Exam trap

Candidates often think this pattern is primarily for 'quality' rather than 'security', missing its role in detecting injection-driven behavioral changes.

473
MCQhard

Your organization operates a high-volume financial document processing pipeline built around Claude Haiku 5.5. A stakeholder requests that you immediately migrate all traffic to Claude Opus 5.5 to capture the latest reasoning capabilities, but expresses concern over sudden cost spikes and latency increases. How should you advise the stakeholder regarding model lifecycle management and cost control?

A.Adopt a hybrid architecture that routes routine extraction tasks to Haiku and reserves Opus for complex reasoning, while leveraging batch processing for non-urgent volume.
B.Route all requests through the Files API to cache the model weights locally, neutralizing the latency penalty of upgrading to Opus.
C.Migrate all traffic to Opus immediately, and use the Messages API seed parameter to ensure deterministic cost accounting across enterprise workspaces.
D.Disable adaptive thinking on Haiku and force high-effort settings to match Opus performance, eliminating the need for any model migration.
AnswerA

Balancing cost and capability requires matching task complexity to the appropriate model tier rather than applying a single model universally. Routine extractions stay cost-effective on Haiku, complex workflows utilize Opus, and non-urgent bulk jobs benefit from the 50% discount of Message Batches.

Why this answer

Moving straight from Haiku to Opus for all traffic introduces unnecessary cost and latency for simple tasks. Instead, architects should recommend a hybrid or targeted routing approach, reserving Opus for complex, high-stakes tasks while keeping high-volume, simple tasks on Haiku. Furthermore, before migrating, the team should evaluate whether adjusting effort levels on the existing model or utilizing batch processing for non-latency-sensitive workloads can achieve the desired capability improvements without wholesale model tier changes.

Exam trap

Candidates often recommend a blanket migration to the most capable model tier, ignoring the cost and latency trade-offs emphasized in enterprise architecture best practices.

474
MCQmedium

Your team is building an agentic workflow that interacts with internal databases. The stakeholders are concerned about the agent's ability to 'act' autonomously. You propose an 'evals as contracts' approach to define the agent's limits. What should be the primary focus of these evals?

A.Requiring the agent to always reach a successful conclusion regardless of the input complexity.
B.Measuring the agent's ability to provide helpful, conversational answers to user queries.
C.Evaluating the agent's speed and latency during long-horizon reasoning tasks.
D.Testing the agent's adherence to a defined set of tool-usage permissions and boundary conditions.
AnswerD

Operational safety and strict tool-usage compliance are the most critical aspects of an agentic contract. By evaluating the agent against predefined permission sets and boundary conditions, you ensure that it acts only within the scope authorized by stakeholders, creating a verifiable and safe interaction model.

Why this answer

In an agentic system, the contract must focus on the guardrails and the successful completion of tasks within defined boundaries, rather than just the final output text. By creating test scenarios that simulate both valid and invalid operations (e.g., unauthorized data access attempts), you establish a contract that the agent must respect. The success criteria should be framed as 'the agent must only perform actions A, B, and C, and must never attempt action D,' which can be verified automatically through your test harness.

Exam trap

Candidates often focus on the agent's creativity or conversational ability, rather than the critical need to enforce operational constraints and safety boundaries.

475
MCQhard

Midway through a Claude deployment, the executive sponsor asks to add a new capability that would require sending customer records to a third-party retrieval service outside the approved environment. Which action best demonstrates sound stakeholder communication and lifecycle governance?

A.Reject the request outright because the original scope did not include third-party retrieval services.
B.Acknowledge the request, document the proposed data flow, assess privacy and compliance impact with the relevant reviewers, and return a decision with options and tradeoffs.
C.Approve the addition immediately to preserve sponsor satisfaction, and document the data flow change after implementation.
D.Implement the capability in a personal development environment to demonstrate feasibility before raising the governance question.
AnswerB

This approach respects the sponsor's request while routing it through the governance the environment demands. Documenting the data flow makes the change concrete and reviewable, and involving privacy and compliance reviewers produces a defensible decision rather than a personal judgment. Returning options with tradeoffs, such as an approved in-environment alternative, keeps the sponsor engaged and preserves their ability to choose.

Why this answer

The sound response acknowledges the sponsor's request, makes the proposed data flow explicit, involves privacy and compliance reviewers, and returns a decision with options and tradeoffs. This preserves both the relationship and the control environment, and it gives the sponsor a genuine choice. Immediate approval, outright rejection, and building first each bypass a review step that the environment requires.

Exam trap

The trap here is treating a mid-project scope addition as either an automatic yes or an automatic no, rather than a change that requires a documented impact assessment.

476
MCQmedium

An enterprise is using Claude Sonnet 5.5 to analyze legal contracts. To reduce costs, they use prompt caching for a large library of standard clauses. The security team is concerned that if a clause contains a unique identifier, it might be stored longer than necessary. What is the standard lifetime of a cached prompt prefix in the Anthropic API, and what option is available to extend it?

A.The default lifetime is 24 hours, and it can be extended to 7 days for approved users.
B.The default lifetime is 5 minutes, and a 1-hour TTL is available.
C.The default lifetime is 30 minutes, and it can be extended by setting the 'max_cache_age' parameter.
D.The default lifetime is 60 seconds, and it can be extended to 5 minutes using the 'ephemeral' type.
AnswerB

The Anthropic API provides a default 5-minute cache lifetime. This is suitable for rapid multi-turn conversations. For scenarios requiring longer persistence of the cached state, such as repeated analysis of the same document library over an hour, the 1-hour TTL can be requested or configured to maintain the cache read benefits for a significantly longer duration.

Why this answer

Prompt caching is designed for short-term reuse of context. The default lifetime for a cached prefix is 5 minutes. If a request matches the prefix within this window, the TTL is reset.

For enterprise use cases where documents are reused over longer intervals (such as a legal team revisiting a contract library throughout a workday), a 1-hour TTL option is available. This allows for more efficient cost management while still ensuring that data is not cached indefinitely on the edge nodes.

Exam trap

Confusing the 5-minute default TTL with the 24-hour window of the Message Batches API.

477
MCQmedium

A multinational bank deploys Claude to draft internal policy summaries for staff in the EU and Singapore. Legal requires that personal data embedded in employee questions never leave its region of origin, but the bank wants a single application codebase. Which architecture most directly enforces the residency requirement?

A.Enable zero data retention on the account so that no request or response content is stored by the provider.
B.Configure regional API endpoints so that EU traffic is served within the EU and Singapore traffic within its region, sharing only stateless application code.
C.Deploy the application in one region and rely on the model provider's contractual data processing addendum to cover cross-border transfer.
D.Apply client-side redaction of names and identifiers before the request is sent, then send all traffic to a single global endpoint.
AnswerB

Regional endpoints keep the request and response path inside the required geography while allowing one codebase to be deployed to multiple regions. Stateless application code carries no personal data between regions, so residency is enforced by the network topology rather than by policy language. This is the most direct technical control for the stated requirement.

Why this answer

Data residency is a geographic constraint on where processing happens, so the control must shape the request path rather than the contract or the retention window. Routing each jurisdiction to an in-region API endpoint keeps personal data inside its required boundary while a shared, stateless codebase avoids duplicated engineering effort. Redaction and retention settings reduce risk but do not guarantee the data never leaves the region.

Exam trap

The trap here is confusing data residency with data retention or with contractual transfer permissions, when only the network path actually determines where processing occurs.

478
MCQhard

Six months into production, a Claude-based claims-triage system shows a slow decline in acceptance of its recommendations, from 82 percent to 61 percent, with no code or model changes. The operations manager asks what to do. Which investigation best addresses the root cause?

A.Segment acceptance by claim type, region, and time, and review samples of recently rejected recommendations with the adjusters who rejected them.
B.Roll back to the model version that was in production when acceptance was 82 percent.
C.Immediately retrain or fine-tune the model on the most recent accepted claims to restore the previous acceptance rate.
D.Report the metric to the steering committee as a normal variance and continue monitoring for another quarter.
AnswerA

A gradual decline without code changes points to drift in inputs, population, or human expectations, none of which a single global metric can reveal. Segmenting isolates where the drop concentrates, and reviewing rejected samples with the people who rejected them surfaces the actual failure mode, whether new claim patterns, stale reference data, or shifting adjuster judgement.

Why this answer

When a stable system degrades without code or model changes, the likely drivers are input drift, population change, or evolving human judgement. Segmenting the metric localizes the problem, and reviewing rejected recommendations with the adjusters reveals the mechanism behind each rejection. Retraining, rolling back an unchanged version, or passively monitoring all bypass that diagnosis and either risk worsening the issue or prolonging it.

Exam trap

The trap here is reaching for a model-side remedy such as retraining or rollback when the absence of code and model changes makes an input, population, or human-judgement cause far more likely.

479
MCQmedium

An engineering team is building a customer support agent using Claude Sonnet 5.5 and the Messages API. The initial proposal includes a generic `execute_sql_query` tool that takes raw SQL statements generated by Claude to query user accounts and issue refunds. Why does this design violate the principle of least privilege, and what is the proper architectural remediation?

A.The tool schema lacks temperature bounds; set `temperature` to 0 in the tool definition to lock generated SQL syntax.
B.The Messages API rejects SQL strings; wrap query text inside base64 encoded document content blocks instead.
C.Raw SQL causes excessive token consumption; set `output_config.effort` to low so Claude generates shorter query strings.
D.Raw SQL allows arbitrary database access if prompt injection occurs; replace it with domain-specific tools with strict JSON schemas.
AnswerD

Exposing arbitrary database execution enables severe vulnerability to indirect prompt injection. Architecting tightly bounded, domain-specific tools with explicit JSON schemas (and `strict: true` validation) ensures the agent can only invoke predefined backend endpoints using validated, parameterized inputs.

Why this answer

Providing an agent with a broad execution tool like `execute_sql_query` grants excessive capability and breaks least-privilege principles. If the agent encounters indirect prompt injection within customer text or untrusted documents, an attacker could manipulate the generated SQL to exfiltrate database records or alter unauthorized table rows. The architectural standard is to provide highly specific, granular tools with strict JSON schemas and bounded parameters (e.g., `get_account_details` or `request_customer_refund`).

This limits tool side-effects and allows deterministic authorization checks on specific arguments.

Exam trap

Candidates often believe system prompt instructions restricting SQL keywords (e.g., 'Do not run DROP or UPDATE') provide adequate security for open-ended execution tools.

480
MCQhard

Your enterprise uses Claude Sonnet 5.5 with prompt caching to process large legal documents. An auditor notices that cache_read_input_tokens are appearing in the logs but wants to confirm that these tokens were not processed as new input. How do you explain the audit logs to the auditor?

A.Inform the auditor that these logs are system-level artifacts and do not represent actual token consumption or processing events.
B.Show that the total input cost is calculated by summing input_tokens and cache_read_input_tokens, confirming no data was missed.
C.Point to the separation of input_tokens and cache_read_input_tokens as proof that the cached prefix was reused rather than re-processed as new input.
D.Explain that cache_read_input_tokens represent a fallback process where the model re-reads the cache to ensure data integrity.
AnswerC

The API usage object clearly separates new input (input_tokens) from cached input (cache_read_input_tokens). This separation is the definitive audit proof that the cached tokens were handled as a reuse operation, confirming that the system is operating as designed and that the cached prefix was not treated as new input.

Why this answer

Prompt caching is designed to optimize costs and latency by reusing a prefix of the input. In the API response, usage.input_tokens reflects only the non-cached (new) tokens, while cache_read_input_tokens explicitly reports the tokens retrieved from the cache. By showing the auditor these two separate fields, you can prove that the cached portion was not re-processed as new input, thereby demonstrating both cost efficiency and adherence to the data processing architecture described in the system design.

Exam trap

Candidates often think that cache_read_input_tokens are somehow suspicious or redundant, failing to see them as proof of efficiency.

481
MCQmedium

An enterprise is building an AI agent that accesses internal databases. They are concerned that a malicious user might use 'prompt injection' to trick the agent into revealing database credentials stored in the system instructions. What is the most effective safety practice to prevent this?

A.Use tools to access database information, ensuring that credentials are managed by the environment and never included in the prompt.
B.Use a specialized system prompt that includes a 'no-reveal' clause to strictly forbid the model from outputting database credentials.
C.Encrypt the system prompt using a standard algorithm to hide the credentials from the model and the user.
D.Set the model to 'high' effort to ensure it can better distinguish between user instructions and malicious injection attempts.
AnswerA

Keeping credentials out of the prompt is the single most important step to prevent their exposure via prompt injection. By using tools, the agent interacts with data through secure, authenticated channels. This architecture ensures that even if a user attempts an injection attack, there are no secrets for the agent to reveal.

Why this answer

The most effective practice is to follow the principle of least privilege by using tools to fetch database information rather than including credentials or sensitive data directly in the prompt. By using tools, the agent interacts with APIs that have their own authentication and authorization, keeping secrets out of the prompt context entirely. Additionally, validating all tool inputs and outputs ensures that the agent cannot be manipulated into performing unauthorized actions even if a user provides malicious instructions.

Exam trap

Candidates often suggest putting secrets in an encrypted system prompt or using a specific model version, neither of which prevents prompt injection.

482
MCQmedium

You are the lead architect for a Claude-based claims triage assistant at an insurance company. Two weeks before the pilot goes live, the Head of Compliance asks how they will be able to demonstrate, months later, which version of the system prompt and which model snapshot produced a given claim recommendation. What should you implement to meet this requirement?

A.Version the system prompt in Git and tag each release, then tell Compliance that the tag history is the authoritative record of what was deployed.
B.Emit a structured audit record per recommendation containing the model snapshot ID, system prompt version hash, parameters, and a request identifier, and store it immutably.
C.Rely on the Anthropic Console usage logs, which retain every request and response for the account and can be queried retroactively by claim ID.
D.Enable extended thinking on the triage calls and archive the returned thinking blocks alongside each claim recommendation.
AnswerB

A per-recommendation audit record that pins the model snapshot identifier, a hash of the exact system prompt version, the inference parameters, and a unique request identifier gives Compliance a deterministic way to reconstruct the configuration behind any past decision. Immutable storage preserves that evidence for the retention period the regulator expects and supports point-in-time reconstruction months later.

Why this answer

Compliance needs retrospective, per-decision traceability, which requires capturing execution metadata at inference time: the model snapshot identifier, a hash of the system prompt version, the parameters used, and a correlation identifier tied to the claim. Immutable storage keeps that evidence tamper-evident and queryable months later. Reasoning traces and repository tags describe intent or internal deliberation but never bind a specific recommendation to the exact deployed configuration.

Exam trap

The trap here is assuming that prompt version control in a repository, or model reasoning traces, constitutes an audit trail for individual production decisions.

483
MCQmedium

An enterprise operating a legal document analysis system notices that an API call to Claude Sonnet 5.5 failed with an unexpected HTTP response status code during a network disturbance. In accordance with operational incident management standards, which HTTP status code represents an overloaded Anthropic API service that SHOULD trigger automatic retry logic?

A.HTTP 403
B.HTTP 400
C.HTTP 413
D.HTTP 529
AnswerD

HTTP 529 indicates that Anthropic's API infrastructure is temporarily overloaded. Standard incident response frameworks and Anthropic SDKs explicitly treat 529 responses as retriable server-side errors that should be retried automatically using exponential backoff.

Why this answer

Under standard Claude API operational behavior, HTTP status code 529 indicates that the API service is temporarily overloaded. Official Anthropic SDKs and well-architected API clients automatically retry 529 errors (along with 408, 409, 429, and standard 5xx server errors) using exponential backoff.

Exam trap

Confusing 529 (overloaded, retriable) with 429 (rate limited) or misclassifying non-retriable 4xx client request errors as temporary service overloads.

484
MCQhard

Your financial services firm is concerned that the Claude-powered loan pre-screening agent might be disproportionately rejecting applicants from certain geographic regions. You need to implement a continuous monitoring strategy. What is the most effective way to detect this bias?

A.Enable prompt caching to ensure that the model receives the exact same system prompt, preventing variance in decision-making logic that could cause bias.
B.Configure the system prompt to require the agent to justify its rejection decision, and then parse this justification for geographic mentions.
C.Use the Files API to store all incoming loan applications and perform a manual review of every tenth application to check for geographic bias.
D.Implement an asynchronous monitoring pipeline that aggregates agent decisions and performs statistical parity tests across demographic and geographic segments.
AnswerD

Aggregating decisions and running statistical parity tests across segments measures disparities in rejection rates directly, which is what systemic bias looks like at scale. Running this analysis asynchronously keeps it out of the loan-processing critical path.

Why this answer

The most effective method for detecting bias in a production agent is to implement a secondary, asynchronous evaluation loop. This involves logging inputs and outputs, then running them against a secondary, specialized model or a deterministic evaluation script that checks for disparities in rejection rates across protected or sensitive geographic segments. This approach allows you to identify trends in model behavior that might not be visible in individual transaction logs, ensuring compliance and fairness without impacting the latency of the primary user-facing workflow.

Exam trap

Confusing real-time PII redaction with post-hoc bias monitoring; they serve different purposes and operate at different stages of the request lifecycle.

485
MCQmedium

An architect is designing an audit logging strategy for a system using Message Batches for large-scale data classification. They need to ensure that every batch result is correctly mapped back to the original input for audit purposes. What is the most effective way to achieve this?

A.Configure the batch result storage to enable automatic correlation with the input file.
B.Include the original document ID in the system prompt for every request within the batch.
C.Use the batch creation timestamp to order the results and match them to the input sequence.
D.Assign a unique custom_id to each request and store the mapping to the source data in your internal system.
AnswerD

The custom_id is the primary mechanism for correlating batch results with original inputs. By managing this mapping in your own database, you ensure that every classification result is accurately traced back to the source, providing a robust audit trail for high-volume processing tasks.

Why this answer

The Message Batches API requires a custom_id for each request, which must be unique within the batch. This custom_id is returned with the result, allowing the architect to programmatically link the model's output back to the specific source document or classification task. By storing this mapping in an internal database, the architect creates an immutable link between the input data and the AI-generated result, satisfying the requirement for traceability in automated processing workflows.

Exam trap

Candidates might try to use the 'metadata' field to correlate requests, but the custom_id is specifically designed for this purpose in batches.

486
MCQmedium

Your organization is transitioning from a legacy rule-based system to a Claude-based solution. A key stakeholder is worried about 'loss of control'. How do you address this during a steering committee meeting?

A.Tell them that the model is smarter than the rules and they should trust it.
B.Propose an evaluation framework that includes both automated guardrails and a human-in-the-loop review process.
C.Suggest keeping the legacy system running in parallel indefinitely to avoid the issue.
D.Ignore the concern as it is purely emotional and not based on technical facts.
AnswerB

This strategy directly addresses the 'loss of control' by incorporating structured oversight. By implementing both programmatic guardrails and human review, you provide a tiered control mechanism that bridges the gap between legacy reliability and modern AI capability, satisfying stakeholders' need for accountability while enabling the benefits of LLM-driven automation.

Why this answer

Address the fear of 'loss of control' by highlighting the architectural layers of governance available in modern AI. By explaining concepts like system prompts, output schemas, and automated evaluation frameworks, you demonstrate that control is not lost but rather evolved from static rules to dynamic, verifiable constraints. This helps stakeholders understand that modern AI architectures offer robust mechanisms for oversight, maintaining alignment with corporate compliance and quality standards.

Exam trap

Candidates often try to defend the model's intelligence, failing to realize the stakeholder needs to see concrete governance mechanisms like guardrails and human-in-the-loop processes to feel secure.

487
Multi-Selectmedium

Which TWO metrics are most effective for communicating the 'value' of an Anthropic model deployment to executive stakeholders?

Select 2 answers
A.Total number of tokens processed per day.
B.Reduction in manual processing time per task.
C.Improvement in task accuracy over baseline.
D.The number of prompt iterations performed by developers.
E.The model version number currently being utilized.
AnswersB, C

Quantifiable time savings are a direct indicator of improved operational efficiency. This is a metric that executives can easily link to cost savings or increased capacity, making it a powerful tool for demonstrating the return on investment and justifying the continued use and expansion of the AI implementation.

Why this answer

Executives prioritize impact on the bottom line and operational efficiency. Measuring time-to-value (or time saved) and error reduction rates provides quantifiable proof of success. This is essential for ongoing funding and resource allocation, as these high-level metrics demonstrate that the AI investment is delivering tangible business results beyond just technical throughput or token usage statistics.

Exam trap

Candidates often choose technical metrics like 'token usage' or 'latency,' which do not resonate with executive stakeholders who are primarily interested in business efficiency and ROI.

488
MCQmedium

A team wants to transition from a proof-of-concept to a production environment. Which task should be prioritized for operational readiness?

A.Hardcode the highest possible system prompt complexity.
B.Implement structured logging and automated evaluation pipelines.
C.Switch to a private, self-hosted version of the Claude model.
D.Remove all caching mechanisms to ensure real-time data accuracy.
AnswerB

Production readiness hinges on visibility and validation. Structured logging provides the data needed for debugging, and automated pipelines ensure that changes do not introduce regressions. These are essential components of a mature, reliable AI service, allowing developers to maintain high standards of quality and performance throughout the production lifecycle.

Why this answer

Implementing automated monitoring, logging, and robust error handling is the priority for moving to production. While prototyping focuses on functionality, production focuses on reliability, observability, and security. By establishing these foundations early, teams prevent operational debt and ensure that their AI systems can be maintained and scaled effectively as they grow, which is critical for long-term project success and developer support.

Exam trap

Candidates often prioritize model fine-tuning or prompt optimization for production, ignoring that observability, logging, and evaluation pipelines are the actual prerequisites for maintaining a reliable production system.

489
Multi-Selecthard

You are migrating a critical summarization service to a new model tier. To ensure the 'evals as contracts' approach remains valid during this transition, which TWO actions should you perform to validate the change against existing success criteria?

Select 2 answers
A.Ask stakeholders to manually approve a small subset of outputs to confirm the model feels correct.
B.Switch to a higher effort setting to ensure the new model matches the previous one's performance.
C.Analyze the distribution of stop_reasons and refusal rates in the new model compared to the previous model.
D.Run the established test set through the new model and compare the output metrics against the historical baseline.
E.Update the system prompt to explicitly instruct the new model to perform better than the previous one.
AnswersC, D

Changes in model behavior often manifest as differences in refusal rates or stop_reasons. Monitoring these metrics ensures that the new model's safety profile and handling of edge cases are consistent with the established contract, preventing unexpected service degradation that would violate the agreed-upon performance criteria.

Why this answer

When transitioning models, the existing evaluation suite acts as the contract for performance. Running the existing test set against the new model allows you to compare results directly. By analyzing the delta in output quality and checking for regressions in specific categories (e.g., adherence to formatting or hallucination rates), you ensure the new model meets the established baseline before full deployment.

This is the core of governance: treating the test suite as the source of truth for the service's contract.

Exam trap

Candidates might assume that simply checking for API errors or latency is sufficient to validate a model migration, ignoring the change in reasoning capabilities.

490
MCQmedium

Your organization is investigating a security incident where a production Claude Sonnet 5.5 agent leaked sensitive information into its reasoning trace. You need to purge the affected conversation context to prevent further leakage. How do you effectively clear the context?

A.Wait for the 5-minute cache TTL to expire, which will purge the conversation from Anthropic's servers.
B.Stop including the messages containing the sensitive information in the next API request.
C.Use the context editing (beta) feature to delete the specific messages from the server's cache.
D.Send a /clear command in the next Messages API request to reset the conversation state.
AnswerB

The Messages API is entirely stateless. The model's context is defined solely by the messages you send in the current request. By omitting the previous messages that contained the sensitive data, you ensure that the model has no access to that information in subsequent calls, which is the correct way to clear context.

Why this answer

In the stateless Messages API, the client must send the full conversation history with every request. To clear the context, you must stop sending the previous messages that contain the sensitive information in a new request. Using the /clear command is not applicable here, as that is a feature of the Claude Code CLI, not the Messages API.

By resetting the conversation list to only the necessary system prompt and the current user input, you effectively ensure the model no longer has access to the leaked data from previous turns, as no server-side 'memory' persists unless you explicitly provide it in the input.

Exam trap

Candidates often assume there is a server-side command to 'clear' or 'purge' an API session, which does not exist.

491
MCQmedium

You are building a contract-based evaluation framework for an automated document classification pipeline. To ensure the 'success criteria' function as a reliable contract between the business stakeholders and the engineering team, what is the most effective approach to defining these criteria?

A.Delegate success criteria definition to the end-users who will provide feedback during the beta testing period.
B.Create a static test set of representative inputs and define programmatic success thresholds that must be met before any production deployment.
C.Set the success criteria to match the performance metrics of the current human-led process, regardless of the model's capabilities.
D.Define success criteria as a set of high-level business goals that the model must achieve during a two-week pilot phase.
AnswerB

A static test set with programmatic thresholds provides a concrete, binary contract. It ensures that both stakeholders and developers have an objective baseline for performance, allowing for automated regression testing and clear sign-off before moving from development to production environments.

Why this answer

Effective success criteria act as a contract by being measurable, versioned, and tied to specific test sets that stakeholders have formally approved. By defining these criteria using code-based or model-based evaluators against a representative test set, you move from subjective 'vibe checks' to objective performance metrics. This allows both parties to agree on what constitutes 'production-ready' and provides a clear mechanism for regression testing when the model or the prompt is updated in the future.

Exam trap

Candidates often suggest vague, qualitative criteria like 'user satisfaction' or 'high accuracy' without defining the measurable test set or the specific evaluation pipeline that enforces the contract.

492
MCQhard

Your organization uses Message Batches for large-scale data classification. You discover that some batches contain sensitive PII that should have been redacted. How should you handle the risk of PII leakage in future batches?

A.Use the metadata field in the Message Batches API to tag requests containing PII for special handling by the provider.
B.Implement a preprocessing pipeline to redact or mask PII from the input data before submitting the Message Batches.
C.Instruct the model in the system prompt to ignore and redact any PII it encounters in the input messages.
D.Rely on the organization's zero data retention arrangement as the only control, since it means no PII is stored by the provider.
AnswerB

Sanitizing input data before it reaches the API is the only way to guarantee that PII is not processed or stored by the model. By masking or redacting sensitive fields in your internal pipeline, you ensure that the model receives only the necessary, non-sensitive data, effectively eliminating the risk of PII leakage.

Why this answer

The most effective strategy is an automated redaction or masking step in the data pipeline that runs before requests are submitted to the Message Batches API. The API does not inspect content for PII, so the application must sanitize the input to meet its compliance requirements. This keeps sensitive information from ever reaching the model, while batch processing stays as efficient as before.

Retention arrangements and prompt instructions can complement this control but cannot replace it.

Exam trap

Candidates might suggest enabling zero data retention as the primary fix, but that only addresses storage, not the processing of PII in the prompt itself.

493
MCQeasy

You are preparing a kickoff briefing for a business unit adopting a Claude-based internal knowledge assistant. The sponsor asks what they should expect in the first 30 days. Which framing best sets accurate expectations and supports lifecycle alignment?

A.The first 30 days will be spent negotiating the final contract and procurement terms before any technical work begins.
B.The system will reach full production quality immediately because Claude is a pre-trained foundation model.
C.The first 30 days will deliver a fully tuned model fine-tuned on the business unit's proprietary corpus.
D.The first 30 days will focus on use-case validation, data readiness, evaluation baselines, and defining success metrics with the sponsor.
AnswerD

Positioning the first month around validation, data readiness, and measurable baselines gives the sponsor a realistic picture and creates shared criteria for success. It also sequences the work correctly: without clean source data and an agreed evaluation approach, no amount of prompt tuning produces dependable answers. This framing turns the kickoff into a joint commitment rather than a vendor promise.

Why this answer

A credible first-30-days plan centers on validating the use case, assessing data readiness, establishing evaluation baselines, and agreeing on success metrics with the sponsor. This is honest about what determines outcomes and creates shared accountability. Claiming instant production quality, deferring all work to procurement, or promising a fine-tuned model each sets expectations the engagement cannot reliably meet.

Exam trap

The trap here is equating a capable foundation model with immediate production readiness for a specific organization's data and workflows.

494
MCQmedium

An organization is using the Message Batches API to process 100,000 customer support transcripts for PII and sensitive data. During the design phase, the architect is concerned about how to handle the API keys used by the redaction script. What is the most secure way to manage these keys in a batch processing workflow?

A.Embed the keys in the system prompt of the batch request so the model can use them to sign the redacted output.
B.Use environment variables in the local script that submits the batch and processes the results upon completion.
C.Rely on the Message Batches API's built-in 'vault' feature to automatically manage third-party service credentials.
D.Include the keys in the 'custom_id' field of each batch request to ensure they are available when processing results.
AnswerB

This follows standard secure development practices. The script that interacts with the Anthropic API retrieves its own necessary secrets from a local secure store (like environment variables). The LLM itself remains unaware of these keys, and they are never transmitted as part of the batch request or result files.

Why this answer

In a batch processing workflow, the actual LLM call (via the Message Batches API) is asynchronous. The secrets used for the broader workflow (like keys for a database or a downstream redaction service) should reside in the environment where the batch creation and result-retrieval scripts are running. These keys should never be included in the 'custom_id' or the 'messages' array sent to the Anthropic API.

By keeping the secrets in the orchestration layer, the architect ensures that the sensitive credentials are never transmitted to or stored within the Anthropic batch processing system.

Exam trap

Thinking that because batches are 'offline' and cheaper, they are inherently more secure for secret storage.

495
MCQmedium

A business unit is using a deprecated model version that is no longer listed in the Models API. They report that their application has stopped working. What is the most appropriate architectural response?

A.Submit a support ticket to request access to the retired model for an additional transition period.
B.Modify the API request to use a generic model identifier if available in the documentation.
C.Advise the team to perform a formal evaluation of current models, select a successor, and update the application code.
D.Identify which model was previously used and attempt to use a similarly named model from the current list.
AnswerC

Following a formal evaluation and migration process is the only reliable way to restore service while ensuring that the new model meets the requirements of the business unit, minimizing the risk of regressions or unexpected behaviors post-migration.

Why this answer

When a model is retired, the API will no longer accept requests using that model ID. The only path forward is to migrate the application to a currently supported model. To do this safely, you must first assess the application's requirements, choose the appropriate current model (Haiku, Sonnet, or Opus), and validate its performance using your evaluation framework.

This prevents simply 'swapping' the model and hoping for the best, which is a common cause of production failures after a forced migration.

Exam trap

Candidates might suggest trying to 'force' the request or searching for legacy documentation, which ignores the reality of API model retirement.

496
MCQeasy

A new engineer joins a team building a Claude-powered support triage tool. She wants to iterate quickly on prompt wording without redeploying the service, but the team also needs every prompt change to be auditable and reversible. Which practice best supports both goals?

A.Keep prompts in a shared document that the engineer edits freely, and copy the current text into the service configuration manually before each release.
B.Hard-code the prompt as a string literal in the application source and require a full deployment for every wording change.
C.Allow the engineer to edit prompts directly in the production database with a direct SQL client, keeping no history of prior versions.
D.Store prompts in an external configuration store with version history, and have the application load the active prompt version at runtime with a rollback control.
AnswerD

An external versioned configuration store lets the engineer edit prompts and activate a new version without redeploying, while the version history provides a full audit trail. A rollback control restores a prior version instantly, satisfying both rapid iteration and reversibility for the triage tool.

Why this answer

Externalizing prompts into a versioned configuration store decouples prompt iteration from code deployment while preserving an auditable history and a fast rollback path. The engineer can experiment and promote versions without a build pipeline, and the team can always trace or revert a change, which satisfies both stated goals.

Exam trap

The trap here is equating fast iteration with ungoverned editing, when the real need is speed plus a versioned, reversible record of every change.

497
MCQhard

A multinational insurer wants to quantify how often its Claude-based claims assistant produces outputs that violate its internal tone and fairness policy before it expands the pilot to three new countries. The compliance team needs a repeatable, statistically defensible measurement rather than anecdotal review. Which approach best meets this need?

A.Run a structured evaluation over a stratified sample of representative claims, scoring each output against a written tone-and-fairness rubric with two independent raters.
B.Review the model's system prompt and knowledge sources with legal counsel to confirm the policy language is correctly worded.
C.Monitor the assistant's average response latency and error rate in production dashboards during the pilot period.
D.Ask the pilot's ten claims adjusters to report any tone or fairness problems they notice in daily use.
AnswerA

A stratified sample drawn from representative claims produces a measurable denominator, and a written rubric applied by two independent raters yields inter-rater reliability evidence. This turns policy violations into a rate with confidence bounds, which is precisely the repeatable, statistically defensible measurement the compliance team requires before scaling.

Why this answer

Quantifying violation frequency requires a defined sample, a consistent scoring instrument, and controls for scorer bias. Stratified sampling over representative claims plus a written rubric scored by two independent raters yields a rate with reliability evidence, which is what lets compliance compare countries and justify or reject expansion on evidence rather than impressions.

Exam trap

The trap here is treating user complaints, prompt review, or system telemetry as if they produced a violation rate, when none of them establishes a sample denominator or a consistent scoring standard.

498
MCQmedium

A developer is building an internal tool that uses Claude to answer questions about a large codebase. They want to reduce hallucinations and ensure answers are grounded in the actual code. Which technique should they use?

A.Use a larger context window to include the entire codebase in every prompt.
B.Fine-tune the model on the entire codebase.
C.Increase the model's temperature to encourage more creative answers.
D.Use retrieval-augmented generation (RAG) by embedding the codebase and injecting relevant snippets into the prompt.
AnswerD

RAG grounds the model's responses in retrieved, factual content from the codebase. By embedding the code and retrieving relevant snippets, the prompt includes actual code context, which reduces hallucinations and improves accuracy. This is a standard technique for knowledge-intensive tasks and directly addresses the need for grounded answers.

Why this answer

Retrieval-augmented generation retrieves relevant code snippets and includes them in the prompt, grounding the model's answers in actual code. This reduces hallucinations and keeps responses up-to-date as the codebase evolves. It is more scalable and cost-effective than fine-tuning or stuffing the entire codebase into the context window.

Exam trap

The trap here is assuming that a larger context window or fine-tuning can replace retrieval, when dynamic grounding requires fetching relevant content at query time.

499
MCQmedium

You are documenting how operators should manage Claude Code hooks for a team of developers. A stakeholder asks why you are recommending PreToolUse hooks instead of relying on instructions in `CLAUDE.md`. What is your justification?

A.Instructions in CLAUDE.md are only loaded at session start, whereas hooks are reloaded for every single tool call.
B.Instructions in CLAUDE.md are limited to 128 tokens, making them insufficient for complex operational policies.
C.Hooks provide a deterministic, programmatic gate that prevents specific tool calls, whereas instructions are suggestions the model may choose to ignore.
D.Hooks are required to support the Message Batches API, which does not process instructions from CLAUDE.md at all.
AnswerC

Hooks act as a hard enforcement layer in the application lifecycle. Because they run outside the model's reasoning loop, they are not subject to the same potential for hallucination or instruction-following failure that can occur with prompt-based guidelines. This makes them significantly more reliable for critical operational safety and compliance requirements.

Why this answer

Instructions in `CLAUDE.md` serve as guidance for the model, but they are not deterministic constraints; the model may occasionally disregard them depending on the context or the complexity of the task. In contrast, hooks configured in the settings.json file provide a programmatic, deterministic layer of control. By using a PreToolUse hook, you can intercept specific tool calls before they execute, allowing for automated validation or blocking of risky actions that instructions alone cannot guarantee in all edge cases.

Exam trap

Candidates often assume that system prompts or project memory files are sufficient for enforcing strict operational guardrails, ignoring the non-deterministic nature of model behavior.

500
MCQmedium

A multinational bank runs a Claude-powered assistant that drafts internal credit memos. Auditors require the bank to prove that every generated memo can be traced to the exact human who requested it, the data sources the model retrieved, and the decision it influenced. Which governance capability should the architect implement first to satisfy this requirement?

A.Configure automatic prompt caching to reduce latency and cost for repeated credit memo templates.
B.Deploy a content moderation layer that filters sensitive financial terms before prompts are sent to Claude.
C.Enable structured audit logging that records request identity, retrieved source references, and downstream model output identifiers for each Claude invocation.
D.Set up a dashboard that tracks aggregate token consumption and monthly API spend per business unit.
AnswerC

Structured audit logging captures the requestor identity, the retrieval context, and the output reference together, producing an immutable trace that maps each memo to its origin, sources, and use. This directly satisfies the auditor's demand for end-to-end lineage, whereas the other controls improve security or quality but do not by themselves create the required evidentiary record.

Why this answer

The requirement is evidentiary lineage: for each generated memo, the bank must show the requesting human, the retrieved sources, and the output that influenced a decision. Structured audit logging is the only control that binds identity, retrieval context, and output reference into a reviewable record. Filtering, caching, and spend dashboards address confidentiality, efficiency, and cost respectively, none of which reconstruct the chain of custody auditors demand.

Exam trap

The trap here is assuming that any logging or monitoring already in place satisfies audit traceability, when only logs that correlate requestor identity, retrieved sources, and output identifiers create usable evidence.

501
MCQmedium

Your organization uses prompt caching for a high-volume summarization tool. You are updating the system prompt to include new compliance guidelines. How should you handle your evaluation process for this change?

A.Update the system prompt and rely on existing evaluation results since the model version has not changed.
B.Only re-run tests that are specifically related to compliance to save on evaluation costs and token usage.
C.Re-run the evaluation suite after updating the system prompt to verify that compliance guidelines are correctly followed without degrading summary quality.
D.Deploy the update directly to a small subset of production users and monitor for any negative feedback instead of re-running evaluations.
AnswerC

Re-running the evaluation is the only way to ensure that the new instructions are effective and that the model is still meeting its core objectives. This verification step is critical for maintaining the quality of the output and ensuring that the new compliance guidelines are consistently and accurately applied.

Why this answer

A system prompt change alters the instructions the model works from, so earlier evaluation results no longer describe the system's behavior. Re-run the full evaluation suite to confirm that the new compliance guidelines are followed and that summary quality and tone have not regressed. Treat the updated prompt as a new version that must pass the same gates before release.

Exam trap

Assuming that because the model is unchanged, earlier evaluation results still apply after a system prompt change.

502
MCQmedium

A financial services firm's Claude-powered customer service agent begins generating responses that contain internal account IDs not intended for public view. The incident response team needs to immediately stop the leaks while they investigate the root cause in the prompt chain. Which architectural action provides the fastest and most reliable containment?

A.Implement a deterministic output filter in the application layer to redact patterns matching the account IDs.
B.Increase the 'effort' parameter to 'max' to ensure the model follows safety instructions more closely.
C.Switch the model from Claude Sonnet 5.5 to Claude Opus 5.5 to leverage higher reasoning capabilities.
D.Add a negative constraint to the system prompt specifically forbidding the mention of account IDs.
AnswerA

Implementing a deterministic filter at the application layer is the most reliable containment method. It creates a hard boundary that does not rely on model compliance. This allows the service to stay online if necessary while ensuring that sensitive patterns are physically removed from the response before egress.

Why this answer

In an incident involving data leakage, the fastest and most reliable containment strategy is to use a deterministic gateway or proxy to intercept and block the specific patterns. While updating the system prompt or switching models might eventually work, these are probabilistic and require re-evaluation. A deterministic regex or PII-redaction layer at the application level ensures that even if the model continues to hallucinate or leak IDs, they are stripped before reaching the end user, providing a hard safety boundary during the investigation.

Exam trap

Choosing to update the system prompt as the primary containment measure for a data leak.

Page 6

Page 7 of 7

All pages