Prompt Chaining
Every technique in this course has been about controlling what goes into a single context window before the model answers. Prompt chaining is the same idea applied across multiple calls: instead of asking a model to do several distinct jobs at once, break the task into steps, and feed each step's real output into the next step's context window as a fresh, focused prompt.
Predict before you look
Same two-part task — summarize an article, then translate the summary — done as one combined prompt versus two separate chained calls. Before you look: do you expect the chained version's translation to be a translation of the exact same sentence the single-prompt version summarized?
Both routes produced a reasonable summary and a reasonable French translation — this is a task the model handles fine either way, and it's worth being honest that chaining isn't always strictly necessary. But look at what's structurally different: in the single-prompt version, the model juggles two instructions ("summarize, then translate") inside one generation, and if the summary drifts even slightly, the translation compounds that drift with no checkpoint in between. In the chained version, step 2's context window contains only the literal, real text step 1 produced — a plain string substitution, no hidden reasoning — which means you could inspect, log, or even edit the intermediate summary before it ever reaches the translation call.
That inspectability is chaining's real payoff, and it scales with task complexity: the harder and more multi-stage the task, the more valuable it becomes to have a clean, focused context window — and a checkpoint you can verify — at every step, rather than one context window trying to hold the entire task at once.
That closes the loop on this course. Lesson 1 established the one fact everything else builds on: a prompt is just tokens in a context window, and attention is what makes those tokens useful. Lessons 2-4 showed three ways to fill that window more deliberately — examples, reasoning steps, and role framing. Lesson 5 showed two ways to get more reliable answers out of the same mechanism — voting across samples, and specifying exact output shape. This lesson showed that the same discipline scales across multiple calls, not just one. None of it is magic — it's all downstream of the attention mechanism you built from scratch in Zero to GPT.
What's the main structural advantage of a 2-step chained prompt over 1 combined prompt doing the same two jobs?