Design a Refund-Capable Support Agent With Guardrails and Escalation

Last updated: November 29, 2026

Quick Overview

Design an LLM agent for a retail client that resolves customer support chats end to end, including looking up orders and issuing refunds through the client's APIs, while keeping financial risk bounded and escalating to humans when it should.

Ode
ML System Design
Machine Learning Engineer
Ode
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design an LLM agent for a retail client that resolves customer support chats end to end, including looking up orders and issuing refunds through the client's APIs, while keeping financial risk bounded and escalating to humans when it should.

Customer experience rework is a typical CEO-level engagement for a firm like Ode, and an agent that can move money is where design quality matters most. The interviewer checks tool design, policy enforcement outside the model, evaluation before launch, and a staged rollout plan.

What the Interviewer Expects
  • Define the action space as narrow, typed tools rather than raw API access
  • Enforce refund policy in code (limits, eligibility) so the model cannot talk its way past it
  • Design escalation triggers and a clean handoff with context to human agents
  • Build an offline eval from historical transcripts plus adversarial cases
  • Plan a staged rollout with online metrics and kill switches
  • Address prompt injection and identity verification
Key Topics to Cover
LLM agents
tool design
guardrails
offline and online evaluation
human handoff
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would you measure whether the agent resolved the issue, not just closed the chat?
  • A customer pastes instructions telling the agent to refund everything. What stops it?
  • How would you choose between one large agent and a router plus specialist agents?
  • How do you keep latency under a few seconds per turn with multiple tool calls?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Handle order status, returns, refunds up to a policy limit, address changes before shipment, and FAQs. Escalate fraud signals, angry customers, legal threats and anything outside policy. Targets agree...

High-Level Design

Chat widget sends turns to an orchestrator. The orchestrator authenticates the customer (logged-in session or email plus order number verification) and binds the session to that customer ID. The m...


Submit Your Answer
Markdown supported

Related Questions