Refund Resolution Agent
Agent vs. Deterministic Workflow
Question
Scenario
A support organization wants an AI system to resolve refunds. A case may require reading a ticket, checking an order, looking up policy, detecting fraud signals, calculating an amount, updating CRM, issuing money, and sending a response.
The team proposes a fully autonomous agent with every tool. Leadership wants low latency, predictable cost, and an audit trail.
Your task
Choose the architecture and defend it. Address deterministic versus model-assisted steps, loop and stopping conditions, tool schemas and validation, retries and idempotency, approval boundaries, duplicate refunds, partial completion, latency, and tool-call cost.
Answer
Design the architecture
Explain the decision in writing, draw the system, or use both.
Write your answer before opening the hints or solution.
0 words
Interviewer nudges3 prompts · Open
- 1.Autonomy is a design variable, not the default.
- 2.Money movement needs a stronger boundary than drafting text.
- 3.After a timeout, reconcile state instead of blindly retrying.
Strong answerReview after your attempt · Open
Strong answer outline
Use a bounded workflow with model-assisted steps. Deterministic services fetch authoritative data, apply hard policy, calculate amounts, execute refunds, and persist workflow state. The model classifies intent, extracts evidence, identifies ambiguity, and drafts the response.
Expose narrow typed tools with server-side validation. Use a durable state machine, unique case ID, idempotency key for each side effect, and reconciliation after uncertain timeouts. Require approval for high amounts, fraud signals, ambiguity, or exceptions.
Fetch independent context in parallel, precompute deterministic facts, limit model rounds, and prefer one structured decision call. Measure duplicate actions, policy violations, escalation quality, completion time, tool calls, and cost.
Reference diagram
Bounded agent inside a deterministic workflow
Request
Validate input
Agent decision
Choose bounded action
Policy + approval
Enforce hard limits
Idempotent execution
Audit every action