Grokking the AI System Design Interview
Vote

0% completed

​

Introduction: The AI Interview Landscape

A New Kind of Design Question

What Preparation Should Cover

What This Module Gives You

The Lessons

Terms Used Throughout

Before You Start

A New Kind of Design Question

System design interviews have changed.

For a decade, the classic question was "Design Twitter" or "Design a URL shortener." You will still get those.

But a new kind of question now appears alongside them.

The classic questions, and the AI design questions beside them.
The classic questions, and the AI design questions beside them.

"Design YouTube's recommendation system." "Design a ChatGPT-style assistant for our product." "Design an agent that resolves customer-support tickets."

These questions may appear in a dedicated AI system design round or as part of a broader system design interview. The format depends on the company and role.

They are relevant to software engineers building AI features, not only to machine learning (ML) specialists.

What Preparation Should Cover

A common preparation mistake is spending too much time on model architecture: the internal structure of a model.

For example, you might study transformers, a neural network architecture used by many language models. You might go further into their attention mechanism, the part that decides which pieces of the input matter most for each piece of the output.

This knowledge can help, especially in roles that focus on developing models. However, it does not replace preparation for designing the complete system.

You still need to answer familiar system design questions. What are the requirements? Where does the data come from? How does a request move through the system? What can fail, and what will the system cost?

AI systems also require you to explain how you will measure output quality and handle incorrect results.

What This Module Gives You

This module introduces the main types of AI system design questions and a clear method for answering them.

The four things this module teaches.
The four things this module teaches.

You will learn four things.

  1. The different forms of AI system design questions.
  2. What changes when a system uses a model.
  3. How to identify which of the three question families a question belongs to.
  4. A repeatable framework for organizing your answer.

Later modules explain the technical details. This module helps you understand what the question asks before you choose an architecture.

The Lessons

Question the lesson answersLesson
What forms do AI design questions take, and how do they differ by role?How AI System Design Shows Up in Interviews
What is different from classic system design?What Changes When the System Learns
Which kind of AI question am I being asked?The Three Question Families
How do I organize an answer within the interview time limit?A Framework for AI Design Answers
How do I turn an unclear AI question into a defined problem?Capstone: Scoping an AI Design Question

Terms Used Throughout

Treat a model as one more component in the diagram.
Treat a model as one more component in the diagram.

Model. A function whose behavior is learned from data, instead of being written by a developer.

It takes an input, such as a user's watch history or a typed question, and produces an output, such as a recommendation score or generated text.

In this course, treat a model as a component in your architecture, alongside databases, caches, and other services.

You need to consider its latency, or how long it takes to return a result. You also need to consider its cost, possible failures, and how you will deploy and update it. Unlike a database lookup, a model's output may be incorrect even when the request completes successfully.

Training. The process of learning or updating a model from data. It often runs in background jobs, separately from live user requests. How often it runs depends on the application.

Inference. Running a trained model on an input to produce a prediction or other output.

Inference can run in two ways:

  • Online inference: The model processes a live request. It must return a result within the application's response-time limit.
  • Batch inference: The model processes a collection of inputs in a background job. The results can be stored for later use.

For example, a recommendation system might calculate suggestions overnight or generate them when a user opens the app.

Much of the architecture taught in this course exists to make inference fast, reliable, and cheap to run. The rest of it helps you measure output quality and handle unsafe or incorrect results.

Keep training and inference separate in your explanation and diagrams. One updates the model; the other uses it to produce results.

Before You Start

Answer these three questions for a product you use daily. Brief answers are fine. You can improve them as you work through the module.

  1. Pick one AI feature in that product, such as a feed, autocomplete, or a chatbot. What metric would you use to measure whether the feature works well?
  2. When that feature produces a poor result, such as irrelevant recommendations or a wrong answer, how could the company detect the problem?
  3. If the feature were unavailable for an hour, would the product still work? What would users see instead?

Reading Progress

0%


Vote for new content

On This Page

A New Kind of Design Question

What Preparation Should Cover

What This Module Gives You

The Lessons

Terms Used Throughout

Before You Start