Chapter 2How it writes
Where good chances come from
How does the model come up with chances good enough to write a clear paragraph? Part of the answer is the design today’s models are built on, the transformer, introduced in a June 2017 paper called “Attention Is All You Need.”1 Its key idea, attention, relates each token to the other tokens in the text, all at once, and weighs which ones matter for what it means.1 When the model is writing, each new token can look back at every token before it.1
Take the word bank. In “we fished from the river bank,” the words fished and river come before it; in “I deposited the check at the bank,” deposited and check do. (The example is this book’s, not the paper’s.) Attention lets the model weigh those earlier words, so the same token can be read one way in one sentence and another way in the next.
The rest of the answer is training, which happens in stages. In the first and biggest, called pretraining, the model plays the very game you played at the start of this chapter. It works through a huge amount of text and, at every point, predicts the next token.2 Its internal settings, called parameters, are adjusted over and over so that its predictions improve.2 GPT-3, a model from 2020, had 175 billion of them.3
A model fresh from pretraining is good at continuing text, which is not the same as being a good assistant. As the researchers behind one well-known coaching method put it, making language models bigger “does not inherently make them better at following a user’s intent.”4 So the model is coached in a second stage. In that method, people first wrote examples of good answers to prompts, and the model was trained on those examples. Then people ranked the model’s own answers from best to worst, and the model was trained further toward the kinds of answers people ranked higher.4
The coaching made a large difference. In the researchers’ tests, people preferred answers from a 1.3-billion-parameter model coached this way over answers from the 175-billion-parameter GPT-3, a model more than 100 times its size.4 Feedback can come from AI as well as from people. In a method Anthropic calls Constitutional AI, a model critiques and revises answers against a written list of principles, and a model, rather than a person, judges which of two answers is better.5
All of this happens before you use the model. Training adjusts the parameters and takes enormous computing power.63 (What that power costs in energy is one of the questions Chapter 15 takes up.) Use is different, and it happens every time you send a message. The parameters don’t change:3 the model reads what is in front of it and predicts a reply.7 Whether your conversations are later used to train a future model is a separate question. It depends on your account and settings,89 and Chapter 10 takes it up.
One way to hold all of this in mind is to picture an apprentice. The apprentice learned language by playing fill-in-the-blank on an enormous scale, then went to finishing school to learn how to help. Everything the apprentice knows was settled before you arrived. And the apprentice works at a desk that holds only so many pages at once.
Notes (9)
- 1Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin, “Attention Is All You Need” (preprint, arXiv, June 12, 2017), https://doi.org/10.48550/arXiv.1706.03762. Cited at pages 2, 5.
- 2A. Radford et al., “Improving Language Understanding by Generative Pre-Training,” OpenAI, 2018, https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf (accessed October 27, 2026). Cited at page 3.
- 3Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, et al., “Language Models are Few-Shot Learners” (preprint, arXiv, May 28, 2020), https://doi.org/10.48550/arXiv.2005.14165. Cited at page 1.
- 4Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, et al., “Training language models to follow instructions with human feedback,” in Advances in Neural Information Processing Systems 35 (2022), 27730–27744, https://doi.org/10.52202/068431-2011.
- 5Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, et al., “Constitutional AI: Harmlessness from AI Feedback” (preprint, arXiv, December 15, 2022), https://doi.org/10.48550/arXiv.2212.08073. Cited at page 1.
- 6Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei, “Scaling Laws for Neural Language Models” (preprint, arXiv, January 23, 2020), https://doi.org/10.48550/arXiv.2001.08361.
- 7Anthropic, “Effective context engineering for AI agents,” Anthropic Engineering, September 29, 2025, https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents (accessed October 27, 2026).
- 8Anthropic, “Updates to Consumer Terms and Privacy Policy,” August 28, 2025, https://www.anthropic.com/news/updates-to-our-consumer-terms (accessed October 27, 2026).
- 9Anthropic, “Is my data used for model training? (commercial),” Anthropic Privacy Center, August 18, 2026, https://privacy.claude.com/en/articles/7996868-is-my-data-used-for-training (accessed October 27, 2026).
Chapter 2 · page 4 of 6
Turn pages with the ← and → keys.