1. Data: where every model begins
Everything starts with text, and a staggering amount of it, pulled from public websites, books, research papers and code. Gathering it is the easy half. Cleaning it is the hard half, because duplicates, spam and low-quality junk all drag a model down. The rule is blunt. Garbage in, garbage out, and cleaner data usually beats simply having more of it. The text is then broken into tokens, the small chunks a model actually reads. Models never see letters, only tokens, which is why they sometimes miscount the letters in a single word.
2. Pretraining: where it learns almost everything
This is the expensive stage, and it runs on one goal: predict the next token. The model guesses what comes next, checks the real answer, nudges its internal settings, and repeats that across trillions of tokens. Nobody sits it down and teaches it grammar or Python. It picks those up on its own, because understanding them helps it guess better. What you get at the end is a base model that knows an enormous amount but has no idea it is supposed to help you. This single idea explains a lot, including why these models are so fluent and why they still hallucinate.
3. Supervised fine-tuning: teaching it to be an assistant
A base model knows language but not its job. Supervised fine-tuning fixes that by training it on thousands of handpicked examples, each pairing a question with a good answer or an instruction with the right response. The mechanics do not change. It is still predicting the next token, just from high-quality demonstrations instead of raw internet text. Here quality beats quantity by a mile, with only thousands of carefully written examples doing the work. After this stage the model can genuinely follow instructions, answer questions and write code, even if it still lacks the final polish.
4. Reward modeling: teaching it what people prefer
This is the least-discussed stage and a big reason modern assistants feel so smooth. The catch is that most questions have no single right answer, only answers people tend to prefer. So the model produces several responses, humans rank them, and that ranking trains a second network called a reward model whose only job is to predict what people will like. Asking humans to score every answer would never scale. A reward model learns from thousands of those comparisons, then quietly judges millions of new answers on its own.
5. Reinforcement learning: the final polish
The last stage, known as RLHF, turns a capable model into the assistant people actually use. You take the fine-tuned model and the reward model and loop them. The assistant answers, the reward model scores it, and the assistant updates itself to score higher next time. Generate, evaluate, improve, repeat. Because the scoring is automatic, the model can keep practicing long after humans stop. Newer systems add feedback drawn from written principles, an approach Anthropic calls Constitutional AI, but the aim is the same, steering the model toward answers people actually trust.
The whole pipeline in five words
Put together, the stages run in order: data, pretraining, supervised fine-tuning, reward modeling, reinforcement learning. The thread, posted on July 6, 2026, ends with a nudge rather than a victory lap, telling readers to pick stage one and build a small version themselves so the black box turns into something they understand. That is the real payoff it is selling. Not a copy of GPT or Claude, but the mental model behind every answer they give you.