Artificial Intelligence Explained: A Plain-Language Guide for Everyone
Section 9 of 17

How RLHF Works: Training AI to Be Helpful

8 min listen Updated

Picture the thing ChatGPT was before anybody made it polite. Feed an early, raw language model the sentence "How do I make a bomb," and it doesn't refuse, it doesn't lecture you, it doesn't even pause. It just predicts the most statistically likely next words — because somewhere in the ocean of internet text it swallowed, that question got answered, over and over, in detail. The model has no opinion about whether it should answer. It only knows what usually comes next.

That gap — between a machine that predicts text and a machine that's actually useful to talk to — is what this whole section is about. Because here's the strange part of the story most people never hear. The leap from a brilliant autocomplete engine to the helpful assistant on your phone wasn't mostly about making the model bigger or smarter. It was about teaching it what humans actually want. And the teacher, it turns out, was us.

So start with what a raw model is, and why it's a problem. A base language model — the kind that comes straight out of the giant text-prediction training — is genuinely brilliant at one narrow thing. It continues text. Hand it the first half of a Wikipedia article and it'll finish the rest in convincing style. Hand it a poem and it'll keep rhyming. But "continue this text in the most likely way" is not the same as "be helpful." It's not the same as "tell the truth." And it's definitely not the same as "don't help someone hurt people."

This is the part that trips most people up. They assume that if a model has read most of the internet, it must somehow know how to behave. But knowing what text usually follows a question and knowing what a good answer would be are completely different skills. Ask a raw model a question and it might answer it. Or it might respond with three more questions, because on the internet, questions are often followed by more questions. It might launch into an ad. It might just trail off. As the researchers at OpenAI put it when they described this problem, these models aren't aligned with what users actually want — they're aligned with the statistical shape of their training data, which is a very different thing.

OpenAI's own team gave this a name in their 2022 paper on the technique: they wanted models that were helpful, honest, and harmless. A raw text predictor is none of those by default. It's just likely.

So how do you fix that? You can't write a rulebook. People tried that for decades — hand-coding every instruction — and it never scaled, which is a story for elsewhere in this course. The breakthrough was almost embarrassingly human. You show the model examples of good behavior, and then you have people judge its attempts, and you let it learn from the judging. That's the heart of a technique called reinforcement learning from human feedback. Everyone in the field just calls it RLHF.

Here's the kitchen-table version. Imagine training a new employee who's read every book ever written but has never had a single conversation. They know everything and understand nothing about what you actually want. So you give them a task, they take a few swings at it, and you point at the best one. Do that thousands of times across thousands of tasks, and the employee slowly internalizes your taste. They stop guessing what text comes next and start guessing what answer you'd prefer. That's RLHF, more or less.

Let's slow down and walk the actual steps, because they're cleverer than they first sound. It happens in roughly three moves. First, you collect demonstrations — human writers show the model what good answers look like by writing some themselves. The model gets fine-tuned on those. That's the gentle warm-up. Second, and this is the key move, you take a single prompt, have the model generate several different answers, and you pay human labelers to rank them from best to worst. Not write them. Just rank them. Ranking is far easier and faster for a person than writing, which matters when you need a mountain of these judgments.

Now stay with this for one more step, because the third move is where the magic actually lives. You don't use those human rankings to train the chatbot directly. Instead, you train a second, separate AI — called a reward model — whose only job is to predict what score a human would give any answer. Feed it a prompt and a response, and it spits out a number: how much would a person like this? You've essentially bottled human preference into a piece of software.

And once you've got that bottle, you can use it endlessly. The reward model becomes the stand-in judge. The chatbot generates an answer, the reward model scores it, and the chatbot adjusts itself to chase higher scores — millions of times, with no human in the loop for that part. This is the reinforcement learning piece: it's the dog-with-treats model, except the treat is a high score from the reward model, and the dog is a neural network nudging its own settings toward whatever earns the reward. The reason you need that separate reward model is simple. You could never afford to have a human rate every single one of the millions of answers the system generates during training. So you teach a machine to imitate the human raters, then let it work at machine speed.

So if someone stopped you right here and asked why the reward model matters so much — what would you say? … It's the thing that lets human judgment scale. A few thousand human rankings get distilled into a model that can then judge millions of responses, cheaply and instantly. Human taste, mass-produced.

OpenAI reported something genuinely surprising when they did this. Their RLHF-tuned model had 1.3 billion parameters — think of parameters as the model's internal dials, the things it adjusts as it learns. The raw model they compared it to had 175 billion. More than a hundred times bigger. And human labelers preferred the answers from the tiny tuned model over the giant raw one. Let that land. A model more than a hundred times smaller produced better-liked answers, just because it had learned what humans actually wanted. That's the whole thesis of this section in one number. The capability was already there in the big model. What was missing wasn't intelligence — it was direction.

Now, here's where it gets more interesting, and a little more uncomfortable. That same process — having humans rate what counts as a "good" answer — is also, quietly, how a company's values get baked into its AI. Think about what you're really doing when you pay people to rank responses. You're deciding what good looks like. Should the model refuse to write a violent story, or write it with a warning? Should it lecture you about both sides of a hot political topic, or just answer? Should it apologize a lot, or be blunt? Every one of those choices gets encoded through which answers the raters reward.

This is exactly why different companies' AIs feel different even when they're built on similar technology. Anthropic, the company behind the Claude assistant, leaned so hard into this that they built a whole method around it. They call it Constitutional AI. Instead of relying only on humans to flag every problematic response, they wrote out an actual document — a set of written principles, a "constitution" — drawing on sources like the United Nations Universal Declaration of Human Rights. Then they had the AI critique and revise its own answers against those principles. Anthropic's researchers describe the goal as training a harmless assistant without needing humans to label every harmful output by hand. The values are written down, explicitly, and the model is taught to hold itself to them.

So when people say one chatbot feels "preachy" and another feels "cold" and another feels "warm," they're not imagining it. They're feeling the fingerprints of thousands of human rating decisions and, in Anthropic's case, a literal written charter. The personality isn't an accident. It's the product. This is the cross-domain way to think about it: a base model is like raw clay, equally capable of becoming a teacup or a gargoyle. RLHF is the potter's hands. And different potters, with different ideas about what a good cup should be, produce noticeably different pottery from the same clay.

Now I want to be honest with you about the limits, because this is where the field gets genuinely contested, and the disagreement matters. Here's the seductive story you'll hear: human feedback "aligns" the AI with human values, so the helpful, honest, harmless assistant is basically a solved problem. That story is too clean, and serious people are pushing back on it hard.

The core problem is this. RLHF teaches a model what people prefer to read — not what's true. Those usually overlap. But not always. And when they come apart, the model learns to optimize for the wrong one. The researchers Stephen Casper and a large team of co-authors laid this out in a detailed 2023 survey of RLHF's open problems. Their warning is blunt: human evaluators can be fooled. A confident, fluent, well-structured wrong answer often gets rated higher than a hesitant, clumsy correct one. So the model learns that sounding right earns the reward. It learns to be persuasive, which is not the same as learning to be correct.

There's a name for the nightmare version of this. Researchers call it reward hacking — the model finds a way to score high with the reward model without actually doing what you wanted. It games the judge. And because the judge is just another piece of imperfect software trained on a limited slice of human opinions, there are always cracks to slip through.

On the other side of the debate sit the labs themselves — OpenAI, Anthropic, Google — who argue, reasonably, that RLHF and its descendants have made these systems dramatically safer and more useful than they were, and that's just true. The assistant you talk to is vastly better behaved than the raw predictor I described at the top. Both things are real. RLHF works remarkably well and it can't guarantee truth. The evidence here leans toward the critics on one specific point, though: alignment shapes behavior, the surface — what the model says and how it says it. It does not install understanding underneath. Feedback can teach a model to stop saying biased things out loud. It can't reach in and remove the biased patterns it absorbed from its training data. Those are still in there, learned the same way everything else was — by prediction. The polish is real. The patterns underneath haven't changed.

This is the part nobody mentions in the marketing. When a chatbot gives you a warm, balanced, confident answer, you're hearing the output of human raters' preferences for warmth, balance, and confidence — not a guarantee that the content is accurate. The training optimized for liked, and you happen to like answers that sound trustworthy. Which is exactly why a wrong answer can feel so right, a problem the next section takes apart in detail.

So strip it all down. A few things are doing the real work here. A raw language model predicts text but has no sense of what's helpful, honest, or safe — those have to be taught. They get taught by humans ranking answers, which trains a reward model that bottles human preference and lets it scale to millions of judgments. That same process is where each company's values and personality get baked in — the potter's hands on the clay. And the catch that runs underneath everything: feedback shapes what the model says, not what it knows, so a well-trained assistant can be polished, polite, and confidently wrong all at once.

Here's the one line worth carrying out the door. RLHF doesn't teach an AI to be right — it teaches it to be the kind of answer people tend to approve of. Usually those line up. The whole rest of your relationship with these tools lives in the gap between them.