What is reinforcement learning from human feedback (RLHF)?
Reinforcement learning from human feedback (RLHF) is an alignment method in which people rank model answers, a reward model learns those preferences and the language model is tuned against it with reinforcement learning.
It differs from direct preference optimisation (DPO) in its middle step: common RLHF uses a separate reward model and a reinforcement learning stage, while DPO trains directly on preference pairs. RLHF does not teach new facts; it aligns behaviour and, by rewarding admitted uncertainty, can improve calibration.
- Topic
- Machine learning, models and training
- Also known as
- RLHF, human feedback alignment
- Origin
- 2017, Christiano et al.
How reinforcement learning from human feedback (RLHF) works
- The base model first goes through supervised fine-tuning on sample prompts and human-written answers.
- People rank several answers to the same prompt by quality and safety or compare them in pairs; a reward model is trained on these preferences.
- The language model is updated with a reinforcement learning algorithm such as Proximal Policy Optimisation to raise the reward model's score.
- A penalty term keeps the model from drifting too far from the reference model; overdoing the update leads to reward hacking.
In more detail
The four-model PPO set-up and critic-free methods
In classic PPO-based RLHF, training requires keeping up to four models accessible simultaneously: the policy (actor) being updated, the frozen reference model for KL regularisation, the frozen reward model and a value (critic) model estimating token-level expected returns. Newer critic-free methods such as RLOO and GRPO remove the value model by estimating baselines across a group of sampled completions, cutting memory and compute overhead.
Alignment tax and loss of diversity
Alignment can introduce an "alignment tax", a drop in output diversity, creativity or performance on certain reasoning and calibration benchmarks, when KL constraints are mis-tuned or human preferences over-reward cautious, generic phrasing. Teams track capability retention alongside preference win rates to avoid degrading core skills.
Limits of human feedback: subjectivity and length bias
RLHF faces well-documented limits: human annotators systematically favour confident, well-formatted and slightly longer answers even when they contain subtle factual errors; preference data also often encodes inconsistent or culturally narrow norms. Therefore, production alignment pipelines pair preference data with objective accuracy checks and clear annotation rubrics.
Commonly confused terms
| Term | How it differs |
|---|---|
| Supervised fine-tuning | Supervised fine-tuning (SFT) teaches a model a target style and task format by imitating demonstration responses via next-token prediction; RLHF uses reinforcement learning against a preference reward model to push outputs toward preferred behaviours and away from dispreferred ones. |
| Reinforcement learning with verifiable rewards | RLHF derives preference signals from human evaluators, making it effective for subjective quality and safety but expensive to scale; RLVR replaces human-learned reward models with automated programmatic verifiers on tasks with checkable ground truth. |
Why reinforcement learning from human feedback (RLHF) matters for on-premises AI
A model's behaviour in refusing harmful prompts, following the instruction hierarchy and answering within policy is largely shaped here. Collecting human preference data is costly and needs expert raters, so organisations mostly use models that are already aligned. Training keeps several models in memory at once, so hardware needs exceed supervised fine-tuning. Overdone, it can cause over-refusal or sycophancy, which are evaluated separately.
A law firm collects the answers its experts prefer on internal draft replies to try to improve the answer style of its support model.
Common questions
How many human ratings does RLHF need?
There is no fixed number; it depends on the task and alignment goal. Work starts with a small preference set that grows as results are measured.
Why is DPO often chosen over RLHF for in-house adaptation?
RLHF keeps several models in memory during training and needs complex tuning. DPO trains directly on preference pairs, so it needs less memory and a simpler process.
Related terms
- Reward model
- Reinforcement learning
- Direct preference optimisation
- AI alignment
- Proximal Policy Optimisation
- Reward hacking
- Reinforcement Learning from AI Feedback
- Supervised fine-tuning
Sources
- Christiano et al., Deep Reinforcement Learning from Human Preferences, 2017
- Ouyang et al., Training language models to follow instructions with human feedback, 2022
- Rafailov et al., Direct Preference Optimization: Your Language Model is Secretly a Reward Model, 2023
In the glossary: Glossary, R to Z