AI / ML topic How Does a Text Predictor Become an Assistant?

A freshly trained language model doesn't answer questions; it continues them. Post-training explained: example answers, human preferences, RLHF and DPO, rewards a program can check, written principles, and the ways it all goes wrong.

· ml, llm, post-training, explainer

Ask a freshly trained language model “What’s the capital of France?” and you might get back something like “What’s the capital of Germany? What’s the capital of Italy?” It isn’t being difficult. It learned from web pages, and on the web, a question is often followed by more questions, like a quiz.

That’s a : the output of , trained to predict the next across trillions of words. OpenAI’s InstructGPT paper put the gap precisely: predicting the next token on a web page “is different from the objective ‘follow the user’s instructions helpfully and safely’”. Closing that gap is , and it’s where a model gets most of what you’d call its personality.

Step one: show it good answers

The first move is . People write example conversations, a request and an ideal reply, and the model is trained on them until “assistant answers the question” becomes the most likely continuation. For InstructGPT, OpenAI hired about 40 contractors to write and rank this data.

Examples teach the format well, including the chat format itself: whose turn it is, and when to stop talking. They’re a poor way to teach judgment, because people are much better at recognizing a good answer than at writing the perfect one.

Step two: learn what people prefer

So the next step asks people to compare. Show them two answers to the same prompt; they pick the better one. Collect enough of those picks and you can train a that predicts which answer a person would prefer. Then let the assistant practice, generating answers and nudging itself toward ones the reward model scores highly.

That’s , reinforcement learning from human feedback. The modern recipe comes from a 2017 paper that taught simulated robots and game-playing agents from people choosing between short clips.

It worked dramatically. In InstructGPT, people preferred answers from a tuned model with 1.3 billion over the 175-billion-weight GPT-3, “despite having 100x fewer parameters”. Try being the labeler:

Live · you're the labeler
Is 0.1 + 0.2 exactly 0.3 in most programming languages?
What the reward model has learned you like
Correct
0.0
Concise
0.0
Flatters you
0.0
Hedges
0.0
0 picks
Pick the answer you'd rather get. Try being honest for a few rounds, then try being flattered.
A toy: the reward model is one number per trait, and the traits were labeled by hand. Real reward models are neural networks trained on huge numbers of comparisons, but they learn the same way: from which answer people picked.

The RL step is fiddly, so in 2023 researchers showed a shortcut. learns straight from the preference pairs with “only a simple classification loss”, no separate reward model or practice loop. It became a common choice for models: Meta’s Llama 3 and AI2’s Tulu 3 both use it.

Step three: rewards a program can check

Preferences are fuzzy. Some tasks aren’t: a math answer is right or wrong, and code passes its tests or doesn’t. , a name the Tulu 3 team gave it in 2024, lets the model practice on problems like these and rewards it only when a checker says it succeeded.

It’s a big part of how open reasoning models such as DeepSeek-R1 got so good at math and code. DeepSeek trained R1-Zero with reinforcement learning and no example answers at all. Its score on a hard math competition, AIME 2024, rose from 15.6% to 71.0% as it learned, by its own practice, to write out longer and more careful reasoning.

Step four: character and principles

The last layer is who the model is: what it refuses, how it handles hard topics, how honest it is about uncertainty. Anthropic’s (2022) had the model critique and revise its own answers against written principles, where “the only human oversight is provided through a list of rules or principles”. In January 2026, Anthropic published Claude’s full constitution, and said Claude uses it to create many kinds of its own training data.

Where it goes wrong

Anything trained to maximize a score learns to maximize the score, whether or not that’s what you meant. That’s . OpenAI’s classic 2016 example is a boat-racing agent that found it scored more by circling a lagoon, crashing and catching fire than by finishing the race. In 2025, Anthropic reported that a model that learned to cheat on coding tasks also got worse in other ways, including sabotaging code.

The quieter failure is . People tend to rate answers that agree with them more highly, and a model trained on those ratings partly learns to tell people what they want to hear. In April 2025, OpenAI rolled back a GPT-4o update that had become “overly flattering or agreeable”, saying it had “focused too much on short-term feedback.” If you let the demo learn that you like flattery, you’ve just rebuilt that bug.

So how does it become an assistant?

In layers, on top of the knowledge from pretraining: example answers teach the format, preferences teach taste, checkable rewards teach rigor, and written principles shape character. That’s how the thing that answered a quiz question with more quiz questions learns to just say “Paris.” But every layer points the model at a target someone chose, and it will chase that target harder than you expect. That’s why the and evals around post-training matter as much as the training itself.

References & further reading

The methods in the order they appeared, then the failures.

DPO05 / 13

The Llama 3 Herd of Models

Llama Team · Meta · 2024

Pretrained on 15.6T tokens, then post-trained with rounds of SFT, rejection sampling and DPO.

Character08 / 13

Constitutional AI: Harmlessness from AI Feedback

Bai et al. · Anthropic · 2022

No human labels for harmful outputs; the only oversight for harmlessness is a list of principles. The model critiques itself, then trains with RL from AI feedback.

Character09 / 13

Claude's new constitution

Anthropic · January 22, 2026

The full document, and how Claude uses it to construct its own training data.

Failures13 / 13

Sycophancy in GPT-4o

OpenAI · April 29, 2025

A rolled-back update that was "overly flattering or agreeable", traced to leaning too hard on short-term feedback.