Your agent has called lookup_order multiple times while investigating a customer's return requests. Each response includes 40+ fields (items, shipping details, payment inf outputs now represent the majority of the conversation's context. The customer mentions two more orders they want to discuss. What's the most effective approach before lookups?
Answer(s): B
A: Move all tool responses to a vector database with semantic indexing, retrieving relevant portions as the conversation continues Incorrect.This adds unnecessary infrastructure complexity for a short-lived conversational context problem.B: Extract only return-relevant fields (items, purchase date, return window, status) from each existing order response, removing verbose details Correct.This preserves the information needed for the current task while significantly reducing context bloat before additional lookups.C: Have the model generate a natural language summary of each order's key details, replacing structured responses with prose descriptions Incorrect.Natural language summaries are less compact and may omit structured details needed for accurate return handling.D: Proceed with additional lookups without modifying the existing tool output context Incorrect.This worsens context crowding and increases the risk of degraded performance.
During a billing dispute resolution, your agent successfully retrieves customer info via get_customer and order details via lookup_order, but when attempting to call process_refund, the tool returns a timeout error. The agent has enough information to explain the charges and verify refund eligibility, but cannot actually process the refund due to the backend failure. What approach best balances first-contact resolution with appropriate error handling?
A: Confirm the refund will be processed and close the conversation, since the system has all necessary information to complete it automatically Incorrect.The refund was not actually processed. Confirming success would be inaccurate and misleading.B: Explain the billing, confirm refund eligibility, acknowledge the system issue preventing immediate processing, and offer escalation or retry later Correct.This maximizes first-contact value by resolving what can be resolved, while transparently handling the backend failure.C: Escalate immediately to a human agent since the refund action cannot be completed Incorrect.Escalation may be unnecessary if the issue is temporary and the agent can still provide useful assistance.D: Implement automatic retries with exponential backoff for process_refund, keeping the conversation open until the refund is successfully processed Incorrect.Retries are useful for transient failures, but indefinitely blocking the conversation creates poor user experience and doesn’t guarantee success.
Your agent is handling a billing dispute. After calling get_customer and lookup_order, it identifies that the dispute involves a promotional pricing error requiring manager approval—beyond the agent's authorization level. How should the workflow handle this mid-process escalation?
Answer(s): D
A: Persist the complete conversation and tool response history to a database, then call escalate_to_human with a reference ID. Incorrect.Useful operationally, but the human agent still needs a concise, actionable summary rather than raw logs alone.B: Call escalate_to_human passing only the customer's original message. Incorrect.This loses the investigation work already completed and forces the human agent to repeat steps.C: Attempt the refund with process_refund anyway, escalating only if the system rejects the transaction. Incorrect.This violates authorization boundaries and business policy.D: Compile a structured handoff with customer details, order info, and the identified issue before calling escalate_to_human. Correct.A structured handoff preserves context, reduces repetition, and enables efficient continuation by the human agent.
Production logs reveal inconsistent error handling: when lookup_order fails, the agent sometimes retries 5+ times (wasteful when the order ID doesn't exist), sometimes escalates immediately (premature for temporary network issues), and sometimes asks users for clarification (inappropriate when the issue is a backend permission error). Investigation shows your MCP tool returns uniform error responses: "isError": true, "content": [ "type": "text", "text": "Operation failed" ] . The agent cannot distinguish between error types. What's the most effective improvement?
Answer(s): A
A: Enhance error responses with structured metadata: include errorCategory (transient/validation/permission), isRetryable boolean, and a description of what caused the failure. Correct.Structured error metadata gives the agent clear signals for deciding whether to retry, escalate, or ask the user for clarification, leading to consistent and appropriate handling.B: Implement retry logic with exponential backoff in your MCP server for all errors, returning to the agent only after retries are exhausted. Incorrect.Retrying all errors wastes resources and still doesn’t help the agent distinguish permanent failures like validation or permission errors.C: Add few-shot examples to the system prompt demonstrating how to interpret error message patterns and select appropriate responses for each. Incorrect.Parsing generic text errors is brittle and unreliable compared to explicit structured metadata.D: Create an analyze_error MCP tool the agent calls after any failure to determine the error category and recommended action. Incorrect.This adds unnecessary complexity and extra tool calls when the information should already be present in the original error response.
A customer raises three separate issues during one session: a refund inquiry (turns 1-15), a subscription question (turns 16-30), and a payment method update (turns 31-45). At turn 48, the customer asks "What happened with my refund?" The conversation is approaching context limits. What strategy best maintains the agent's ability to address all issues throughout the session?
A: Implement sliding window context that retains the most recent 30 turns. Incorrect.This would likely drop the earlier refund discussion entirely, preventing accurate follow-up handling.B: Extract and persist structured issue data (order IDs, amounts, statuses) into a separate context layer. Correct.Structured persistence preserves critical state across multiple concurrent issues while minimizing context usage and enabling reliable recall later in the session.C: Rely on MCP tools to re-fetch relevant information on demand when the customer references earlier issues. Incorrect.Tools can retrieve system data, but not the conversational context, decisions, or prior explanations from earlier turns.D: Summarize earlier turns into a narrative description, preserving full message history only for the active issue. Incorrect.Narrative summaries may omit important structured details needed to accurately resume earlier issues.
Post your Comments and Discuss Anthropic CCAR-F exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the CCAR-F content, but please register or login to continue.