DEPLOYEDAI-era interview training
RankBootstrapping
XP 0 / 250
0
0%
Ready
Applied AI / Forward Deployed Engineer · System Design for AI Applications · Lesson 2 of 2

Worked example: a customer-support AI assistant

8 min

Let's design a support assistant that answers customer questions from a company's help docs + can take actions (check order status, issue refunds). This blends RAG + agents + production concerns.

Clarify (assume answers)

  • 10k help articles + order DB; ~5 QPS peak; <3s first-token latency; must cite sources; refunds need a guardrail; multilingual later.

Architecture

  1. Indexing: chunk help articles (structure-aware, ~500 tokens, metadata: product, section, permissions) → embed → vector store. Re-index on doc updates.
  2. Retrieval: hybrid search (semantic + keyword for error codes/SKUs) → rerank top-k → assemble context.
  3. Orchestration: router classifies intent → simple FAQ = RAG answer; action requests (order status/refund) = tool calls with schemas.
  4. Generation: answer only from retrieved context, cite chunks, 'I don't know → escalate to human' fallback.
  5. Guardrails: refunds above a threshold require human approval (human-in-the-loop); treat retrieved/user text as untrusted (injection defense); PII handling.
  6. Production: stream tokens; cache stable system prompt; small model for routing, big model for hard answers; retries/fallback provider; log everything.
  7. Evals + feedback: eval set of real tickets (retrieval relevance + answer faithfulness + action correctness); thumbs up/down and resolution rate online; failures feed back into the eval set and retrieval tuning.
Notice the patternAlmost every FDE design is some mix of: RAG for knowledge + tools for actions + routing for cost + guardrails for safety + evals for quality. Master this template and you can design most of these on the spot.

◆ Lock it in

  • Support assistant = RAG (cite) + tools (actions) + routing (cost) + human-in-the-loop (safety) + evals (quality).
  • Gate high-impact actions (refunds) behind human approval; treat all external text as untrusted.
  • Close with online signals feeding the eval set — the improvement flywheel.
Feynman drill — say it out loudDesign, out loud in 2 minutes, an AI assistant for triaging IT support tickets. Hit every framework step.
Step 1 rate your confidence · Step 2 pick your answer
In the support-assistant design, why gate refunds behind human approval?
Step 1 — how sure are you?