TL;DR: An explicit state graph for the process, because refunds have rules that must hold every time (verify the order, check eligibility and limits, get approval above a threshold, refund once) and an auditor will ask how each refund was decided. Inside one node, the dispute investigation, a bounded read-only ReAct loop, because the path through order history, delivery records and messages is not known in advance. Plan-and-execute adds little here: the process is already known, so there is nothing for a planner to decide.
How to approach it
Ask what the workflow must guarantee (money moves only under policy, every decision explainable) and where the uncertainty is (most refunds are routine; disputes need investigation). Choose by matching each pattern to the part of the problem it fits, and say why the others lose.
A strong answer
What the workflow needs.
| Need | Implication |
|---|---|
| Verify before refunding, every time | A rule, not a suggestion: structure |
| Limits and approvals by amount and customer history | Guards in code |
| Idempotent refund, exactly once | A single refund node with a key |
| Investigate unclear disputes across several systems | Open-ended reads: model-driven |
| Explain each decision to the customer and to audit | A transition log with reasons |
The design. Intake → verify order (code) → classify (model chooses "clear" or "unclear") → investigate (ReAct, read-only tools, eight steps at most) → policy guard (code) → human approval above ₹5,000 → refund (idempotent) or close with a reason. The model's freedom is real but placed: it decides how to investigate and how to classify, never whether to verify or whether a refund is within policy.
Why not ReAct alone. It would work in demos. But "verify before refunding" becomes an instruction followed most of the time, refunds become reachable on paths nobody tested, and the audit trail is a transcript rather than a list of decisions. Every run is a new path.
Why not plan-and-execute. A planner earns its cost when the steps are unknown until the request is read. Here the steps are the company's process, known in advance; letting a model rewrite them per request adds a call and a way to drop a step.
Where each pattern sits.
pattern where it is used why
state graph the whole process rules, approvals, audit, recovery
ReAct inside "investigate" unknown path, read-only data
plan-and-execute not used the process is already the plan
What interviewers probe next
"Investigation finds the courier's proof of delivery is a forgery. What happens?" The investigate node returns findings, not decisions. The graph routes "fraud suspected" to a human queue, an edge added for that case, rather than letting the model act on it.
"Ninety percent of refunds are routine. Does every one go through the model?" Only through classify, which can be cheap; routine cases skip investigation entirely. Many teams make classify a rules check first and call the model only when the rules are unsure.
"How do you test it?" Guards with table tests, routed nodes with labelled examples, the investigation node with recorded disputes and expected findings, and an enumeration of graph paths to confirm none reaches refund without verify and policy.
What if?
What if · interview follow-ups
Hold your answer as the constraints change
Refunds run as a state graph with a ReAct investigation node.
Start here
What if the business adds partial refunds and store credit as outcomes?
Who should choose the outcome?
The investigation can recommend; a guard decides which outcomes are allowed for this case (credit only for some reasons, partial only up to the disputed items). Add the outcomes as nodes behind the same policy guard.
Carry it forwardNew outcomes are new guarded edges, not new model freedom.
Weak answerLetting the model pick any of the three outcomes directly.
Constraint changes
What if investigations sometimes need to message the customer and wait?
Where does a run wait?
Add a 'waiting for customer' state that persists and resumes on reply. The ReAct loop ends with a request for information; the graph waits, not the model.
Carry it forwardWaiting is a state in the graph.
Weak answerKeeping a ReAct loop alive across a two-day wait.
Constraint changes
What if a regulator asks why refund 88213 was approved?
What does the run history hold?
The transition log: verified at 10:02, classified 'unclear', investigation findings with sources, policy guard result (within limit), refund id. Each step has its reason, which a free-running agent cannot give as cleanly.
Carry it forwardGraphs turn runs into auditable decisions.
Weak answerPointing the regulator at a transcript.
Now defend it
One-line answer to the original question?
A state graph for the refund process, with code guards and approval on the money, and a bounded read-only ReAct loop inside the investigation node; no planner, because the process is already known.
How it's scored
Weak: Picks one pattern by preference ("ReAct is the standard") without mapping it to the workflow's needs.
Hire: Chooses a state graph for the rules and explains why free-running ReAct is risky for money.
Strong Hire: Combines a graph for the process with bounded ReAct inside the open-ended node, explains why plan-and-execute adds nothing, places guards, approval and idempotency, and describes testing and audit.
Common mistakes
- Treating the three as exclusive choices.
- Enforcing "verify first" with a prompt instruction.
- Letting the investigation node also decide the refund.
- Adding a planner to a process the business has already defined.