Module 6 · Capstone · Chapter 24 · Free
AI system design interview practice: timed exercises with model answers
- A design interview scores tradeoff reasoning and eval thinking, not buzzword coverage.
- Run the clock on purpose: clarify, scope, sketch, go deep on one part, close with risks.
- Every exercise below names the real test inside the prompt. Design for that, out loud.
The picture: a flight plan, filed before takeoff, so hard moments mid-flight are already decided.
- The common shape of a 45-minute design interview, minute by minute.
- Three timed exercises with model answers: airline copilot, law firm Q&A, pharmacy voice agent.
- The probes each interviewer will push on, and the failure answers to avoid.
- A break-it lab: one flawed candidate answer to critique.
A candidate at an invented company, Northwind Air, spends 30 of 45 minutes drawing a five-agent architecture for a support chatbot. The interviewer asks one question: "A storm cancels 400 flights. What happens?" Silence. No fallback, no eval plan, no answer for the one day the system matters. The feedback: "Strong components, no judgment." Components are cheap. Judgment is the job.
- How the interview runs, and where the minutes go.
- Exercise 1: airline support copilot, with the teaching picture.
- Exercise 2: document Q&A for a law firm.
- Exercise 3: voice agent for pharmacy refills.
- Break-it lab: critique a flawed candidate answer.
Next: the shape of the session.
Step 1: How the interview runs
The split below is a common shape for a 45-minute session, not a promise about any one company.
| Minutes | Phase | What earns marks |
|---|---|---|
| 0 to 5 | Clarify the brief | Who uses it, what volume, what a wrong answer costs. |
| 5 to 15 | Requirements and constraints | Needs split from limits: latency, cost, privacy, accuracy bar. |
| 15 to 30 | Architecture | A simple first version, named patterns, data flow in order. |
| 30 to 40 | One deep dive | Go deep where the risk is: retrieval, a tool, a guardrail. |
| 40 to 45 | Tradeoffs and risks | What you gave up, what breaks first, how you would know. |
- Think out loud. A silent perfect design scores worse than a spoken good one.
- Name the eval early. "I would test this on 200 labelled cases before launch" signals seniority fast.
- Patterns are vocabulary, not the answer. Retrieval (Chapter 5), guardrails (Chapter 10) and the eval loop (Chapter 11) earn marks when tied to a constraint.
Like a driving test: the examiner watches how you handle the hard junction, not how you recite the highway code.
Where the picture breaks down:
- A test has one route. An interviewer can reroute you mid-answer, so hold your structure loosely.
- Real design takes weeks. Stating assumptions matters more than finishing.
Worked example: budget the deep dive. Overrun clarifying by 4 minutes (illustrative) and the cost lands at the end: 5 minutes of tradeoffs becomes 1. Tradeoffs are where seniors separate, so set a hard stop at minute 15 for the sketch. Arithmetic: 5 + 10 + 15 + 10 + 5 = 45.
Next: exercise 1, the airline copilot. Set a 45-minute timer for the real feeling.
Step 2: Exercise 1, a support copilot for an airline
The prompt, as an interviewer would say it: "Design a support copilot for a mid-size airline. It answers passenger questions and helps rebook flights."
Your plan: 0 to 5, clarify (channels, can it act or only advise?). 5 to 15, requirements: peak load on disruption days, refund rules, identity checks. 15 to 30, the architecture below. 30 to 40, deep dive on storm rebooking. 40 to 45, tradeoffs.
Model answer, in words: a router (Chapter 7) sends simple questions to retrieval over policy pages (Chapter 5) and actions to a single agent (Chapter 8) with two tools, flight status and rebook, returning structured output (Chapter 6). A guardrail layer (Chapter 10) checks every proposed change before it executes; money and identity go to a human. The real test is disruption days: design for the storm, then shrink to a calm day.
- "My flight was cancelled, what now?" The router decides: asking, or asking the system to act?
- Policy questions get grounded answers from the policy pages, source named.
- The agent checks flight status first, then proposes a new flight.
- The guardrail verifies the proposal against fare rules and the booking before anything changes.
- Refunds and identity disputes go to a person. On a storm day, this queue is the design.
| Probe you will get | Strong line |
|---|---|
| "A storm cancels 400 flights at once." | Cache flight status (Chapter 12), degrade to status-only answers, humans take priority rebooking. |
| "How do you know rebooking works?" | Eval set of past disruption chats (Chapter 11), scored on correct rebook and zero policy violations. |
Failure answers to avoid: a multi-agent swarm for a two-tool job, and "the model will follow the refund policy in the prompt" (a prompt is not a guardrail).
Next: exercise 2, where documents fight back.
Step 3: Exercise 2, document Q&A for a law firm
The prompt: "Design a system where lawyers ask questions across client documents and get answers usable in court filings."
Your plan: 0 to 5, clarify (document types, who may see what). 5 to 15, requirements: permissions per matter, citations on every claim. 15 to 30, architecture. 30 to 40, deep dive on permission-aware retrieval. 40 to 45, tradeoffs.
Model answer, in words: ingestion tags every chunk with its matter and access list. Retrieval (Chapter 5) filters by the asking lawyer's permissions before ranking, never after. Answers use structured output (Chapter 6): claim, citation, page. No citation, no claim: the system says "not found in your matters" instead of guessing. A leaked document or invented quote ends the product.
| Probe you will get | Strong line |
|---|---|
| "A partner asks about a matter she is not on." | The filter runs before retrieval, so those chunks never reach the model. It cannot leak what it never saw. |
| "How do you test citation quality?" | Eval loop (Chapter 11): sampled answers checked for citation supports claim. |
Failure answers to avoid: filtering results after generation (the model already saw the text), and one shared index plus a polite prompt about confidentiality.
Filtering after generation is too late: the model has read the chunk and can restate it in new words. Filter at retrieval, before ranking.
Next: exercise 3, the voice agent.
Step 4: Exercise 3, a voice agent for pharmacy refills
The prompt: "Design a voice agent that reminds patients about prescription refills and confirms orders."
Your plan: 0 to 5, clarify (inbound, outbound, or both; which drugs are excluded). 5 to 15, requirements: latency under about a second per turn, identity confirmation, escalation to a pharmacist. 15 to 30, architecture. 30 to 40, deep dive on confirmation. 40 to 45, tradeoffs.
Model answer, in words: speech to text, a small fast model behind a router (Chapter 7), streaming replies (Chapter 13) so the patient hears words early. State lives outside the model: refill status, confirmed or not, attempts made (memory, Chapter 9). The agent never confirms on a fuzzy match: it reads back drug name and dose, and any doubt escalates to a pharmacist. A wrong "yes" has a person's health behind it.
| Probe you will get | Strong line |
|---|---|
| "The patient says 'yes' but the audio is unclear." | Unclear is a no. Ask once more, then escalate. Confirmation needs a clean signal. |
| "Replies feel slow." | Stream output, cache fixed phrases (Chapter 12), fall back to a smaller model (Chapter 14). |
Failure answers to avoid: one giant model call per turn with full history (latency grows every turn), and letting the agent answer dosage questions because "it usually gets them right".
Next: the break-it lab, your red pen.
Step 5: Break-it lab, critique a flawed candidate answer
Why this exercise: spotting weak design in someone else's answer stops you producing it yourself. The checklist is the course: patterns matched to constraints, guardrails, an eval loop, honest data handling.
Do this:
- Read the answer below and list every fault before opening the hint.
- Sort the statements in the lab under it into the flaw categories.
- Open the reveal and score yourself: four faults found is a strong critique.
The candidate answer, for a clinic's patient messaging assistant (illustrative):
DESIGN: "CareChat" patient assistant
- Architecture: 9 specialised agents debate each reply
before sending (planner, drafter, critic, and 6 more).
- Output: stream raw model output straight to the patient
screen, token by token, no review layer.
- Quality: no test set. "We will monitor user feedback
and fix problems as patients report them."
- Data: keep every conversation and health detail forever,
"for training", no deletion process.
- Tools: the agent can book, cancel and message the
patient's doctor directly, no confirmation step.
Hint
Check four things: is the architecture sized to the job, what sits between the model and the patient, how quality is measured before launch, and how long personal data lives. Also check what tools can do without asking.
Reveal: the faults and the fixes
- Multi-agent everything. Nine debating agents for routine messages: latency, cost and failure modes nobody needs. Fix: one agent (Chapter 8), humans for clinical calls.
- Raw output streamed to patients. No guardrail layer (Chapter 10) means unsafe text reaches the screen, and streaming cannot be unsent. Fix: generate, check, then send.
- No eval plan. "Monitor user feedback" makes patients the test set. Fix: the eval loop (Chapter 11), a labelled set, a launch bar, scheduled re-runs.
- All data kept forever. Health data with no retention limit is a legal and trust failure. Fix: keep the minimum, set a retention period, delete on request (Chapter 9).
- Unconfirmed powerful tools. One misread message becomes a missed appointment. Fix: structured tool calls (Chapter 6) with read-back and confirm, plus fallbacks (Chapter 14).
Lab: In the chapter's break-it lab, a candidate designs CareChat, a clinic's patient messaging assistant, and the answer sounds confident. This lab runs in your browser and needs JavaScript enabled.
- Every fault maps to a chapter you have already studied. The checklist is the course, compressed.
- The candidate sounded confident. The faults were missing constraints, not missing buzzwords.
Next: a field note, then mix-ups.
Interviewers commonly report that candidates who state assumptions, name a metric, and describe how they would test the design outperform candidates with larger diagrams. Treat that as interviewer lore, not a measured statistic, and practise accordingly: timed, out loud, with a peer interrupting.
Mix-ups to avoid
- More components means a stronger answer. No: each one must answer to a constraint, or it is decoration.
- Clarifying questions waste time. No: five minutes of questions prevents designing the wrong system for forty.
- The deep dive should be the fanciest part. No: go deep where the risk is, usually retrieval, a tool, or a guardrail.
- Tradeoffs are admitting weakness. No: naming what you gave up is the clearest senior signal in the session.
- One model answer exists per prompt. No: interviewers score the reasoning. Two different architectures can both pass.
Chapter quiz
Five questions. Score 70% to complete.
Review this chapter in 5 minutes
Watch the whole chapter recapped: the 45-minute interview shape, three timed model answers, the probes, tradeoff language, and the CareChat critique lab.
- The common shape: clarify 5, requirements 10, architecture 15, deep dive 10, tradeoffs 5. Timings vary; the order is the point.
- Airline copilot: design for the disruption day. Router, retrieval, one agent, guardrail, humans for money and identity.
- Law firm Q&A: filter permissions before retrieval, citations on every claim, decline with no source.
- Pharmacy voice agent: stream for latency, read back to confirm, escalate on doubt.
- The flawed answer failed on size, guardrails, eval and retention.
Decision rule: name the constraint, the pattern that answers it, and how you would test it. If one is missing, the design is not finished.
Review
Glossary
- Clarifying question
- Pins down users, volume or risk before designing. Example: "Can it act, or only advise?"
- Deep dive
- The one part of a design explored in detail. Example: permission filtering in retrieval.
- Model answer
- A worked example of a strong response. Example: the airline walk in Step 2.
- Probe
- A follow-up that tests a weak spot. Example: "A storm cancels 400 flights. What happens?"
- Tradeoff
- What you give up to gain something. Example: human review costs speed, buys safety.
- Failure answer
- Sounds plausible, loses marks. Example: "The prompt tells the model to follow policy."
- Eval plan
- How quality is measured before and after launch. Example: 200 labelled cases, one pass bar.
- Escalation
- Handing a case to a human when risk is high. Example: a pharmacist takes an unclear call.
- Scope change
- A new requirement added mid-design. Example: 40 languages at minute 20.
Next: "Back to the course map, and your next design review."