Large Programs

Home / How LLMs Work

How LLMs Work

What Is RLHF? Teaching AI with Human Feedback

Reinforcement learning from human feedback uses people's rankings to train a reward model, which then guides a chatbot toward answers people prefer. Steps, an analogy and the limits.

27 November 2026 · 3 min read

After a language model has learned from lots of text, it can continue sentences but may not answer the way people want. RLHF, short for reinforcement learning from human feedback, is one way to move it toward answers people prefer.

Simplified steps: the model writes answers, people compare them, a reward model learns their choices, the chatbot is adjusted.

Simplified steps: the model writes answers, people compare them, a reward model learns their choices, the chatbot is adjusted.

Why not just write the rules?

Wikipedia says RLHF is useful when a task is hard to specify but easy to judge. It is very hard to write down a full definition of "helpful and harmless". Asking people to write examples of harmful and harmless text is slow. But people are good at looking at two answers and saying which is better.

The steps in plain words

  1. The model writes several answers to the same question.
  2. People rank those answers from best to worst.
  3. A reward model learns to predict those rankings. Wikipedia says it is trained to predict whether a response to a prompt is good (high reward) or bad (low reward).
  4. The language model is then trained, using reinforcement learning, to produce answers that earn a high score from the reward model. Wikipedia names proximal policy optimization as one algorithm used for this step.

A cooking-contest analogy

Imagine a baker who bakes five loaves a day. A panel of tasters ranks them. Another person learns the panel's taste so well that they can predict the ranking without the tasters. The baker then practises against that predictor. That predictor is the reward model. The risk is clear too: if the predictor is wrong about taste, the baker practises the wrong thing.

Where it came from

Wikipedia says RLHF was not the first method of using human feedback in reinforcement learning, but is one of the most widely used. The form used today was introduced by OpenAI in a paper on summarising text from human feedback, and it became popular when the method was reused in the InstructGPT paper (2022, "Training language models to follow instructions with human feedback"). Wikipedia describes the process as being used for conversational agents and summarisation, and also for text-to-image models and video game bots.

How the feedback is collected

The most common form is ranking. Wikipedia explains that rankings can be turned into scores, for example with the Elo rating system, the same idea used to rate chess players. Researchers have also tried other forms of feedback, such as numeric ratings, written comments or direct edits to the answer.

The limits

  • Good feedback is expensive. Wikipedia says RLHF does not need massive amounts of data to improve performance, but sourcing high-quality preference data is still costly.
  • Who the raters are matters. If the data is not collected from a representative sample, the model may show unwanted biases.
  • People disagree. "Best" depends on the person and the culture.
  • It improves behaviour, not truth. A model can be trained to produce answers people like, which is not the same as answers that are correct. See AI hallucinations.

How it fits with other lessons

Pre-training teaches language from lots of text. Fine-tuning and RLHF come afterward to shape how the model behaves. See fine-tuning.

Sources