AI Support Agent for Returns with Guarded Refunds
Design a live support agent that handles product returns end to end, checks inventory for an exchange, issues eligible refunds safely, answers status questions, and pauses risky actions for human approval.
Problem statement
For this exercise, assume a customer can open a live support session, describe a problem by text or transcribed speech, and receive grounded answers from an automated agent that uses approved, versioned support content.
The agent handles a return request end to end, but it acts only through typed, schema-validated tool calls whose results a deterministic policy checks: it can look up the order and an item's return eligibility, start a return for an eligible order item, check inventory for a replacement, offer an exchange when a replacement is available, propose a refund otherwise, issue the refund only through a guarded refund path, and answer questions about return and refund status at any later time.
Model output stays advisory at every money-moving boundary.
The agent may propose a refund only when the customer explicitly declines the offered exchange or explicitly asks for a refund (including when no replacement is available), and a deterministic refund policy says the item is eligible. The customer must confirm the exact amount before money moves.
For this exercise, assume these rules: refunds above 200 dollars, policy exceptions, and cases where the agent cannot identify the item or the customer's intent with confidence wait for a human approver, and model confidence can only add human review, never relax policy or skip approval; a refund is issued when the returned item is received, unless policy marks the item as not needing a return, in which case it is issued once the confirmed proposal has any required approval.
Uncertain or out-of-scope conversations still escalate to a human agent with the conversation context.
Design the session, knowledge-retrieval, tool and orchestration, return, inventory-check, approval, refund, status, and audit paths.
Exclude training a foundation model, operating the underlying payment network, shipping-label and carrier internals, warehouse inspection and grading, inventory reservation internals (owned by the existing order and inventory services), and fraud-model training.
What to build
- Customers can hold a multi-turn support session and receive answers grounded in approved, versioned support content.
- The agent can propose a resolution or hand the conversation to a human agent while preserving context and action history; this handoff is separate from approving an action.
- An eligible order item gets one return case that is tracked from request through authorization and item receipt to exactly one resolution (exchange or refund), or to rejection or cancellation.
- Actions that policy flags wait in a durable approval queue; an authorized approver sees the evidence and the proposed action and approves, edits, or rejects it, and the workflow then resumes without repeating completed steps.
- A refund comes only from a return case, a customer-confirmed proposal, and any required approval, and results in at most one payment refund per returned item.
- Customers can ask about a return or refund at any time and get an answer from the authoritative return and refund records.
- Authorized operators can inspect the evidence, inventory checks, policy version, customer confirmation, approver identity and decision, and final outcome for every automated action.
At scale
- Support 5,000 concurrent sessions and bursts of 2,000 customer turns per second.
- Return the first useful response token within 800 ms at p95, excluding a clearly signaled dependency outage.
- Keep active sessions available 99.95% monthly while failing closed for refund authorization; if the approval service is unavailable, actions that need approval wait and fail closed, while within-policy actions that need none proceed.
- For this exercise, assume up to 200,000 new return cases a day, that a return case may stay open up to 30 days waiting for the item to arrive, that about 5% of refunds need human review, and that an approval decision resumes its workflow within 60 seconds.
- Retain return cases, approval requests and decisions, inventory-check evidence, refund records, and the action audit trail for seven years as privileged-action evidence; retain ordinary conversation content for 30 days unless escalated.