CCDV
|
|
Título del Test:
![]() CCDV Descripción: 96 practice questions |



| Comentarios |
|---|
NO HAY REGISTROS |
|
You are starting a new Claude application and have a small set of well-labeled examples that demonstrate the desired output format. You want to use these examples to guide Claude’s behavior. How would you guide the application’s behavior?. Embed the examples in a database and retrieve them at runtime as reference material for the team. Use zero-shot prompting and rely on the model’s general capability to produce the desired output format consistently across all incoming requests. Train a custom model on the labeled examples before deployment so that the application does not need to include the examples in any prompt during operation. Use multi-shot prompting by including the labeled examples in the prompt so Claude can match the desired output format on each request. Your Claude application’s content policy specifies categories of content it should not produce under any circumstance. The application currently has no mechanism to enforce this policy, and content matching these categories is appearing in the application’s output. How would you enforce the content policy?. Enhance the system prompt to contain explicit instructions for the categories to avoid, complete with examples of each category. Treat the strengthened prompt as the primary enforcement mechanism for the application’s content policy across all responses. Remove the content policy entirely and let any output reach users during normal operation, accepting whatever content the application produces in response to incoming traffic. Add deterministic output filtering that checks responses against the content policy before they reach users. Move enforcement to users by asking them to report content policy violations after the violating content has already reached them in the application’s responses. A new Claude model release includes performance improvements for several reasoning tasks but has changed the format of its responses to system prompts that use multi-section instructions. Your application uses multi-section system prompts heavily. Initial evaluation on the application’s actual workload shows the new model performs 8 percent better on reasoning tasks but produces malformed output on roughly 3 percent of requests because of the format change. The team is debating whether to upgrade. How would you decide?. Upgrade and add a downstream validation step that catches the 3 percent malformed output before it reaches users, treating the validation step as the team’s mitigation for the format change. Adapt the application’s system prompt to the new model’s format expectations and re-evaluate, then upgrade only if the adapted prompt eliminates the malformed output while preserving the reasoning improvements. Stay on the previous model permanently to avoid the malformed output rate and any future format changes that subsequent model releases might introduce in the application. Upgrade immediately, because the 8 percent reasoning improvement outweighs the 3 percent malformed output rate across the application’s typical request distribution. Your team’s Claude application has been in production for a year, and the team has decided to formalize its testing strategy. Currently, the team writes ad- hoc tests for individual features but has no overall testing approach. What testing approach would you formalize?. Adopt a test-driven development practice where unit tests are written before each feature is implemented and must pass before code is merged. Define unit tests for individual functions, integration tests for the Claude integration, and end-to-end tests for critical user flows, applied consistently across the codebase. Continue writing ad-hoc tests as features ship and introduce a peer review step to ensure each test adequately covers the feature being released. Define a single testing approach that uses end-to-end tests and apply it consistently across all new features as they are added to the codebase. Your Claude application makes high-volume API calls during business hours and very few calls overnight. The team is concerned about staying within rate limits during peak hours and wants to understand how the Claude API enforces those limits. How would you proceed?. Examine the peak-hour request patterns in your application logs and smooth traffic by distributing requests more evenly across the business-hours window. Assess the average payload size of current API calls and consolidate requests where possible to reduce the total number of calls made during peak hours. Review the API documentation for streaming endpoints and evaluate whether migrating peak-hour calls to streaming reduces exposure to rate limit enforcement. Identify the rate limits, design the application to stay within them during peak hours, and use exponential backoff when limits are reached. You are designing a Claude application that will require structured JSON output for downstream processing. The output schema is well-defined, and downstream systems will reject malformed JSON. Your application design would ... avoid structured output and use free-form text everywhere instead, on the grounds that free-form text is more flexible and handles edge cases better than structured schemas. structure the prompt to request output in a schema that is described in plain English, with downstream systems parsing whatever shape Claude produces. define a clear schema and structure the prompt to request output in that schema, with downstream systems handling any validation needed. define a clear schema, structure the prompt to request output in that schema, and validate Claude’s output against the schema before passing it downstream. Your Claude application produces good responses for typical inputs but struggles with edge cases. You have several labeled examples of edge-case inputs and the desired response for each. You want to use these examples to improve the model's handling of edge cases. What is the best way to use these examples?. Embed the examples in a database for the model to find during inference. Train a custom model on the edge-case examples and deploy that custom model in place of the team’s current Claude integration. Add the labeled edge-case examples to the prompt as few-shot examples so the model can learn the pattern. Tell users to avoid submitting the edge-case inputs to the application by adding warnings in the application’s user interface. The team is debating whether to build a new capability as a custom tool or to use an existing built-in tool that nearly covers the use case but lacks one specific feature. How would you decide?. Review the built-in tool’s documentation and assess whether its existing capabilities are sufficient to cover the use case without any modification or extension. Identify whether the team has previously built similar custom tools and use those precedents to determine which approach is more consistent with the existing codebase. Examine the custom tool option by scoping the implementation effort and determining whether the additional flexibility justifies the development and maintenance cost. Evaluate whether the missing feature can be addressed by extending the built-in tool or warrants a custom tool, then choose accordingly. Your Claude agent’s hooks are currently triggered for every action, which slows down the agent significantly even when actions pose no risk. The team wants to scope hooks more carefully. How would you scope the hooks?. Replace hooks with system prompt instructions on the grounds that prompt instructions can produce the same enforcement effect that hooks produce on the agent’s actions. Scope hooks to only the high-risk actions, such as destructive operations or sensitive data access, and remove hooks from low-risk actions to balance safety with performance. Disable all hooks while the team re-scopes them, treating the period of no hook enforcement as a temporary state during the re-scoping work. Disable the agent during peak hours so the hook overhead does not slow the application down during the busiest periods of the day across the application’s operation. You are running Claude Code as part of an automated continuous integration pipeline. The pipeline needs Claude Code to execute a set of well-defined tasks without prompting for confirmation, and the output needs to be captured for downstream processing. How would you configure the pipeline?. Disable Claude Code’s confirmation prompts globally across all environments so the pipeline runs without interruption from any prompt. Run Claude Code in headless mode with the required permissions configured in settings.json and capture its output for downstream processing. Replace Claude Code with a different tool that does not require any configuration to operate without confirmation prompts in the pipeline. Run Claude Code in interactive mode and have a developer manually approve every confirmation prompt while the pipeline executes its tasks. The Anthropic API deprecated a request parameter that your Claude application uses in approximately 40 places across the codebase. The deprecation notice gives a six-month window before the parameter is removed and recommends a replacement parameter with slightly different semantics. You would respond to the deprecation by ... swapping all 40 call sites in a single change right away to prevent drawn-out migration work that will delay ongoing functioning. migrating all 40 call sites in a single change near the removal date to ensure the deprecated parameter continues to work as long as possible. adding regression tests to cover the parameter’s behavior, then migrating call sites in batches that you validate against regression tests. keeping the deprecated parameter in place while writing a wrapper function around it to insulate the rest of the codebase from the eventual change. Your Claude application’s API keys are stored in a secrets manager. The team is debating whether the same key should be used in development, staging, and production environments. How would you handle the keys across environments?. Use a single development key everywhere on the grounds that production keys are too risky to deploy across the application's three environments during normal operation. Use distinct keys for each environment so a compromise in one environment does not affect the others during normal operation across the application’s lifecycle. Rotate the same key across environments at random intervals on the grounds that random rotation provides isolation between environments without requiring distinct keys. Use the same key across all environments for simplicity and treat the propagation of any compromise as a known operational tradeoff for the team's key management approach. Your team’s Claude agent has accumulated several customizations that bypass the SDK’s defaults, including custom history management, retry logic, and error handling. A new team member has proposed reverting all the customizations to maintain the codebase more easily. The tech lead disagrees and says each customization was added for a reason. How would you advise the team?. Revert all customizations to the SDK’s defaults to standardize the codebase. Decide on each customization individually based on its original reason and the SDK’s current capabilities. Keep all customizations, trusting that the tech lead’s original reasoning is still valid. Migrate the agent off the SDK and rebuild it with a custom loop. A Claude application is occasionally refusing to answer questions that should be in scope, including questions the application has answered correctly in the past. You want to investigate. What is the first step of your investigation?. Identify which questions have been refused and compare them against previously answered questions to determine what changed between the successful and refused interactions. Test whether removing or adjusting those instructions resolves the behavior. Assess whether the refusals cluster around specific input patterns, question types, or time periods by analyzing the distribution of refused requests in the logs. Examine traces of the refused requests to identify what triggers the refusal, whether input patterns, system prompt content, or other context. Your Claude application processes 50-page legal contracts and produces summaries with citation references back to the source. The team is debating whether to send each contract whole or split into smaller pieces. The contracts fit within Claude’s context window. Initial testing shows that whole- document processing produces summaries with stronger cross-section reasoning but occasionally drifts on citation accuracy in later sections. Chunked processing produces stronger citation accuracy per chunk but loses cross-section reasoning. The team has not decided which property matters more. How would you guide the team’s decision?. Assess the cost and latency implications of both approaches against the application’s performance requirements before recommending which processing strategy to adopt. Examine the use cases where cross-section reasoning failures occur and assess whether whole-document processing meets the application’s accuracy requirements across a representative sample of contracts. Review the citation accuracy results from chunked processing and determine whether the loss of cross-section reasoning produces summaries that still meet the application’s quality bar. Identify which property matters more for the application’s actual use case and let that decision drive the chunking approach, then validate the choice against representative contracts. A teammate is reviewing the team’s threat model for a Claude application and has asked you to identify the categories of AI-specific threats that the model should cover. The teammate has already listed traditional web application threats and wants to know what additional categories apply to a Claude application. Which AI- specific threat categories would you add?. Supply chain attacks on the Claude SDK because the SDK itself is the only point of vulnerability that a Claude application introduces beyond traditional web application threats. Network-level denial of service and physical infrastructure attacks, because these categories cover the threats most likely to affect any Claude application in production. Cross-site scripting and SQL injection, because these traditional web application threats apply with equal weight to any application that uses Claude in any way. Prompt injection, data leakage from prompts or context, jailbreak attempts, and unsafe model output that bypasses application controls. A team has deployed a multi-agent system in which a primary agent decomposes user requests and delegates subtasks to three specialized subagents: one for data retrieval, one for analysis, and one for report generation. In production, the team observes that subagents are making redundant tool calls, occasionally exceeding token budgets, and sometimes producing outputs that contradict each other – all of which the primary agent passes along without catching. What is the most appropriate way to address these failures?. Strengthen the primary agent’s management layer to enforce per-subagent tool budgets, validate outputs against a defined schema before passing them forward, and establish explicit handoff contracts between stages. Give each subagent read access to the other subagents’ outputs so they can identify and resolve contradictions without routing back through the primary agent. Add retry logic to each subagent so that when a tool call fails, the subagent retries automatically before escalating – and configure each subagent to log its tool calls and outputs to a shared trace so the team can audit redundancy and contradictions after the fact. Collapse the three subagents into a single large-context model call that handles retrieval, analysis, and generation in one pass. A teammate has asked you to explain when a Skill would be the right choice over an MCP server. The teammate is unsure how the two differ in practice when both can be reused across teams. How would you explain the distinction?. A Skill is preferable for cross-team reuse because it loads more efficiently than an MCP server during normal operation in the team’s typical multi-team workloads. A Skill bundles prompts, scripts, and data into a package the model loads as a unit while a MCP server exposes resources, tools, and prompts through a standard client interface. A Skill and an MCP server are equivalent extension mechanisms that the team can use interchangeably for any reusable capability that needs to be accessible across teams. A Skill is the older mechanism and an MCP server is the newer one, so the team should prefer an MCP server for any reusable capability that the team builds going forward. You are designing a Claude application that will process customer support tickets in two stages: a triage stage that classifies tickets and a response stage that drafts replies. The team is debating whether to use a single Claude call that handles both stages or separate Claude calls for each stage. How would you structure the application?. Use separate Claude calls for triage and response, because each stage has distinct inputs, outputs, and success criteria that benefit from focused prompts. Use a single Claude call for triage and then use a non-Claude rule-based system for response generation, on the grounds that rule-based systems are more reliable for drafting replies. Use multiple Claude calls in parallel that each draft a complete ticket reply, then have a fourth Claude call select the best one to send to the customer. Use a single Claude call for both stages, on the grounds that a single call is cheaper than multiple calls in any production Claude application setup. Your Claude application uses structured output that is consumed by downstream code. The team wants to handle malformed or unexpected output gracefully so it does not crash downstream systems. The best choice for handling this issue would be to ... use the output the model produces and leave schema enforcement to a later phase of production after the application is more complete. apply defensive parsing to handle unexpected fields, missing values, and type mismatches that the downstream code might otherwise crash on. crash on any unexpected output and require manual recovery on affected requests the application handles during normal operation. silently drop any output that does not match expectations so downstream systems do not see the malformed output the application receives from the model. A teammate has asked you to explain why the team’s Claude application is billed for output tokens at a different rate than input tokens. They had assumed the rate was the same for both. How would you explain the difference?. Output tokens are typically billed at a higher rate than input tokens, and cost models for the application should reflect both rates separately. Output tokens are typically billed at the same rate as input tokens, and the apparent rate difference is a billing error to report to Anthropic. Output tokens are typically billed at a lower rate than input tokens, because output tokens are cheaper to produce than input tokens are to process. Output tokens are not billed at all, because cost is determined entirely by the input tokens sent to the model on each request. You are designing an agent that handles a multi-step research task. You want the agent to break the task into smaller pieces, hand each piece to a focused subagent, and consolidate the results. The agent pattern you would apply is ... a single tool- use loop that includes every tool the agent might need across all subtasks. an orchestrator and subagent pattern with specialized subagents assigned to each subtask. a memory pattern that stores the entire research history in advance, before any subtask begins execution. a context-window pruning pattern that drops each subtask’s content after the agent moves on. You are building an agent that needs to call several internal APIs and a database in a structured, repeatable way. Your team has decided to use the Claude Agent SDK rather than build a custom loop. You are setting up the agent’s tool definitions and execution loop. How would you set up the tools and execution loop?. Call the Messages API directly and let the model format its tool calls in plain text. Use the SDK’s tool interface and loop, with conversation history stored in a separate team database. Use the SDK’s tool interface and let the SDK handle the loop, dispatch, and history. Use the SDK’s tool interface and write the loop and history layer in the team’s own code. Your Claude application’s prompt was written months ago and has not been updated. The team has discovered through levels that the prompt produces good results on common cases but underperforms on a specific category of inputs that has grown in volume. How would you respond?. Replace the prompt with a new one aligned to the underperforming category, treating any common-case performance change as a known tradeoff. Tell users to avoid the underperforming category by adding warnings in the application's user interface about handled inputs. Iterate on the prompt to address the underperforming category, validate the change with evals, and continue refining as needed. Add the underperforming category to a separate Claude application with its own prompt so the original prompt does not change. Your Claude application is producing inconsistent outputs for similar inputs, even when using the same model and prompt. You want to debug the issue systematically. Your debugging approach would ... retry every request that produces an unexpected output and log the results to identify whether repeated calls converge on a consistent response pattern. lower the model’s temperature and re-run the inconsistent inputs to determine whether the parameter change reduces output variability across runs. capture full traces of input, system prompt, user messages, model output, and parameters, then analyze the differences between consistent and inconsistent runs. assume inconsistent outputs reflect normal LLM non-determinism and document the variability as an accepted characteristic of the application’s behavior. You are designing a Claude application that maintains user sessions across multi- turn conversations. The product team has asked how the application will handle session lifecycle: when sessions should expire, how state is reset, and how the application avoids carrying stale context into new conversations. How would you design session lifecycle?. Define explicit session expiration rules but rely on users to start new conversations when they want fresh context, with no automatic reset triggers in the application. Define explicit session expiration rules, state reset triggers, and rules for starting fresh sessions so stale context does not leak into new conversations. Define a single short session timeout that applies across all conversations and treat the timeout as the application’s complete session lifecycle mechanism. Define state reset triggers tied to specific application events but apply them across all sessions globally, with no per-session expiration rules. You are reviewing an architectural diagram for a Claude-powered travel-booking system. The diagram shows a top-level component that interprets user requests and three subordinate components that handle flights, hotels, and ground transportation. The top-level component is responsible for routing each request, sequencing the subordinate components, and reconciling their outputs into a final itinerary. The diagram also shows that each subordinate component has its own tool list and own short conversation history that is not shared with the others. Which architectural pattern does this diagram most closely describe?. A manager and supervisor pattern with shared context, where the top-level agent and the subagents all share a single conversation history that grows as the request flows through the system. A manager and supervisor pattern with isolated context per subagent, where the top-level agent coordinates specialized subagents that each maintain their own conversation history and tool list. A retrieval-augmented pattern, where the top-level component retrieves relevant context from the subordinate components' indexed data stores before generating each response. A pipeline pattern, where each component processes the user request in sequence and passes the full conversation history along with the request to the next component in the pipeline. Your Claude application has multi-step workflows where each step’s output is needed only briefly before the agent moves on. The cumulative tool output is filling the context window with content that is no longer relevant. How would you handle the accumulating tool output?. Apply prompt caching to the accumulated tool outputs so the application does not re-pay for the older content on each subsequent step. Keep every tool output in the context indefinitely so the agent has the full record of every step it has executed during the workflow. Switch to a smaller Claude model that processes context more efficiently and treat any quality loss as a tradeoff for the cost reduction. Apply tool output pruning to remove tool outputs that are no longer needed by later steps in the workflow. You are setting up the configuration management approach for a new Claude Code project. Your team will use CLAUDE.md files and settings.json files to control behavior, and you want to make sure changes are tracked and reviewable. The configuration management approach would ... version-control CLAUDE.md alongside the project’s source code and settings.json files in a separate repository from the project’s source code. version-control CLAUDE.md and settings.json files alongside the project’s source code, with changes reviewed through standard pull request workflows the team applies. duplicate CLAUDE.md and settings.json files in multiple repositories to provide redundancy, on the grounds that a single source of truth is risky for project configuration. version-control CLAUDE.md and settings.json files in a separate repository from the project’s source code, so configuration evolves independently from the application code over time. You are deciding between Claude models for a task. The team has identified three relevant tradeoff dimensions: quality, latency, and cost. The right model is the one that ... fits the task’s quality, latency, and cost requirements together, recognizing that improving one dimension typically affects the others. meets the task’s cost target within a defined latency budget, with quality validated against a representative sample of inputs after the model is selected. meets the task’s quality requirements at an acceptable latency, with cost reviewed separately once the quality and latency bar has been established. satisfies the task’s latency requirement first, then evaluated against quality and cost thresholds to confirm the selection is acceptable across all three dimensions. You are building a Claude application that needs to deliver model output to end users as it is generated, instead of waiting for the full response to complete. The Claude API mechanism you would use is ... structured JSON output, which delivers responses only after the model has finalized the JSON shape across the entire response. prompt caching, which speeds up the cost profile of future requests and does not affect the delivery timing of the first response. streaming responses, which deliver tokens incrementally as the model generates them so users see output progressively. the batch API, which delivers full responses after a delay suitable for non-interactive workloads. Your enterprise has a contract with AWS that requires Claude API calls to flow through Amazon Bedrock rather than the direct Anthropic API. Your team is building a new Claude application and is unfamiliar with this constraint. How would you build the application?. Build two parallel implementations of every call, one for the direct Anthropic API and one for Bedrock, and pick the faster one at runtime. Configure the application to invoke Claude through the Bedrock-compatible API path while keeping the application’s logic provider- agnostic. Build the application against the direct Anthropic API and ignore the contractual requirement to route Claude calls through Amazon Bedrock. Build the application against the direct Anthropic API now and migrate to Bedrock in a follow-up release once the team has more experience with the Bedrock API. You are configuring Claude Code for a new project. The team needs to set permissions, default model selections, and environment-specific behavior at the project level so the configuration is consistent across all developers working on the repository. The Claude Code mechanism you would use is ... environment variables that each developer sets on their own machine when working with Claude Code on the project. a shared spreadsheet that lists configuration values for team members to reference and update by hand as the project evolves. the settings.json file, scoped at the project level so the configuration applies consistently across developers and persists with the repository. a system prompt embedded in every Claude Code conversation by each developer at the start of every session in the project. You are building a Claude application that needs to maintain a persistent connection to a service that streams real-time updates. The team is unsure what communication pattern to use. Which communication pattern would you use?. A single long HTTP request the server holds open indefinitely, with no standard websocket framing on the connection. File-based communication where the service writes new updates to disk and the application polls the file system for changes. A websocket, because websockets are designed for bidirectional, persistent, real-time communication between the client and the streaming service. Repeated short-lived HTTP polling requests, where the application opens a new HTTP connection each time it checks for updates. You are designing an agent that handles a complex claim-processing workflow. Each claim moves through fact extraction, eligibility evaluation, and a decision step. The three subtasks have distinct success criteria, and some claims require iteration between fact extraction and eligibility evaluation before a decision can be reached. Which agent pattern would you apply?. A single tool-use loop pattern that gives one agent access to all the tools needed for fact extraction, eligibility evaluation, and decision-making. A graph-based pattern that lets the agent move between subtasks based on the state of each claim, with each subtask evaluated against its own criteria. A linear chain pattern that processes every claim through fact extraction, then eligibility evaluation, then decision, with no return paths between subtasks. A streaming pattern that emits partial decisions as the agent processes each claim, refining the output until a final decision emerges from the stream. The team is debating whether to integrate with the Claude API directly or through a third-party abstraction layer that supports multiple LLM providers. The team has identified that all current and projected use cases run on Claude, no internal customer has requested LLM portability, and the team’s product roadmap does not mention multi-provider support over the next two years. The third-party abstraction would add roughly 15 percent overhead in code complexity and introduce one additional dependency. Which integration approach would you recommend?. The third-party abstraction layer, on the grounds that multi-provider support is valuable for any application as a matter of long-term flexibility across vendors. Direct integration with Claude through its SDK, because no multi-provider need exists and abstraction would add complexity that does not pay off. A custom multi-provider abstraction layer the team builds in-house so that the team controls every part of the abstraction the application uses for its API calls. Both integration paths in parallel, where the application uses each path on different runs to compare which performs better in production over time. You have just shipped a new Claude-powered application to production. The development phase is complete, and the system is now in active use by internal teams. The next phase of work for this system is ... operating and maintaining the system, including monitoring, responding to issues, and planning evolution. handing the system over to a separate operations team that will manage it independently of the development team going forward. retiring the system, since shipping is the final lifecycle stage for any application that reaches production. running a formal post-deployment review that assesses the development phase before the team does any further work on the system. Your team uses Claude Code across multiple repositories. You want the team’s rules and general coding standards to apply to all repositories, and other rules to apply only to specific repositories. The team is currently duplicating instructions across every repository’s CLAUDE.md file. How would you address this?. Use a CLAUDE.md hierarchy that scopes general standards broadly and project-specific context within each repository’s local CLAUDE.md. Stop using CLAUDE.md altogether and ask each developer to configure Claude Code manually for each project they work on. Move all instructions to a separate documentation site that developers consult during Claude Code sessions across all repositories. Use a single repository’s CLAUDE.md as the central source of truth and link to it from every other repository’s CLAUDE.md file. Your Claude application validates structured output but has been treating validation failures as terminal errors. Each validation failure causes the entire user request to fail. The team wants to handle validation failures more gracefully. How would you handle the validation failures?. Tell users that validation failures are unavoidable and instruct them to perform manual accuracy checks before relying on outputs. Disable output validation until the underlying cause of validation failures has been identified and addressed in a future release. Treat validation failures as a recognized error path that triggers retry, repair, or fallback logic before failing the user request. Pass validation failures directly to downstream systems and let each downstream system decide how to handle the malformed output. Your Claude agent has access to a tool that retrieves customer records. A teammate has noticed that the agent occasionally calls the tool with arguments the schema does not declare, and the tool’s downstream service returns an error each time. The teammate proposes loosening the schema so the tool accepts whatever arguments the model produces. How would you respond?. Remove the schema entirely and rely on the downstream service to reject invalid calls, treating the downstream service as the team’s primary enforcement layer. Loosen the schema as the teammate proposed so the downstream service receives every call the agent makes during normal operation. Add a system prompt instruction telling the model to produce schema-conforming arguments, treating the prompt instruction as the primary mechanism for keeping the agent’s tool calls valid. Keep the schema strict, validate arguments before dispatching, and return a structured error so the agent can retry. A teammate has submitted a pull request that adds a Claude-powered feature to your service. The code works, but the prompt and model selection are hard-coded inline, error handling is missing, and there are no tests for the integration. What would you request during code review?. Request changes that move prompt and model configuration to a configurable location, add error handling for Claude API failures, and add tests for the integration. Request changes that move prompt and model configuration to a configurable location and add tests, treating the missing error handling as a follow-up release item. Approve the pull request and add the missing pieces yourself in a follow-up commit so the teammate can move on to other work immediately. Approve the pull request as-is, on the grounds that the feature works in the happy path and the missing pieces can be added in follow-up commits. The product team has described a new Claude feature in business terms: “agents should help our analysts produce client memos faster.” You need to convert this into actionable technical requirements for the engineering team. Your first step would be to ... ask the analysts about the current memo production process to see where they think Claude could be introduced as a prompt-driven drafting step. examine what model capabilities and tier options are available and determine which best supports the memo drafting workflow described by the product team. assess what similar agent-based features have been built internally or in the industry and use those precedents to scope the technical approach. interpret the functional and infrastructure requirements implied by the business goal. You are writing a system prompt for a Claude application that needs to produce output in a specific JSON shape. The downstream system will reject any output that does not match the schema. Your prompt would need to ... omit any reference to the format and rely on a post-processing step in the application to reshape Claude’s output. instruct Claude to return JSON sometimes and free text other times so the application's output captures both formats. include explicit constraints describing the required JSON schema and an instruction to produce only output matching that schema. instruct Claude to use whichever output format it considers most appropriate for each request the application handles. A teammate has asked why your Claude application sometimes produces a response that includes the prompt text repeated back, and other times produces a response with the prompt text rephrased. They suspect a bug in the application’s request construction. How would you respond?. Explain that LLMs generate output token by token, and variation in how prompt content appears in output is a property of generation, not a bug in request construction. Confirm that the variation is a bug in the application’s request construction and start investigating which part of the application is producing the inconsistent prompt text. Tell the teammate that the variation depends on which Claude model serves the request, and recommend pinning the application to a single model version to make the output behavior consistent. Tell the teammate that the variation is caused by the application sending two different prompts on different runs and propose a code change that pins the system prompt to a single version. A Claude application is producing outputs that drift away from the expected JSON format after several conversation turns. The first few turns produce correctly formatted output, but later turns gradually lose structure. How would you address the drift?. Truncate every response to the first few characters, validate that the truncated output matches the expected JSON structure, and log any mismatches for review. Identify the failure mode as format drift, examine how the conversation context evolves over turns, and address the drift through context management or output validation. Switch to a smaller Claude model and re-test the application to determine whether the drift persists across conversation turns. Restart the application after every turn and monitor whether the format remains consistent across subsequent interactions. You are choosing between using STDIO-based communication and HTTP-based communication for an MCP server. The server will be invoked by a Claude Code session running locally. Which communication pattern would you use?. HTTP on the grounds that HTTP is preferable to STDIO in any context the application might encounter during normal operation. HTTP polling against the MCP server, treating HTTP as a substitute for the standard MCP communication patterns. STDIO and HTTP simultaneously for redundancy, with the team running two communication patterns at the same time across Claude Code sessions. STDIO because STDIO is well-suited to local process communication and avoids unnecessary network setup. A teammate has asked you to explain the difference between context engineering and prompt engineering. They have heard the terms used interchangeably and are unsure how each applies to a Claude application that processes long-running multi- step tasks. How would you describe the distinction?. Prompt engineering focuses on the model's response, while context engineering focuses on the user’s input across many sessions in a long-running multi-step Claude application. Prompt engineering and context engineering each address content the team gives Claude, but the team can group them under a single workflow because the practices use overlapping techniques. Prompt engineering is the older term for prompt design, while context engineering is the newer term that has replaced it in modern Claude applications across the industry. Prompt engineering shapes individual prompts for specific outputs, while context engineering manages how content flows across turns and steps and takes steps to keep relevant state visible. The Claude application your team built has grown over six months, and the prompt- handling code has accumulated duplication and tangled control flow. The functionality is working, but new features are getting harder to add. How would you address this?. Move all the prompt-handling code into a single large function to reduce the number of files developers have to navigate when reading the code. Continue adding features and plan a refactoring pass after the next two release cycles when the team has more bandwidth for internal work. Plan a refactoring pass to consolidate duplicated logic, separate concerns, and simplify control flow before adding new features. Refactor the prompt-handling code in small increments as part of each new feature ticket, treating the cleanup as a side effect of feature work. You are designing a multi-step Claude workflow where some steps must reason without seeing the full prior conversation history. The team wants to keep specific context isolated to specific steps. The context engineering technique you would use is ... context isolation through subagents or multi-step agentic workflows that scope each step’s context to only what the step needs. using a single global prompt that applies to every step in the workflow no matter what each step is reasoning about during its run. embedding the full prior history in each step regardless of whether the step needs the prior history for its reasoning. augmenting the context with all available content at every step so each step has access to the entire prior history of the workflow during its reasoning. You are explaining to a stakeholder why running the same Claude prompt twice can produce slightly different results. The stakeholder is concerned this means the application is broken. How would you address the stakeholder’s concern?. Tell the stakeholder the variation is caused by Claude being updated continuously by Anthropic, and that switching to a fixed model snapshot will eliminate the variation entirely. Tell the stakeholder the variation comes from network latency and that switching to a faster network connection will produce more consistent results across runs. Tell the stakeholder the variation is a bug that the team will fix in the next release of the application, then create a work ticket to fix the bug. Explain that LLMs are non-deterministic by default due to sampling, and describe how the application handles this through validation, retries, or temperature adjustment. A teammate has asked you to explain why your Claude agent’s tools include detailed descriptions in the tool definition, even when the tool name is already descriptive. The teammate suggests removing the descriptions to simplify the tool definitions. How would you respond?. Agree with the teammate because tool names are sufficient for the model to choose the right tool on every request the agent handles. Explain that the model uses the tool description to decide when to call the tool, and descriptions disambiguate cases where the tool name is not enough. Suggest moving the descriptions out of the tool definition and into a separate documentation file the team maintains so the tool definitions stay short and the descriptions remain available. Suggest replacing the descriptions with example calls embedded in the tool definition, treating example calls as a complete substitute for the prose description. You are setting up a Claude application that will run a mix of multi-turn conversations and one-off requests. You want to use caching techniques to reduce token costs where they apply. A teammate suggests caching the model’s output as well, so the application does not have to make duplicate Claude calls when similar queries arrive. You would apply prompt caching to ... the model’s output, treating the response from each request as cacheable content the application can return on similar future queries. nothing, because prompt caching does not affect cost in any application that mixes multi-turn conversations and one-off requests in a single deployment. only the user’s input portion of each request because user input is the part of the prompt that varies the most across the application's normal operation. the static portions of prompts that are repeated across requests, such as system prompts, instructions, or shared context. Your team is preparing to roll out a configuration change that updates several prompt versions across a Claude application used by multiple downstream systems. The change has already been tested in staging, but the team has not assessed how the prompt change will affect each downstream system that depends on the application’s output. What would you do before rolling out the change?. Document the prompt version changes in the application changelog and proceed with the rollout, treating the staging test results as sufficient evidence of impact across all downstream systems. Limit the rollout to systems that were explicitly included in staging testing, and defer all other downstream systems until a later release cycle. Notify downstream system owners that a change is coming and schedule the rollout for the following week, without conducting a formal impact assessment. Assess the configuration impact on each downstream system before rolling out, and coordinate with downstream system owners as needed. Your Claude agent performs database operations. A recent incident occurred where the agent ran a destructive query that affected production data. The team wants to add deterministic controls to prevent similar incidents. How would you prevent similar incidents?. Add a system prompt instruction telling the agent to be careful with database operations on every request the application handles during normal operation across all incoming traffic. Switch to a higher-capability Claude model on the grounds that a more capable model is less likely to run destructive queries during normal operation across all requests. Run the agent only during business hours when humans are available to monitor its activity, treating the schedule as the primary control mechanism for destructive operations. Add Claude hooks that intercept database operations and apply deterministic checks, such as blocking destructive queries or requiring approval, before the queries execute. Your Claude application receives untrusted input from external sources. The team is establishing how the application should treat this untrusted input. Untrusted input would be ... blocked entirely so the application accepts only trusted input, with no path for legitimate external input the application might process. validated and sanitized before being incorporated into prompts, and treated as data the model should not interpret as instructions. treated identically to trusted input from internal sources, on the grounds that all input the application receives can be handled the same way. routed through a separate Claude application with more lax security controls so the original application does not handle the untrusted input directly. A teammate has asked how to extend Claude Code with a custom Skill that the team can invoke during sessions. The Skill consists of a set of instructions and a few support scripts the team wants Claude to be able to call when the Skill is loaded. Where is the right place to define the Skill?. Define the Skill as a long inline instruction at the top of every CLAUDE.md file in the team's repositories so Claude has access to it on every session. Define the Skill in a personal scratch directory on each developer's machine and load it manually before each Claude Code session that needs it. Define the Skill inside the application's source code as a regular library module and call it from the application code instead of from Claude Code. Define the Skill in a Skills directory recognized by Claude Code, where Claude can discover and load it during sessions for the team's repositories. Your team is choosing how to add a capability to a Claude application. You want to apply the appropriate option, whether built-in tool, custom tool, Skill, or MCP server, based on the use case. You would choose the option that ... is the most familiar to the team based on prior experience with similar capabilities. is the newest available option among built-in tools, custom tools, Skills, and MCP servers. matches the use case's scope, reuse needs, and integration context. is the easiest to build given the team's current development tools and workflows. You are integrating Claude into an application written in Python. The Claude SDK provides a Python client that wraps the underlying REST API. How would you integrate the SDK?. Skip the SDK and embed Claude calls in shell commands invoked from Python, so that the application runs the calls outside the main Python process. Use a different LLM provider's SDK and translate the responses into Claude's API shape so the application can switch providers in the future. Call the REST API directly with raw HTTP requests so the application avoids the SDK's abstraction between the application code and the API. Use the Claude Python SDK and let it handle authentication, retries, and response parsing through its standard documented patterns for Python integrations. You are designing a Claude application that processes user-submitted text. Some of that text could include sensitive information such as account numbers or passwords that the application should not send to Claude. How would you design the application?. Apply filtering at the boundary for the most commonly observed sensitive data patterns and expand coverage to additional patterns based on findings from production monitoring. Define the application boundary explicitly, identify what content can leave the boundary for Claude, and add filtering or redaction at the boundary. Log all user-submitted text before it is sent to Claude and review the logs periodically to identify whether sensitive information is reaching the model. Add a prompt instruction in the system prompt specifying the categories of sensitive information Claude should disregard when processing user-submitted text. You are deciding between deploying a Claude-powered agent on Anthropic's hosted infrastructure or self-hosting under a "bring your own cloud" model in your own AWS account. The agent processes customer data subject to your enterprise's data residency policies, but the team wants to ship quickly and avoid managing infrastructure. Which deployment model would you recommend?. Deploying on Anthropic-hosted infrastructure to meet the team's shipping timeline, and flagging the data residency requirement for a follow-up compliance review after launch. Self-hosting under BYOC to satisfy the data residency requirement, while working with the infrastructure team to reduce the operational overhead of managing the deployment. Deploying on Anthropic-hosted infrastructure while the team drafts a request to update the enterprise data residency policy to accommodate hosted AI deployments. Self-hosting under BYOC for an initial pilot, then evaluating whether to migrate to Anthropic-hosted infrastructure once the agent's data handling patterns are better understood. You maintain a Claude application that uses Claude Sonnet 4.5 across several production workflows. Anthropic released Claude Sonnet 4.7, which your evaluation suite shows performing 8% better on your highest-volume task. However, this version produces different output formatting on two of your structured-extraction prompts that downstream consumers parse with regex-based code. To roll out the upgrade, you would ... switch the model identifier in the application's configuration to the new model, then monitor production for parsing failures to be fixed as failures surface. rewrite the downstream parsing code to accept a wider range of output formats to ensure the application is resilient to future model upgrades without requiring prompt changes. adjust the prompts to constrain output format, re-run evals against the expected parsing layer schema, then roll out the model out with a feature flag and the option to revert per workflow. keep the older model in production to preserve the fragile parsing layer that may risk breaking with any model change. Your Claude application is deployed to development, staging, and production environments. Each environment uses a different model version, different prompt versions, and different plugin dependencies, but the configuration is currently scattered across environment variables, hardcoded values, and undocumented setup scripts. How would you manage the configuration?. Use the latest available model version everywhere and stop pinning model versions, on the grounds that pinning adds maintenance overhead the team should aim to reduce. Move all configuration into hardcoded application code to reduce reliance on external configuration sources that are difficult to track over time. Standardize all environments to use the same configuration values to eliminate the differences between development, staging, and production. Consolidate the configuration into a version-controlled system documenting model version pinning, prompt versioning, and plugin dependencies for each environment. Your Claude application requests structured JSON output from the model. Most of the time the JSON is well-formed, but occasionally Claude returns malformed JSON that breaks downstream processing. How would you handle the malformed output?. Retry the same request repeatedly until valid JSON appears in the model's response, with the retry loop adding delay to the application's response time on affected requests. Switch to free-form text output so the application no longer depends on JSON parsing for any of the responses it sends to downstream systems during normal operation. Manually inspect every response before downstream processing so a human reviewer catches any malformed JSON before the application passes the response to downstream systems. Add output validation that parses Claude's response against the expected schema and treats malformed output as a recognized error path with retry or fallback handling. Your Claude application returns confident-sounding answers, but occasionally those answers contain factual errors that downstream systems treat as ground truth. The team is concerned about the application's confidence-versus-accuracy gap. How would you address the gap?. Reject every response the application produces until a manual accuracy review is conducted on each response by a human reviewer before any downstream system uses it. Apply skepticism toward confident output by adding validation steps, sourcing requirements, or confidence calibration before treating outputs as ground truth. Add a disclaimer to every output telling users to verify the accuracy of the output and treat the disclaimer as the primary mechanism for managing the confidence-versus-accuracy gap. Lower the model's temperature so the model's responses sound less confident and downstream systems are less likely to treat the responses as ground truth in normal operation. A teammate has asked how the Claude SDK handles transient API errors, such as a temporary network issue or a brief rate-limit response. They want to know whether the application code needs to handle every transient error or whether the SDK provides any default behavior. How would you describe the SDK's default behavior?. The SDK provides default retry behavior for transient errors up to a fixed number of attempts and this behavior is not configurable. The SDK logs transient errors to a default error stream and continues execution without retrying, leaving the application code responsible for detecting and responding to failed calls. The SDK provides default retry behavior for many transient errors, and the application code can configure or extend that behavior as needed. The SDK provides default retry behavior for network errors but surfaces rate-limit responses directly to the application code, which must implement its own retry logic for those cases. Your team is preparing a new Claude application for production and the product team has asked for a cost projection. The team needs to estimate the cost based on expected request volume, average input length, and average output length. How would you build the projection?. Build a cost model based on expected request volume and the chosen model's pricing, treating average input and output token counts as variables to be estimated post-launch. Build a cost model that combines expected request volume, average input tokens, average output tokens, the chosen model's pricing, and any caching benefits. Build a cost model that uses the average per-request cost from a similar Claude application the team built last year, scaling that figure by expected request volume. Build a cost model that combines expected request volume and average input tokens, treating output tokens as a small enough share of cost to leave out of the projection. Your Claude application is hitting context window limits when processing long customer service transcripts. A junior developer suggests increasing the temperature parameter to fix the issue. How would you respond?. Increase the temperature parameter as the junior developer suggested and observe whether the context window issue resolves over the next several runs of the application in production. Remove the system prompt entirely to make room for longer transcripts in each request, freeing up context window space the system prompt would otherwise consume. Adjust the temperature parameter together with the max_tokens parameter, treating the combined adjustment as the team's mechanism for managing context window pressure during long-transcript processing. Explain that temperature controls sampling randomness and is unrelated to context capacity, then address the context issue through summarization or chunking. You are designing a Claude application that helps medical researchers analyze multi-step clinical case studies. The application must work through differential diagnoses by considering symptom patterns, weighing evidence across competing hypotheses, and showing intermediate reasoning steps before producing a final recommendation. The team is choosing among Claude's available model options. The model option best suited to this use case is ... a smaller model with a tighter context window, which encourages the model to focus its limited capacity on the task. zero-shot prompting alone with no model option adjustments, which keeps the application's configuration as simple as possible. fast mode, which prioritizes lowest possible latency at the expense of reasoning depth on complex tasks. extended thinking, which lets the model reason through the differential diagnosis steps before producing the final recommendation. A Claude application that worked well in testing is now occasionally returning outputs that mention information not present in the input. The development team initially assumed the model was hallucinating so they asked you to troubleshoot. What would you do first?. Examine production traces to identify whether the issue is hallucination by the model, context loss, prompt injection, or another failure mode before recommending a fix. Add a system prompt instruction telling the model not to invent information, on the grounds that prompt-level instructions are the fastest fix for hallucination concerns. Replace the current model with a larger one to reduce the chance of hallucination, on the grounds that larger models tend to hallucinate less in typical applications. Apply a retrieval-augmented generation pattern to ground the responses in source content before any further investigation of the production traces. Your team is debating how to manage the prompts used in your Claude application. Some prompts are checked into the code repository, some live in a separate configuration file, and some are constructed inline at runtime. The result is inconsistent, and a recent prompt change went out without code review. What steps would you take?. Move all prompts out of version control to a separate spreadsheet that team members can edit freely as the application evolves over time. Establish a single source of truth for prompts, version-control them alongside code, and require code review for prompt changes. Move all prompts to inline runtime construction so the team can update them quickly through a streamlined process outside the standard code review workflow. Establish a single source of truth for prompts but keep change review optional, allowing developers to update prompts directly when changes are urgent. You are building an MCP server that exposes several internal data sources as MCP resources. The server needs to be deployed so multiple Claude applications can integrate with it. How would you approach the build and deployment?. Deploy the MCP server only on individual developer machines, with the Claude applications unable to reach the server outside each developer's machine. Bypass the MCP server and embed each data source directly in every Claude application that needs the data, with each application maintaining its own integration. Author the server with clearly defined resources, tools, and prompts, choose a communication pattern, and deploy to an accessible hosting environment. Build the MCP server with resource and tool definitions scoped to the first Claude application that needs it, and extend the definitions to additional applications as each integration is requested. Your Claude application runs long agentic workflows where the agent makes many tool calls, and the conversation history grows quickly. After about 20 tool calls, you notice the agent's responses become less focused and sometimes ignore earlier task constraints. How would you address this?. Remove tool calling from the workflow entirely so the agent operates as a single text-generation step with no tool outputs accumulating in the context window. Apply context engineering techniques such as tool output pruning or compaction to keep the active task state visible while reducing the volume of older content. Restart the agent every five tool calls to prevent any drift, with the agent losing all task state at each restart point during the workflow. Increase the model's context window so the agent can hold every tool output at full detail across the entire workflow no matter how many tool calls it accumulates. Your application uses the Messages API to handle multi-turn conversations. Each new turn resends the entire conversation history, and your token costs are growing as conversations get longer. You suspect there is a more efficient approach. How would you address this?. Summarize each conversation after every turn and replace the full history with the summary on the next request, reducing token count at the cost of fidelity. Truncate every conversation to the last two messages so that token usage stays low and costs remain predictable across the application's normal operation. Use prompt caching to reuse the static portions of the conversation context across turns instead of paying for them on every request the application sends. Switch to the batch API for every turn so the per-call cost is reduced, treating the batch as the team's primary cost-control mechanism for multi-turn work. Your team uses several plugins across multiple Claude applications, and a recent plugin update introduced a regression. The team had not been tracking plugin versions, so the team cannot easily identify which version was previously working. How would you address this?. Upgrade every plugin to the latest version on a regular cadence to keep version drift small, on the grounds that drift contributes to regression risk. Treat plugins as untrackable third-party code and rely on plugin authors to communicate breaking changes when they happen, with no internal version tracking. Add explicit plugin version tracking to the project's configuration so the team can identify, pin, and upgrade plugin versions deliberately. Stop using all plugins until the team can rebuild equivalent functionality directly into the application code, treating plugin avoidance as a way to remove version-related risk. You are setting up Claude Code for a new project repository. Your team has shared coding standards, preferred libraries, and project-specific context that every developer working on the repository should have available when they use Claude Code. How would you set this up?. Configure Claude Code through environment variables that each developer sets on their own machine when they begin working in the repository. Document the standards in a separate wiki page maintained outside the repository so the documentation stays decoupled from the source code. Initialize Claude Code in the repository and document the standards and project- specific context in a CLAUDE.md file at the repository root. Add the coding standards and project context to the repository's existing README file and direct developers to reference it when starting Claude Code sessions. Your Claude agent has too many tools, and many of them have overlapping functionality. The agent often picks an inappropriate tool when several could plausibly handle a request. How would you address the tool selection problem?. Restructure the tool set by consolidating overlapping tools, removing unused tools, and clarifying tool descriptions so each tool has a distinct purpose. Add more tools to cover every variation of the requests the agent handles, on the grounds that more tools give the agent more accurate options to choose from. Add detailed examples to each tool's description so the agent can match incoming requests to the right tool by example, treating the examples as the team's selection mechanism. Remove all tools and rely on the agent's general capability instead, with the application losing the workflows that previously relied on tools. Your Claude application uses tool calling to fetch patient data and generate summary reports. The flow occasionally fails because the model returns a tool_use block that references arguments not present in the schema, and your application code does not handle this case gracefully. How would you address this?. Stop using tool calling entirely and replace tools with prompted text generation that asks the model to describe what it would do. Validate the tool_use block's arguments against the tool schema before dispatching the tool and handle invalid arguments as a recognized error path. Log invalid tool_use blocks when they occur and allow the tool dispatch to proceed, relying on the tool's own error handling to surface failures back to the application. Retry the same request repeatedly until the model returns a valid tool_use block that matches the schema as expected. Your Claude application runs a complex research workflow. Some research steps require access to all previous findings, while others only need the current question. The current implementation passes the full conversation history to every step. How would you adjust the implementation?. Continue passing the full conversation history to steps that require prior findings, and reduce the history passed to steps that only need the current question. Pass recent conversation history to every step and prune older turns beyond a fixed lookback window to limit token consumption across the workflow. Use subagents or multi-step workflows so each research step receives only the context it needs for its reasoning. Summarize the conversation history into a compact representation and pass the summary to each research step regardless of its context requirements. Your Claude application's error handling currently logs every API error with the same severity level. The team wants to differentiate between errors that should page an on-call engineer and errors that should be logged for later review. How would you structure the error handling?. Disable logging for any error that does not page, treating non-paging errors as not worth recording for later review either. Page on every error, on the grounds that paging guarantees that no error is missed by the team during normal operation across the application's lifecycle. Categorize errors by severity based on impact and recoverability, then route each category to the appropriate channel for paging or logging. Log every error with the same severity, on the grounds that differentiating severity adds complexity that does not pay off in most application setups over time. Your Claude application's token costs have grown faster than expected. The team has not been tracking token usage by feature, so the team cannot identify which features are driving cost. The team is debating how to respond. How would you respond?. Reduce token usage uniformly across all features by half, applying the cut evenly across the application during normal operation. Add token usage tracking by feature to the application's logging so the team can identify which features drive cost before recommending changes. Tell the team that cost growth is unavoidable as the application scales and that no investigation will change the trajectory of the application's cost over the next several quarters. Switch every feature to the smallest model to cut cost broadly across the application during normal operation. You are extending a Claude agent with a capability that needs to be reusable across multiple teams in the organization, with each team able to invoke and use it independently. How would you build the capability?. As a custom tool embedded in this team's agent only, with other teams able to copy the implementation into their own agents when they need the capability. As a shared library that each team imports into their own Claude application code, with each team responsible for keeping the library up to date in their integration. As a wrapper around an existing built-in tool that adds the missing functionality, on the grounds that built-in tools cover the reuse pattern when extended carefully. As a Skill or MCP server because both are purpose-built for cross-team reuse independently by each consuming team. You are choosing a Claude model for a high-volume classification task. Each classification is straightforward, latency requirements are tight, and per-request cost matters at scale. Which model would you choose?. Multiple Claude models in series, where each request runs through more than one model and the application combines the outputs into a final classification. A smaller, faster Claude model, because the task is straightforward and the workload prioritizes latency and per- request cost at scale. A mid-tier Claude model selected by default, because mid-tier models balance quality and cost in a way the team can apply across most tasks. The largest, highest-capability Claude model, to maximize quality on every classification the application produces during normal operation across all requests. You are designing an agent that processes vendor invoices. The work involves a small number of well-understood steps, but occasionally an invoice arrives in an unexpected format that requires the system to decide between rerouting, requesting clarification, or flagging for human review. The most appropriate architecture for this system is ... a workflow for the standard path with an agent invoked at the decision point for unexpected formats. a fully autonomous agent that handles every invoice from start to finish across all formats. a single large prompt that processes every incoming invoice, both standard and unexpected, in one model call. a manager agent that delegates each step of standard invoice processing to a dedicated subagent, with a separate subagent handling each unexpected format. The product team has asked you to choose a Claude model for a new feature. The team has provided functional requirements but has not specified performance, cost, or quality targets. The team's product manager says, "Use whatever model gives us the best results." How would you respond?. Ask the product team to specify quality, latency, and cost targets, then select the model whose tradeoffs best fit those targets. Choose the largest, highest-capability Claude model, on the grounds that "best results" is most likely to mean highest quality. Run every Claude model on a representative sample and pick whichever scores best on a generic benchmark. Choose a mid-tier model and ship the feature, because mid-tier models work for most use cases without specified targets. Your team is integrating Claude into an existing REST API service. The service handles concurrent requests, and you are deciding how to structure the Claude API calls within the existing async codebase. How would you structure the Claude calls?. Replace the existing async REST service with a synchronous service to match the call style of synchronous Claude SDK clients. Run Claude API calls in a separate thread pool isolated from the rest of the service so the main event loop is not affected. Use the Claude SDK's async client and structure Claude calls as await able operations alongside the rest of the service's async code. Make synchronous Claude API calls and block the async event loop until each call completes before processing the next request. Your agent makes 10 to 15 tool calls per task, and you have noticed it sometimes loses track of earlier results by the time it reaches later steps. The agent's context window is large enough to hold all the messages, but the relevant information appears to get buried as the conversation grows. How would you address this?. Switch to a different agentic framework that advertises automatic context-window management as a built-in feature. Reduce the number of tool calls per task by combining several existing tools into larger, multi-purpose tools. Apply a context- management pattern that summarizes or prunes older tool outputs while preserving the active task state. Increase the context window further so all tool outputs from every prior step remain in full detail throughout the task. A new agent your team built handles customer support tickets, but it routinely gets confused when a single ticket spans billing, shipping, and product issues. The agent often loses track of which sub-issue it has already addressed and revisits the same one. The team is considering architectural changes. What architectural change would you recommend?. Add detailed prompting that instructs the agent to track which sub-issues have been resolved and which remain. Introduce an orchestrator agent that delegates billing, shipping, and product sub-issues to a dedicated subagent. Increase the size of the agent's context window so it can hold the full ticket history at once. Switch to a deterministic workflow that handles billing, shipping, and product issues in a fixed sequence. You are setting up a CI/CD pipeline for a new Claude application. The pipeline needs to run automated checks on every pull request before code can be merged. The CI/ CD checks would include ... automated tests of the Claude integration only, with linting handled separately during local development on each developer's machine. automated linting and security scanning, with Claude integration testing handled manually during pre-release verification by a designated reviewer. automated tests of the Claude integration, linting, and any other standard quality gates the team applies to its other services. a full end-to-end production deployment on every pull request to catch all possible issues before any code is merged into the main branch. Your Claude application has been running for several conversation turns and you notice the model occasionally references information that was discussed many turns ago but is no longer relevant. You suspect context drift is causing the model to weight stale content too heavily. How would you address the drift?. Reset the conversation after every turn so the model loses all prior turns when generating a response. Increase the context window size so all turns of the conversation remain visible to the model in full detail. Apply compaction to summarize older portions of the conversation so the gist remains while the specifics carry less weight. Truncate the conversation so the model sees only the most recent turn during each subsequent response. You are implementing a custom tool for your Claude agent. The tool needs to interact with an external pricing service that returns product data. Which of the following best practices would you apply as you develop this tool?. Implement the tool with no error handling and let the agent loop catch failures whenever the pricing service returns an error during operation. Define the tool with a loose schema and let the model interpret the inputs flexibly on each call the agent makes. Omit the tool description and let the model infer when to use the tool based on the tool's name and the rest of the prompt context. Define the tool with a clear schema, write a precise description for when to call it, and handle pricing service errors explicitly. You are establishing the guardrail strategy for a Claude application. The team wants to ensure guardrail failure does not expose the application to unsafe behavior. The guardrail strategy would ... implement a single comprehensive system prompt guardrail and validate its coverage against the application's full range of expected inputs. apply guardrails at the model level only and rely on the model's built-in safety behaviors to handle any cases the guardrail does not explicitly cover. apply guardrails at the application output level only and route flagged responses to a human reviewer before they are delivered to the user. layer multiple guardrails so a single guardrail failure does not expose the application to unsafe behavior. You are setting up a Claude application that requires API keys for several external services. What is the best way to store the keys?. Put the keys in the application's configuration file and check the configuration file into the team's repository alongside the rest of the source code. Email the keys to each developer as needed and have each developer paste the keys into their local environment when they begin working on the application's code. Use a single shared key across all external services, so any developer working on the application can find the keys easily during development. Store the keys in a secrets manager or environment-specific configuration that is not checked into source code, and load them at runtime. Your Claude application's outputs are inconsistent in format. The team's instructions are scattered across the system prompt and user messages, with some instructions stated only once and others repeated. How would you fix the inconsistency?. Repeat all instructions in both the system prompt and the user message so the model sees each instruction more than once. Move all instructions into the user message so the application's behavior is controlled at the input point. Place each instruction wherever the developer who first wrote it found most natural, retaining the original intent. Consolidate behavioral and format instructions in the system prompt and keep user messages focused on the user's input. A teammate is debugging a Claude application whose system prompt has grown to several hundred lines and now contains overlapping, contradictory, and obsolete instructions. How would you advise the teammate?. Split the prompt across multiple system prompts so the model sees a smaller portion at any given time. Audit the prompt for overlap, contradiction, and obsolete content, then refactor so each instruction is clear, current, and non-redundant. Add more explicit instructions so the most recent rules dominate the model's interpretation of the prompt during each request. Tighten only the contradictory rules first, treating the overlap and obsolete content as lower-priority work the team can address later. You are building a Claude application that processes 10,000 customer emails overnight to extract structured data. The work is non-interactive, runs once daily, and has a flexible completion window of several hours. Which Claude API would you use?. The realtime Messages API processing the emails one at a time sequentially to ensure consistent ordering of results. The batch API, which is designed for non- interactive workloads with flexible completion windows. The streaming responses API to process each email and return partial results to a database as the model generates them. The realtime Messages API with concurrent requests to process the emails as fast as possible during the overnight window. Your agent is processing tasks that take 30 to 60 minutes to complete. Each task has well-defined intermediate checkpoints, and the team wants the agent to be able to resume from the most recent checkpoint if a process is interrupted. How would you implement this resumability?. Apply a checkpointing pattern that persists the agent's intermediate state and reloads that state when resuming an interrupted task. Restart the task from the beginning whenever a process is interrupted. Run two copies of the agent in parallel for every task and use whichever one finishes first as the source of truth. Increase the agent's timeout to several hours so that interruptions become rare enough to ignore in practice. |




