Reinforcement learning from human feedback (RLHF) is a technique for training AI systems to align with human goals by learning a reward signal from human judgments of model outputs, instead of from a hand-written reward function. In standard reinforcement learning, as NIST defines it, a model optimizes its behavior according to a reward function; RLHF learns that function from people. Raters compare or rate outputs, a reward model learns to predict those judgments, and reinforcement learning then tunes the model to produce outputs the reward model scores highly.
The standard method was popularized in 2017 by Christiano et al., who trained agents on Atari games and simulated robot locomotion with human feedback on less than one percent of the agent's interactions. Casper et al. (2023) call it the central method used to finetune state-of-the-art large language models.
Reinforcement Learning from Human Feedback (RLHF) at a Glance
| Also called | RL from human preferences |
|---|---|
| What it does | Turns human comparisons of model outputs into a learned reward model, then optimizes the model against that reward with reinforcement learning |
| Where it's used in model development | Post-training of large language models, after supervised fine-tuning (SFT) in InstructGPT; earlier, control tasks such as Atari games and simulated robotics |
| The human role | Writing demonstrations, comparing or ranking outputs, writing labeling instructions and rating the finished model |
| Limits | Costly preference data, rater disagreement and bias, reward model overoptimization and capability regressions |
How RLHF Works
RLHF works in three linked steps: collect human feedback on model outputs, fit a reward model to that feedback, then optimize the model (the policy) against the reward model with reinforcement learning. In practice the steps are repeated rather than run once.
Step 0: Start from a capable model
RLHF begins with a pretrained model. For InstructGPT, GPT-3 was first fine-tuned with supervised learning on labeler-written demonstrations, a stage Hugging Face's overview describes as optional.
Step 1: Collect comparisons
Prompts go through the model, and human annotators rank the outputs. Rankings are used instead of absolute scores because scores from different people tend to be uncalibrated and noisy.
Step 2: Train the reward model
The reward model takes a prompt and a response and returns a single number meant to represent human preference. For pairwise comparisons, a cross-entropy loss is one suitable choice. InstructGPT trained its reward model to predict which output its labelers would prefer.
Step 3: Optimize the policy
A copy of the initial model is fine-tuned with a policy-gradient algorithm, commonly Proximal Policy Optimization (PPO). The reward sent to PPO is the reward model's score minus a scaled Kullback-Leibler (KL) penalty, which keeps the policy close to the initial model. Without that penalty, optimization can produce gibberish that still fools the reward model. Anthropic ran an iterated online version, updating preference models and policies on a weekly cadence with fresh human feedback.
Where RLHF Is Used in Model Development
RLHF is used mainly in the post-training of large language models, where it adapts a model so that its outputs are rated more highly by human evaluators. Casper et al. name it as a key component in training GPT-4, Claude, Bard and Llama 2-Chat.
- Instruction following. In OpenAI's human evaluations, outputs from the 1.3B parameter InstructGPT model were preferred to outputs from the 175B GPT-3, despite having 100x fewer parameters.
- Fewer fabrications. On closed-domain tasks such as summarization, InstructGPT had a 21% hallucination rate against 41% for GPT-3.
- Helpful and harmless assistants. Anthropic found RLHF alignment training improved performance on almost all NLP evaluations and was compatible with training for coding and summarization.
InstructGPT was evaluated mainly by labelers rating outputs on prompts from held-out customers. A preliminary test found that held-out labelers preferred InstructGPT at about the same rate as the training labelers.
RLHF Limits and the Human Role
RLHF's main limits come from its dependence on human judgment and on a learned proxy for that judgment, the reward model.
- Whose preferences. The InstructGPT authors state that their procedure aligns the model to the preferences of a specific group, mostly their labelers and researchers, not any broader notion of human values.
- Rater error and disagreement. Raters make mistakes from limited time, attention or care, and per-example pay creates an incentive to cut corners. Annotators also often disagree, which adds variance to data that has no ground truth.
- Partial observability. In one robotics case, a hand trained with RLHF from 2D renderings learned to move into the humans' line of sight of the object instead of toward the object, because annotators could not tell the difference.
- Reward overoptimization. Because the reward model is an imperfect proxy, optimizing it too far can hurt true performance, in line with Goodhart's law. For related failure modes, see reward hacking.
- Alignment tax. InstructGPT regressed on public datasets including SQuAD, DROP and HellaSwag. Mixing in pretraining updates (PPO-ptx) greatly reduced the regressions.
What the human step needs
Hugging Face's overview notes that RLHF performance is only as good as the quality of its human annotations. OpenAI hired a team of 40 contractors for InstructGPT based on a screening test. Casper et al. note that how annotator instructions are written is a second layer of arbitrary choice, and that as of their 2023 paper no public research had studied the effects of that framing. RLHF-tuned models have still hallucinated, shown sycophancy and failed against jailbreaks, so Casper et al. argue RLHF belongs inside a multi-layered approach to safety, not as the only safeguard.
RLHF vs. DPO and RLAIF
RLHF differs from Direct Preference Optimization (DPO) and RL from AI feedback (RLAIF) in where the preference signal comes from and whether a separate reward model and RL loop are needed.
| Aspect | RLHF (PPO) | DPO | RLAIF |
|---|---|---|---|
| Preference labels | Humans | Humans | An off-the-shelf LLM (in Constitutional AI, guided by a written list of principles) |
| Reward model | Trained separately | Implicit; optimal policy extracted in closed form | Trained on AI preferences (or skipped in direct-RLAIF) |
| Training loop | RL with sampling from the model | Simple classification loss, no sampling during fine-tuning | RL against the AI-trained reward |
| Main trade-off | Complex and often unstable | Stable and computationally lightweight, per its authors | Fewer human labels; human oversight moves into the principles |
A 2023 study found RLAIF performed comparably to RLHF on summarization and helpful and harmless dialogue.
Reinforcement Learning from Human Feedback (RLHF) at Hugo
Hugo builds dedicated preference alignment and post-training teams that write reference responses, rank model outputs with pairwise comparisons, 0 to N scales and written rationales, and audit reasoning and safety for SFT, RLHF, RLAIF and DPO pipelines. Each team works from a rubric written with the client and a calibration set every rater passes before production, with agreement tracked per criterion and regular re-calibration against gold examples. Evaluators also flag reward hacking and behavioral drift across post-training cycles. More on rater consistency: What Is RLHF and Why Does Human Feedback Quality Matter?
Related Terms
- Direct Preference Optimization (DPO)
- LLM Post-Training
- Reward Hacking
- Process Reward Model (PRM)
- Inter-Annotator Agreement (IAA)
- AI Red Teaming
- Large Language Model (LLM)
- Synthetic Data
- Human Evaluation
- Reinforcement Learning from AI Feedback (RLAIF)
- Reward Model
- Group Relative Policy Optimization (GRPO)
Reinforcement Learning from Human Feedback (RLHF) FAQs
What is RLHF in simple terms?
RLHF is a way to train an AI model using people's judgments as the reward. Humans compare model outputs, a reward model learns to predict which output they would prefer, and reinforcement learning tunes the model toward outputs that reward model scores highly. People can communicate goals without hand-writing a reward function, because identifying good behavior is easier than specifying it. RLHF became the central method for fine-tuning state-of-the-art large language models. The model ends up reflecting the preferences of the specific people who gave feedback, so who those raters are and how they were instructed matters.
How does RLHF work step by step?
RLHF works in three steps: collect human feedback on model outputs, train a reward model on that feedback, and fine-tune the model against the reward model with reinforcement learning. An optional first step is supervised fine-tuning on human-written demonstrations, as InstructGPT did. In the RL step, PPO is the common algorithm, and a KL penalty keeps the tuned model close to its starting point so it doesn't drift into text that fools the reward model. The loop is usually repeated. Anthropic, for example, updated its preference models and policies on a weekly cadence with fresh human feedback. Plan data collection as a recurring cycle, not a single batch.
What is a reward model in RLHF?
A reward model in RLHF is a model trained to predict human preferences: it takes a prompt and a response and returns a single score meant to represent how much people would prefer that response. It is trained on human comparisons, often pairwise, with a loss such as cross-entropy. During reinforcement learning, the reward model stands in for the human raters, scoring every output the policy generates. Because it is an imperfect proxy, optimizing against it too hard can lower true quality, an effect Gao et al. tied to Goodhart's law. Hold out human-rated examples to check whether reward model scores still track human judgment as training goes on.
What is the difference between RLHF and DPO?
RLHF trains a separate reward model and then optimizes the language model against it with reinforcement learning, while Direct Preference Optimization (DPO) trains on the same preference pairs directly with a simple classification loss. The DPO authors describe RLHF as complex and often unstable. DPO removes the need to sample from the model during fine-tuning, and in their experiments it matched or beat PPO-based RLHF on sentiment control, summarization and single-turn dialogue. Both methods depend on human preference labels of the relative quality of model outputs. Switching from RLHF to DPO changes the training code, not the need for consistent, well-instructed raters.
How much human preference data does RLHF need?
RLHF data needs vary by task, but a 2022 Hugging Face overview put the reward model data for most RLHF applications at roughly 50,000 labeled preference samples. For InstructGPT, OpenAI hired a team of 40 contractors selected by a screening test. In control tasks, Christiano et al. trained novel behaviors with about an hour of human time and feedback on under one percent of agent interactions. Written demonstrations cost more than comparisons, because they often require hiring part-time staff rather than relying on crowdsourcing. Size the program by how many raters you can screen and keep calibrated, not only by label count.
What should you look for when outsourcing RLHF data collection?
When outsourcing RLHF data collection, look for a provider that controls who the raters are, how they are instructed and how their consistency is measured. Casper et al. found that rater selection introduces bias, that per-example pay rewards cutting corners and that knowledge workers increasingly outsource work to chatbots. OpenAI screened its InstructGPT contractors with a test before hiring them. Ask a provider how raters are screened, whether a written rubric and calibration set exist before production, how agreement is tracked per criterion, and how drifting raters are retrained. Also ask whether rationales come with each ranking, so researchers can audit why one output won.
Sources
- National Institute of Standards and Technology (NIST), Computer Security Resource Center. reinforcement learning - Glossary | CSRC. Accessed November 10, 2026.
- Paul Christiano, Jan Leike, Tom B. Brown, Miljan Martic, Shane Legg, Dario Amodei. Deep reinforcement learning from human preferences. Updated February 17, 2023. Accessed November 10, 2026.
- Long Ouyang, Jeff Wu, Xu Jiang, et al. (OpenAI). Training language models to follow instructions with human feedback. Updated March 4, 2022. Accessed November 10, 2026.
- Yuntao Bai, Andy Jones, Kamal Ndousse, et al. (Anthropic). Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback. Updated April 12, 2022. Accessed November 10, 2026.
- Stephen Casper, Xander Davies, Claudia Shi, et al. Open Problems and Fundamental Limitations of Reinforcement Learning from Human Feedback. Updated September 11, 2023. Accessed November 10, 2026.
- Leo Gao, John Schulman, Jacob Hilton. Scaling Laws for Reward Model Overoptimization. Updated October 19, 2022. Accessed November 10, 2026.
- Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, Chelsea Finn. Direct Preference Optimization: Your Language Model is Secretly a Reward Model. Updated July 29, 2024. Accessed November 10, 2026.
- Yuntao Bai, Saurav Kadavath, Sandipan Kundu, et al. (Anthropic). Constitutional AI: Harmlessness from AI Feedback. Updated December 15, 2022. Accessed November 10, 2026.
- Harrison Lee, Samrat Phatale, Hassan Mansoor, et al. RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI Feedback. Proceedings of the 41st International Conference on Machine Learning, PMLR 235. Updated September 3, 2024. Accessed November 10, 2026.
- Nathan Lambert, Louis Castricato, Leandro von Werra, Alex Havrilla (Hugging Face). Illustrating Reinforcement Learning from Human Feedback (RLHF). Updated December 9, 2022. Accessed November 10, 2026.




