productinterview.tools
MenuClose

Our Agent Takes 40 Seconds and Costs Too Much. Redesign It.

The interviewer asksAn agent that answers order-status questions takes 40 seconds and 12 model calls on average. Users are leaving. How would you redesign it?

Forward Deployed EngineerAI Product EngineerCoreSystem design roundRepresentative10–15 min

On this page
  1. The 30-second version
  2. What it's really testing
  3. How to structure your answer
  4. The interview, played out
  5. The strong answer, distilled
  6. How it's scored
  7. How the answer changes by role
  8. Common mistakes
  9. More follow-ups to practise
  10. Go deeper
  11. Sources

The 30-second version

  1. Look at the traces: what do users ask, and where do the 12 calls go?
  2. Order status is a known, fixed sequence: identify order → look it up → answer. That's a workflow, not an agent.
  3. Route: a cheap classifier sends the common cases down the workflow; rare, complex ones go to the agent.
  4. Make the workflow fast: one lookup, a small model to phrase the answer, stream it.
  5. Check with evals that answers are as good, and track latency and cost per answer.

Watch it played outSee the strong answerHow it's scored

What it's really testing

  • Diagnosing from traces
  • Workflow vs agent judgment
  • Routing and fallbacks
  • Keeping quality while cutting cost and latency

How to structure your answer

  1. Look at traces: questions and where the calls go.
  2. Choose the structure: workflow for the common case.
  3. Route, with the agent as a fallback.
  4. Speed up the main path.
  5. Verify quality, latency and cost.

The interview, played out

A written example interview, not a real candidate or company transcript.Strong moveMissed signalRevealed when asked
  1. Interviewer
    An agent that answers order-status questions takes 40 seconds and 12 model calls on average. Users are leaving. How would you redesign it?
  2. Candidate
    I'd start with the traces. What are people asking, and where do the 12 calls go?
  3. Revealed when asked
    About 85% are "where's my order?" or "when will it arrive?". The agent spends most calls deciding which tool to use, re-reading results and summarising.
  4. Strong move
    Uses traces to find that most traffic is a fixed task.
  5. Candidate
    Then most of this doesn't need an agent. "Where's my order?" is always the same steps: identify the order, look it up, explain the status. That's a fixed workflow, written in code.
  6. Candidate
    So: a fast router first, a small model or even rules, classifying the question. Order-status questions go down the workflow: extract the order number (or look up the customer's recent orders), one database call, then a small model writes a friendly answer from the result. That's one or two model calls, a second or two.
  7. Interviewer
    And the other 15%?
  8. Candidate
    They go to the existing agent, with a step limit and a hand-off to a human if it runs out. Unusual questions are where the agent's flexibility helps.
  9. Interviewer
    How do you know the new version is as good?
  10. Candidate
    Compare it on past questions.
  11. Missed signal
    Should specify how: a labelled set and what's measured.
  12. Candidate
    Concretely: take a few hundred past conversations with known correct answers, run both versions, and compare correctness, latency and cost per answer. Plus check the router: how often it sends a question down the wrong path.

The strong answer, distilled

  • Diagnose: 85% of traffic is a fixed task; most agent calls are deliberation overhead.
  • Structure: a routed design. A cheap router; a code workflow for order status (identify → one lookup → small model phrases the answer); the agent only for the rest.
  • Fallbacks: the agent has a step limit and hands off to a person.
  • Speed: one or two calls, a small model, streaming. Seconds instead of 40.
  • Verify: a labelled set of past conversations; compare correctness, latency and cost; evaluate the router's misroutes.

This is one strong answer, not the only one.

How it's scored

Dimension Weak (2) Passable (3) Strong (5)
Diagnosis "Use a faster model" Some trace reading Traffic mix and where the calls go
Structure Tune the agent Fewer steps Workflow for the common case, agent for the rest
Routing None Mentioned Router plus fallback, with the router evaluated
Verification None "Test it" Labelled set; correctness, latency, cost per answer

Round scorecard: FDE: AI system design round, filled in for the mock candidate

DimensionWeakPassableStrongThe mock candidate
RequirementsAssumes them.Asks about scale.Users, data, scale, latency, cost and risk, before drawing anything.Strong. Looked at what users actually ask before redesigning.
ArchitectureOne component.A reasonable flow.Full skeleton, then depth on the parts this system depends on.Strong. Replaced the agent with a routed workflow for the common case.
Quality and evalsNone.Mentions testing.Evals per component and end to end, and how they're built.Passable. Planned to compare answers but only after being asked how.
Failure and costIgnored.Mentions one.Fallbacks, guardrails, latency and cost levers, tied to requirements.Strong. Kept the agent as a fallback for unusual questions, with a step limit.

How the answer changes by role

Role What to emphasise
Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation Explaining the redesign and its numbers to the customer
AI Product Engineer Implementation, the router eval and monitoring

Common mistakes

  • Swapping the model and keeping the agent loop
  • Removing the agent entirely and failing the unusual cases
  • Not evaluating the router
  • Measuring speed but not correctness

More follow-ups to practise

  • "The router misclassifies 5% of questions." Hint: which direction is worse, and a confidence threshold.
  • "Customers want to change delivery addresses too." Hint: an action with consequences; workflow plus confirmation.
  • "How low can latency go?" Hint: database time, model size, streaming.

Go deeper

Sources

Representative question: written to match AI system design rounds, not a specific reported interview.