1. Home
  2. Glossary
  3. Reinforcement learning from human feedback (RLHF)
AI glossary · Models & training

Reinforcement learning from human feedback (RLHF)

Reinforcement learning from human feedback (RLHF): RLHF is a training step in which human raters compare model responses, their preferences train a reward model, and the language model is then tuned to produce answers people rate highly. It is how raw text predictors became helpful assistants.

A freshly pre-trained language model is good at continuing text but not at following instructions or staying polite. RLHF fixes that in three steps. First, people write examples of good responses. Second, raters rank several model answers to the same prompt from best to worst, and those rankings train a separate reward model that predicts what people prefer. Third, the language model is optimized with reinforcement learning to score well on that reward model.

OpenAI described this recipe in its 2022 InstructGPT paper, and it became the standard way to turn a base model into a chat assistant. Since then, labs have added variants: direct preference optimization skips the separate reward model, and Anthropic's constitutional AI uses a written set of principles plus AI-generated feedback to reduce the amount of human labeling.

RLHF shapes personality as much as capability. The tone, the hedging, the refusals, and the tendency to agree with you all come partly from what raters rewarded. It also introduces known side effects: sycophancy, over-cautious refusals, and answers that sound confident because confident answers got rated higher.

Example at work

A paralegal asks an assistant whether a filing deadline was missed and gets a reassuring "you should be fine." Knowing that assistants are tuned to please, she rephrases: "Assume I am wrong and argue that the deadline was missed, citing the rule." The second answer surfaces a weekend rollover rule she had overlooked, which she then confirms in the court's own rules.

Why it matters

Understanding RLHF tells you why an assistant flatters your ideas and why asking it to argue the other side often produces a more useful answer. It also explains why two models with similar underlying knowledge can feel completely different to work with.

Related terms