BOOK DEEP READ · Generative AI System Design Interview · Chapter 4

ChatGPT: the hard part isn't making it smarter, it's turning a text continuer into an assistant

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

中文 →

What is this chapter about?

You type a line into a chat box and something writes back like an assistant. This chapter is about the steps between a machine that has read most of the written world and that assistant — and those steps have almost nothing to do with making it know more.

A strange thing first

The freshly built machine already knows a great deal, but it does not answer you. Ask it "how do I soft-boil an egg" and it may well continue: "how do I soft-boil an egg? how do I fry one? how do I…" — because all it ever learned was to continue: see half a sentence, guess the rest. And on the internet, a question is very often followed by another question. It isn't unable to answer; nobody ever told it that being asked means answering.

Why the old way was hard

So write rules? The trouble is that "a good answer" cannot be written down as rules: lead with the conclusion or not, how long, ask a clarifying question or not, when to refuse outright — the answer changes with every request. It is the kind of thing you recognise instantly but cannot specify.

How it is actually done

Step one: have people demonstrate. Pay people to write good answers to a batch of questions by hand, and let the machine imitate them — like a new hire reading a folder of examples. The catch is plain: demonstrations are slow and expensive to write, and tens of thousands of them still cannot cover everything people ask.

Step two: have people judge. Let the machine write several versions of the same answer, and ask a person only which one is better. Picking is ten times faster than writing, and two people agree far more often about "which is better" than about "what score does it deserve". Feed those picks to a second machine and you get a scorer: hand it an answer, it hands back a number.

Step three: practise against the scorer. The machine writes, the scorer grades, the machine shifts a little towards higher scores, over and over. People no longer sit in the loop — their judgment already lives inside the scorer.

One more thing matters: a leash. It is not allowed to drift far from what it was. Without the leash it learns to please the scorer rather than do the job — discovering, say, that longer answers score higher, and padding every reply from then on.

Talking well isn't enough: memory and outside help

It can only look at one small stack of paper at a time, so a long conversation stops fitting: either the earlier turns get boiled down into a summary, or the important things you once said get written into a notebook and looked up when needed. It also can't do big arithmetic and doesn't know today's news — so it has to learn one more habit: when the job is beyond it, ask for a tool. The system looks something up or computes it, hands the result back, and the machine carries on.

One honest cost: the same training that makes it obedient also makes it eager to agree — saying "you're right" where it should say "your premise is wrong". Flattery is the shadow of that leash. You cannot remove it, only manage it.

One line to remember

What it has read decides what it knows; these later steps decide how it is willing to talk to you — and since "well said" has no right answer, the only way in is people picking, again and again, between two versions.

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