0% completed
How AI System Design Shows Up in Interviews
On This Page
Know the Vocabulary
Part 1: The Same Topic, Asked Five Ways
The Problem
Why These Questions Exist
What This Lesson Gives You
Part 2: The Five Forms
The Definition
A Form Can Be in Disguise
What the Five Forms Are Not
Part 3: The Lane Your Role Sets
The Same Question at Four Depths
A Common Lane Mistake
Ask When the Lane Is Unclear
"Assume the Model Already Exists"
Part 4: Four Areas Worth Covering in Every Form
The Same Four Areas
Area 1: Requirements Discipline, With Concrete Numbers
Area 2: The Complete Loop
Area 3: Cost and Latency Realism
Area 4: Failure Honesty
What Is Not Graded
Part 5: Follow One Question
Part 6: Using This in an Interview
Common Mistakes
Mistake 1: Designing Before Naming the Form
Mistake 2: Going Deep in the Wrong Lane
Mistake 3: Ending at the Response
Mistake 4: Treating a Model Call as Free
Mistake 5: Waiting to Be Asked About Failure
Mistake 6: Naming Models Instead of Roles
FAQs
Key Takeaways
Check Your Understanding
Know the Vocabulary
This lesson uses the terms below many times. Read them once now, and come back here when a later section needs one.
- Interview loop: The set of interviews a company runs for one role. A software engineer loop and an ML engineer loop can ask the same question but grade it at different depths.
- Model: A function whose behavior is learned from data instead of written by a developer. It takes an input and returns an output, such as a score or a piece of text.
- Machine learning (ML): Building models that learn from past examples.
- Generative AI (GenAI): AI that produces new content, such as text, code, or images.
- Large language model (LLM): A model trained on a very large amount of text that reads text and writes text. Chat assistants are built on LLMs.
- Inference: Running a trained model on an input to get an output. Each model call is one inference.
- Latency: The time between a request and its answer.
- Agent: A system in which a model chooses the next step while a task runs, such as which tool to call, within limits that code enforces.
- Tool: A function the model may ask the system to run, such as looking up an order or issuing a refund.
- Retrieval-augmented generation (RAG): A design that fetches relevant documents for each request and hands them to the model with the question. The model then answers from fetched facts instead of from memory alone.
- Vector index: A search structure that finds items by similarity of meaning. A normal database index finds items by an exact key instead.
- Fine-tuning: Giving an existing model extra training on your own data, so that its behavior changes.
- Feedback loop: The path that carries signals about quality, such as real outcomes and user ratings, back into evaluation and the next version of the model.
- Fallback: What the system does, as decided in advance, when the model is wrong, slow, or unavailable.
- Form: The shape in which a design question is handed to you, such as "build something new" or "fix this design."
- Lane: The part of the design that a role is expected to go deep on, such as the model itself or the serving system around it.
Part 1: The Same Topic, Asked Five Ways
The Problem
Picture two candidates who studied the same material. The first one hears "Design YouTube recommendations." The second one hears "Here is our support ticket system. Add AI to it." Both are AI system design questions. But they want very different answers.
The first question wants a ranking system, with its data and its training pipeline. The second question wants judgment. Where does AI help the ticket system, where does it not, and what should ship first?
A candidate who answers the second question like the first one designs the wrong thing well. The diagram can be clean, and the answer still misses what the interviewer wanted to grade.
Why These Questions Exist
Many companies now ship features built on models. A delivery app estimates arrival times. A help page answers questions in plain words. A coding tool writes code with the engineer.
Most of the work in these features is not the model. It is the system around the model. That system includes the data that feeds the model, the service that runs it, the checks that catch its mistakes, and the bill. Much of that system is built by engineers who are not ML specialists. So AI design questions now appear in many interview loops, not only in loops for ML specialists. How often they appear depends on the company and the role.
What This Lesson Gives You
This lesson gives you three tools for the first minute of any AI design question.
-
The five forms. Each form tells you where the hour will go.
-
The lane. Your role tells you how deep to go on the model, and how deep to go on the system around it.
-
Four areas worth covering in every form. They are what separates an AI design answer from a classic one.
The examples come from the food-delivery company in the introduction. It predicts delivery times, and it is building a support assistant for its customers.
Part 2: The Five Forms
The Definition
Most AI system design questions arrive in one of five forms. The form is how the question is handed to you. Naming it in the first thirty seconds tells you what the interviewer wants to spend the hour on.
-
Form 1: Design a known ML product and its feature pipeline. The product is a familiar one, such as "Design YouTube recommendations" or "Design delivery-time prediction for our app." ML engineer loops have asked questions like these for many years. A feature is one input value the model uses, and a feature pipeline is the set of jobs that compute those values. Most of the hour goes to data, labels, features, training, and evaluation.
-
Form 2: Design a GenAI product that generates content. For example: "Design a support assistant that answers customer questions." The model writes text, code, or images. Compared with Form 1, the center of the design shifts. There is less feature engineering, and there is more retrieval, prompt assembly, inference cost, and safety. Feature engineering is the work of choosing and computing features. A prompt is the full text the model reads for one request. Inference cost is what each model call costs to run.
-
Form 3: Add AI to an existing system. For example: "Add AI to our support ticket system." The system already works without AI. The question tests judgment: where AI helps, where it does not, and what to ship first.
-
Form 4: Design an agent that takes actions on a user's behalf. For example: "Let the support assistant issue small refunds and reschedule deliveries." The model picks tools and next steps, and some of those steps change real things, such as money. This is the newest form, and it is mostly about control. What may the agent touch, how many steps may it take, and which actions need a person to approve them?
-
Form 5: Critique or scale an existing AI design. The interviewer shows you a design and asks what is wrong with it, or what breaks at ten times the traffic. You start from someone else's system, not from a blank page. Most of the hour goes to finding problems and putting them in order of harm. Critiquing a System Design works through a full question of this form.
The diagram below shows the five forms, with an example of each from the food-delivery company and where most of the hour goes.
Notice that one company produced all five questions. The topic stays the same, but the form changes what a strong answer contains.
A Form Can Be in Disguise
Some questions hide their form. An interviewer might say, "Here is our product. Design whatever AI feature you'd like." That sounds open, but it is Form 3 in disguise. The product already exists, and you choose where AI goes. The question tests your scoping instinct, not your modeling skill. A strong answer lists a few options, picks one, and says why. Capstone: Scoping an AI Design Question works through a question of this kind for the food-delivery company.
What the Five Forms Are Not
The forms are not the same as the three question families. A family describes what the model mainly outputs: a number or a label, content, or actions. A form describes how the question is handed to you. Forms 1, 2, and 4 line up with the predictive, generative, and agentic families. Forms 3 and 5 can hold a design from any family. The Three Question Families explains the families.
The forms are not a ranking of difficulty either. A Form 1 question can be as hard as a Form 4 question. The form changes where the effort goes, not how much effort is needed.
Part 3: The Lane Your Role Sets
The Same Question at Four Depths
The same question can be asked in four kinds of loops. Each loop expects depth in a different lane. The table below shows a common pattern. Loops differ by company, so treat it as a guide, not a rule.
| Role | Where the loop expects depth | Where the model sits |
|---|---|---|
| Software engineer, senior or above | The architecture around the model: data flow, serving, failure handling, and cost | A box whose inputs, outputs, and limits you explain |
| ML engineer | Everything in the row above, plus model choices, features, the training pipeline, and evaluation metrics in real detail | Opened up and discussed in depth |
| AI or platform engineer at an AI-first company | Inference infrastructure: GPU utilization, batching, caching, and latency budgets under load | A heavy workload that the platform must run cheaply and fast |
| Engineering manager or staff-plus engineer | Build-vs-buy reasoning, cost framing, phased rollout, and risk | One part of a plan the team must deliver |
Several terms in that table need a plain definition.
- A GPU is a chip that runs model math very fast. Large models usually run on GPUs, which are expensive to rent. GPU utilization is the share of that paid time the GPU spends doing useful work.
- Batching means running several requests through the model together, so the GPU does more useful work at once.
- Caching means keeping a result so that a repeat request can reuse it instead of calling the model again.
- A latency budget is the most time each part of a request may take, so that the whole request meets its target.
- Build-vs-buy is the choice between building a part yourself and paying for an existing service, such as a hosted model.
- A phased rollout releases a change to a small share of users first, then to more users while the results stay good.
Notice what the software engineer row leaves out. The model can stay a box. You do not derive its insides. But you must still say what goes into it and what comes out of it. You must also state its limits, such as how slow it is and how often it is wrong.
A Common Lane Mistake
One of the most common lane mistakes is going too deep on the model in a software engineer loop.
Here is how it looks. A senior software engineer hears "Design a documents assistant." They spend the first fifteen minutes on fine-tuning objectives: which data to train on, and what the training should optimize. That knowledge is real. But the loop grades the system around the model.
Those fifteen minutes were lost, not gained. They were taken from the serving path, the feedback loop, and the cost, which are the parts this loop grades. Depth in the wrong lane earns little credit, and it uses up time that the graded parts needed.
Ask When the Lane Is Unclear
Sometimes you cannot tell which lane the interviewer wants. Then ask directly:
"Should I focus on modeling depth, or on serving architecture?"
The question does two jobs. It gets you an answer. It also shows that you know both sides exist, which interviewers often look for.
"Assume the Model Already Exists"
Sometimes the interviewer answers the lane question before you ask it. They say, "Assume the model already exists." That sentence saves you time, because it removes training from the scope.
So spend the hour on serving the model, on its cost, and on the feedback loop. Do not use the freed time to discuss fine-tuning or to pick the ideal model. The interviewer just told you that those topics are out of scope.
Part 4: Four Areas Worth Covering in Every Form
The Same Four Areas
Exact grading criteria vary by company. But the same four areas are worth covering in all five forms. A strong AI design answer shows each of them, and a classic system design answer often misses at least one.
-
Requirements discipline, with concrete numbers.
-
The complete loop, from the request back into training and evaluation.
-
Cost and latency realism about every model call.
-
Failure honesty: saying how the model fails before anyone asks.
Area 1: Requirements Discipline, With Concrete Numbers
This area comes first because AI questions usually arrive vaguer than classic ones. "Make support smarter" is not a requirement. A model's quality is not simply right or wrong, so you must choose what good enough means.
Turn the vague request into numbers. For the support assistant, the numbers might be these illustrative assumptions:
- Resolve at least half of routine questions without a person.
- Show the first words of an answer within about one second.
- Spend about 13 cents or less per conversation.
Each number can be argued with, and that is the point. A number gives every later choice something to be measured against.
Area 2: The Complete Loop
A classic system design answer can often stop when the response reaches the user. An AI design answer cannot.
The reason is that a model's answer can be wrong while the service reports success and no error appears. So the system must capture quality signals and feed them back. For delivery-time prediction, the signal is the real delivery time, which arrives later. For the support assistant, the signals include whether the customer still contacted a person, and their rating of the answer.
Those signals flow back into evaluation. They also drive the next change. The delivery-time model is retrained on the real times. The assistant's prompt, documents, or model are improved where the ratings show weak answers. Without these signals, nobody knows whether the system is getting better or worse. What Changes When the System Learns explains why this loop is part of every AI design.
Area 3: Cost and Latency Realism
Many candidates treat a model call like a database read. It is not.
Compare the two with rough, illustrative numbers. A read from a managed key-value database might cost about a millionth of a dollar and take about 2 milliseconds (ms). One chat turn on a large hosted LLM might cost about a cent and take about 2 seconds.
So the LLM call costs about 10,000 times as much as the database read. It is also about 1,000 times slower. These are orders of magnitude, not prices to quote. An order of magnitude is a factor of ten. The gap is worth remembering, because it changes the design.
A senior-sounding answer budgets for that gap in one sentence:
"We cache, and we route about 80 percent of traffic to a small model."
A small model is a model with far fewer learned numbers inside it, so it is cheaper and faster. The cache answers repeated questions that are not personal, such as a refund policy question, without any model call. A router is a small component that picks the model for each request. It sends easy requests to the small model and hard ones to the large model. The 80 percent is an assumption. Tests on real traffic must confirm that the small model answers that share well. Inference Economics shows how to price these choices, and Serving Optimizations covers caching and routing in detail.
Area 4: Failure Honesty
A model can be confidently wrong. It can return a delivery estimate that is 20 minutes too short, or an answer that invents a refund rule. The service still reports success.
So name the failure before the interviewer has to ask. The sentence has a fixed shape:
"The model might be wrong, so we detect it and fall back to something safer."
Then fill in the specifics. If the delivery-time model is down or too slow, the app shows the restaurant's historical average time. If its estimates start to drift away from the real times, monitoring compares the two and raises an alert. If the assistant cannot support its answer with the help articles it found, it does not show that answer. It shows the articles and offers a human agent.
Waiting to be asked reads as if you had not thought about it. Saying it first reads as experience.
What Is Not Graded
Three things take time in many interviews, but they earn little credit.
The math inside the model. Most LLMs are built on a model design called the transformer. In a design round, nobody expects you to derive the transformer's attention equations on a whiteboard. Those equations are part of the math inside the model.
The newest model's name. Model names age in months, which means a newer model replaces the newest one within months. "We use the newest model from one provider" will be out of date soon. A role-based answer stays true: "a hosted large model for hard cases, plus a small, cheap model for easy ones."
Framework trivia. Kafka and Kinesis are two services that carry streams of messages between parts of a system. Pinecone and pgvector are two tools that provide a vector index. Comparing their features is trivia. Knowing why the design needs a message stream or a vector index matters far more than knowing its brand name.
Part 5: Follow One Question
The steps below follow the first minute of one interview. The loop is for a senior software engineer. The question is: "Add AI to our support ticket system."
Step 1: Classify the form. The ticket system already exists, and the question asks where AI goes. This is Form 3. Say it: "This is about adding AI to a working system, so I'll start by choosing where AI helps most."
Step 2: Confirm the lane. The candidate asks, "Should I focus on modeling depth, or on serving architecture?" The interviewer replies, "Assume the model already exists." Training is now out of scope. The first line set the form, and the reply set the lane. The hour belongs to serving, cost, and the feedback loop.
Step 3: State the plan. "I'll pick the first AI feature for the ticket system and set its targets. Then I'll design how the model is served, what it costs, and how we learn whether it helps. I'll finish with how it fails."
The diagram below shows the same three moves, with what is said at each one.
Notice that the whole read takes about thirty seconds. No box has been drawn yet. But the candidate already knows where the hour will go, and the interviewer knows the plan.
Part 6: Using This in an Interview
The 30-second answer (to "Add AI to our support ticket system"): "Before I design, let me place the question. We're adding AI to a system that already works, so the first job is choosing where AI helps. Should I focus on modeling depth, or on serving architecture? If the model can be assumed, I'll set targets with numbers first. Then I'll design serving, cost, and the feedback loop, and close with how the model fails and what we fall back to."
Likely follow-ups:
- "Which model would you use?" Answer with roles, not names. "A hosted large model for the hard questions, and a small model for the easy majority, if tests confirm it answers them well." Names age in months, and roles do not.
- "Actually, let's go deep on the model." Follow the interviewer at once. They just changed the lane, so the depth they asked for is now what gets graded. Keep the plan, and shorten the other steps.
- "Design whatever AI feature you'd like." Name it as Form 3 in disguise. List two or three options, pick one, and give the reason in one sentence.
Common Mistakes
Mistake 1: Designing Before Naming the Form
Drawing boxes before you know the form risks designing the wrong thing well. Name the form in the first thirty seconds.
Mistake 2: Going Deep in the Wrong Lane
Fifteen minutes on fine-tuning in a software engineer loop is fifteen minutes taken from the graded parts. Ask about the lane if it is unclear.
Mistake 3: Ending at the Response
An answer that stops when the response reaches the user has no way to learn whether the model is good. Close the loop.
Mistake 4: Treating a Model Call as Free
A model call can cost thousands of times more than a database read, and take seconds instead of milliseconds. Budget for it, and name the cache and the cheaper path.
Mistake 5: Waiting to Be Asked About Failure
Say how the model can be wrong, how you detect it, and what you fall back to, before the interviewer asks.
Mistake 6: Naming Models Instead of Roles
A model name will be out of date soon. Describe the role each model plays instead.
FAQs
Q: Do I need to know the math inside an LLM?
No. In a design round, interviewers do not expect you to derive the transformer's equations. They expect you to know what the model takes in, what it returns, how slow it is, what it costs, and how it fails.
Q: Is the form always clear from the first sentence?
No. Some questions hide their form, and some mix two forms. Name what you see, and ask the interviewer which part to spend the hour on.
Q: Does every company grade exactly these four areas?
No. Grading criteria differ by company and role. But the four areas are worth covering in every form, because each one is easy to skip under time pressure.
Q: Should I avoid naming tools such as Kafka or a vector database?
No. Naming a tool is fine. Explain why the design needs it, and do not spend minutes comparing brands.
Q: Can I ask the interviewer which lane they want?
Yes. Asking "modeling depth, or serving architecture?" is a sign of judgment, not of weakness.
Key Takeaways
- AI design questions come in five forms. Design a known ML product, or design a GenAI product. Add AI to an existing system, or design an agent. Or critique or scale an existing AI design.
- The form tells you where the hour will go. Name it in the first thirty seconds. An open question about an existing product is Form 3 in disguise.
- Your role sets the lane. A software engineer loop keeps the model a box with known inputs, outputs, and limits. An ML engineer loop opens the box. Platform roles go deep on inference infrastructure, and manager roles on build-vs-buy and rollout.
- Four areas are worth covering in every form. Requirements with numbers, the complete loop, cost and latency realism, and failure honesty.
- A model call is not a database read. In rough terms, it can cost about 10,000 times as much and take about 2 seconds instead of about 2 ms.
- Some things earn little credit. Attention equations, the newest model's name, and brand comparisons such as Kafka versus Kinesis.
- In a system design interview, classify the form, confirm the lane, and state your plan before you draw anything. If the interviewer says the model already exists, spend the hour on serving, cost, and the loop.
The next lesson, What Changes When the System Learns, explains what makes AI systems different from the systems you already design.
Check Your Understanding
1. An interviewer says, "Here is our food-delivery app. Design whatever AI feature you'd like." Which form is this, and what does it test?
<details> <summary>Show answer</summary>It is Form 3 in disguise: add AI to an existing system. The app already exists, and you choose where AI goes. It tests scoping judgment, so list a few options, pick one, and give your reason.
</details>2. In a senior software engineer loop, a candidate spends fifteen minutes on how to fine-tune the model. What did that cost them?
<details> <summary>Show answer</summary>Fifteen minutes of system design time. This loop grades the architecture around the model. The minutes spent on fine-tuning were taken from the serving path, the feedback loop, and the cost.
</details>3. Why can't an AI design answer stop when the response reaches the user?
<details> <summary>Show answer</summary>Because the system must learn whether the response was good. A model can be wrong while the service reports success. So the design captures quality signals, such as real outcomes and user ratings. It feeds them back into evaluation and into the next version of the model.
</details>4. The interviewer asks which model you would use. Why is naming the newest model a weak answer?
<details> <summary>Show answer</summary>Because model names age in months. A role-based answer stays true: a hosted large model for hard cases, and a small, cheap model for easy ones. It also shows the cost reasoning behind the choice.
</details>Reading Progress
0%
On This Page
Know the Vocabulary
Part 1: The Same Topic, Asked Five Ways
The Problem
Why These Questions Exist
What This Lesson Gives You
Part 2: The Five Forms
The Definition
A Form Can Be in Disguise
What the Five Forms Are Not
Part 3: The Lane Your Role Sets
The Same Question at Four Depths
A Common Lane Mistake
Ask When the Lane Is Unclear
"Assume the Model Already Exists"
Part 4: Four Areas Worth Covering in Every Form
The Same Four Areas
Area 1: Requirements Discipline, With Concrete Numbers
Area 2: The Complete Loop
Area 3: Cost and Latency Realism
Area 4: Failure Honesty
What Is Not Graded
Part 5: Follow One Question
Part 6: Using This in an Interview
Common Mistakes
Mistake 1: Designing Before Naming the Form
Mistake 2: Going Deep in the Wrong Lane
Mistake 3: Ending at the Response
Mistake 4: Treating a Model Call as Free
Mistake 5: Waiting to Be Asked About Failure
Mistake 6: Naming Models Instead of Roles
FAQs
Key Takeaways
Check Your Understanding