Skip to content

Interview question · Agentic System Design

Design a customer support agent that can issue refunds.

Most of the conversation is open-ended; the refund is not. Give the model freedom to understand and investigate, and put identity, eligibility, limits, approvals and exactly-once execution in code.

hardEssentialNewUpdated Nov 2026

TL;DR: A state graph around the money and a model inside the conversation. The model understands the request, investigates with read-only tools and drafts replies. Code verifies the customer from the session, checks eligibility and limits through a policy engine, routes larger refunds to an approver, and executes refunds once with an idempotency key. Context holds a case record, not the whole history. Quality is measured on real past cases with pass^k, money invariants are checked on every trace, and rollout goes from suggestion to approval to autonomy for small refunds as error rates prove low.

How to approach it

Clarify volume, channels, refund rules and what a wrong refund costs. Then walk the method: autonomy map, tools and authority, context, durability, evaluation, numbers, rollout, going deepest on refund authority and exactly-once.

A strong answer

Clarify. Chat and email, 30,000 conversations a day, about 15% involve refunds; policy allows refunds to the original payment method within 60 days; leads approve above $100; a wrong refund costs money and trust and is hard to claw back.

Autonomy map.

StepDecided by
Understand the request, ask clarifying questionsModel
Identify the customerCode (session)
Look up orders, deliveries, prior refundsModel chooses reads; tools enforce scope
Decide eligibility and amountPolicy engine
Approve above $100Person
Execute refundCode, idempotent
Reply to the customerModel drafts; facts come from tool results

Tools. orders_find, orders_get, deliveries_get, refunds_list (reads, scoped to the session customer); refund_request(order_id, amount, reason) which runs policy and either executes, queues for approval or refuses with a reason.

Authority. Customer identity from the authenticated session; delegated token scoped to that customer; policy rules as code (ownership, refundable amount, 60-day window, cumulative limits); approvals bound to order and amount.

Exactly once. The refund key is derived from order, reason and amount version; the payment processor's idempotency key and a lookup-before-retry cover crashes.

Context. A case record (customer, orders discussed, facts confirmed with sources, what was promised) rendered each turn; tool results trimmed; history compacted at long-conversation thresholds with identifiers preserved.

Evaluation. 500 past conversations replayed against recorded tools, graded on end state (correct refund or none) and invariants (no refund before verification, no refund to another customer); pass^4 per task type; refund decisions reviewed by leads in the approval phase as labelled data.

Numbers.

convs, refund_share = 30_000, 0.15
turns, in_tokens, cached, out_tokens = 8, 15_000, 0.75, 300
cost = convs * turns * (in_tokens * ((1 - cached) * 3 + cached * 0.3)
                        + out_tokens * 15) / 1e6
approvals = convs * refund_share * 0.25          # share above the $100 threshold
print(round(cost), round(approvals))  # => 4590 1125

About $4,600 a day in model cost at illustrative prices, and around 1,100 approvals a day if a quarter of refunds exceed $100: enough to need a team, which is why the threshold and approval screen design matter.

Rollout. Shadow (agent proposes, humans act), then approval for all refunds, then autonomy for refunds under $100 once their measured error bound is below the bar, with caps per customer and per day and a kill switch.

What interviewers probe next

"A customer claims a parcel never arrived." The model investigates delivery scans and the customer's history; policy decides eligibility for non-delivery refunds; suspicious patterns go to a person.

"How do you stop the model promising refunds it cannot give?" Replies about money come only after a policy decision, and the reply draft is checked against it.

"What about abusive customers trying to manipulate the agent?" The model can be persuaded; the policy cannot. That is why decisions live in code.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

Your support agent investigates with the model and refunds through policy and approvals.

  1. Start here

    What if approvals pile up over a weekend?

How it's scored

Weak: An LLM with a refund tool and a prompt about policy.

Hire: Session identity, policy checks, approvals above a threshold and idempotent refunds.

Strong Hire: Clarifies volume and cost of error, produces an autonomy map, scopes tools to the session customer, encodes policy with cumulative limits and approval binding, guarantees exactly-once, manages context with a case record, evaluates on replayed cases with invariants and pass^k, sizes cost and approval load, and rolls out through shadow, approval and bounded autonomy with caps.

Common mistakes

  • Refund rules in the prompt.
  • Customer identity from the conversation.
  • No plan for approval volume.
  • Autonomy granted by belief rather than measurement.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 6, and the site remembers where you stopped in each one.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in raises your free answers from 5 to 6 per topic, adds an applied lesson in every topic and easy practice tests, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

Nobody has commented. Post a correction or another way to answer.