Book Deep Read · Generative AI System Design Interview · Ch 1

Introduction and Overview: the seven-step framework for generative systems

Generative AI System Design Interview · Ch 1 · Ali Aminian, Hao Sheng & Alex Xu · 2024

中文 →

What is this chapter about?

You let an AI finish your sentence in an email, draft a weekly report, or paint a picture from one line of text. Behind each of those products is not just "a clever model" but a whole system. This book is about designing such systems, and Chapter 1 hands you the blueprint: when someone asks you to build a product that generates things, in what order should you think, and where do people fall over?

First, something strange

Older AI was more like a sorter: show it a photo, it says "cat" or "dog" — one answer, obviously right or wrong. Today's AI is more like a cook: ask for scrambled eggs and tomato and you get a hundred defensible versions, none of them "the" answer. It sounds like a small change of job. For the people building the system, it overturns three basic rules at once.

Three old rules that stopped working

One: you can no longer mark the exam. A sorter is checked against the answer key. A cook has to be tasted, and "tasty" was never the same for two people.

Two: you are now billed by the word. A single old-style judgement cost almost nothing. This thing burns compute for every word it emits, and a chattier version can multiply the bill.

Three: when it is wrong, it does not cry out. Old systems crash, time out, throw errors. This one says the wrong thing beautifully — unless you go and check, you cannot tell.

The blueprint: seven steps

The heart of the chapter is breaking the build into seven steps, each answering one concrete question. ① Pin down what you actually want — how fast, how much per request, and what must never be said. ② Decide what the job really is — writing, drawing, speaking — and fix exactly what goes in and what comes out. ③ Gather the ingredients: where the data comes from and how the dirty parts get washed. ④ Pick the method (more on that below). ⑤ Taste it — on what grounds do you claim this version beats the last? ⑥ Serve it: put it in front of real users, fast and cheap. ⑦ Keep watching, because the world shifts and it quietly gets worse.

Picking the method: don't climb if you don't have to

The most valuable thing in step four is a money-saving rule: capability comes on four steps of a ladder, and you start on the cheapest one and only climb when it isn't enough.

Step one: just talk to it properly — spell out what you want; you can try this in an afternoon. Step two: hand it a stack of documents to look things up in — have it read your own files before answering, which cures "it doesn't know anything about our company". Step three: train it specially — put a few hundred to a few thousand of your own examples through it, which cures "it knows, but the tone and the format are wrong". Step four: raise one from scratch — months of work and thousands of GPUs, which most teams will never need. Each step up buys control, and can cost a thousand times more in money and time.

One line to remember

Building a generative product is not about finding a cleverer model. It is that three old rules changed: there is no answer key, so you have to define what "good" means yourself; every word costs money, so thrift is a design problem and not a finance problem; and it lies fluently, so somebody — a person or another model — has to be assigned to check. The rest is following those seven steps.

Want the mechanisms, the notation and the diagrams? → Switch to the deep read