Training Language Models to Follow Instructions with Human Feedback
InstructGPT showed that supervised demonstrations and human preference feedback can make a language model follow instructions better than a much larger pretrained model.
Key takeaway
The paper introduces a three-stage RLHF pipeline: supervised fine-tuning on human-written demonstrations, reward-model training on human rankings, and PPO fine-tuning against the learned reward. In human evaluations, the 1.3B InstructGPT model was preferred over 175B GPT-3 outputs on the study’s prompt distribution.
Updated on Nov 23, 2026
01
Abstract
Overview
The paper investigates how to make GPT-3 better at following what users actually ask for. Instead of relying only on next-token pretraining or larger parameter counts, the authors use human demonstrations and preference rankings to fine-tune the model. The resulting InstructGPT models are more helpful and preferred by human evaluators on the studied prompt distribution.
02
Background
Related Work
The paper builds on deep reinforcement learning from human preferences (Christiano et al., 2017), summarization with human feedback (Stiennon et al., 2020), and earlier work on instruction tuning such as FLAN and T0. It also relates to GPT-3 and broader research on language-model truthfulness, toxicity, bias, and controllable generation.
03
Methodology
Core Idea
Human feedback can provide a training signal for behavior that ordinary next-token prediction does not directly optimize. The pipeline first teaches the model with examples of desired answers, then learns a reward model from human comparisons, and finally optimizes the language model to produce answers that score well under that reward model.
Method
The three-step RLHF recipe
Step 1, supervised fine-tuning (SFT): a prompt is taken from a dataset of prompts submitted to the OpenAI API plus prompts written by labelers, a labeler writes the desired response, and GPT-3 is fine-tuned on these demonstrations (about 13k training prompts). Step 2, reward model (RM): for a new prompt the model produces several outputs, between 4 and 9, and a labeler ranks them from best to worst. Every pair within a ranking becomes a training comparison, and a 6B reward model learns to score the preferred response higher (33k prompts). Step 3, reinforcement learning: the SFT model is further optimized with proximal policy optimization (PPO) to maximize the reward model's score on new prompts (31k prompts, no new human labels). A per-token KL penalty keeps the policy close to the SFT model so it cannot simply exploit flaws in the reward model. The final InstructGPT variant, PPO-ptx, also mixes in gradients from the original pretraining objective to reduce regressions on public NLP benchmarks. Steps 2 and 3 can be repeated, collecting new comparisons on the current best policy. About 40 contractors produced the labels.
Figure 2 from Ouyang et al. (2022), supplied by the user. Paper: NeurIPS 2022.
04
Architecture
InstructGPT uses the GPT-3 Transformer architecture. The key change is the training procedure, not a new network architecture. The paper trains 1.3B, 6B, and 175B parameter variants and compares supervised fine-tuning (SFT), reward-model-guided PPO, and PPO with a pretraining-data objective (PPO-ptx).
05
Training
Regularization and Alignment Objective
The KL penalty constrains the policy from moving too far from the SFT model during PPO, helping prevent reward optimization from changing the model too aggressively. PPO-ptx adds a small amount of the original pretraining objective during reinforcement learning. The authors report that this helps reduce the “alignment tax” on some public NLP benchmarks while retaining gains in human preference and safety evaluations.
Data and Compute
The work uses GPT-3 checkpoints and fine-tunes them with human-feedback datasets. The OpenAI overview states that the alignment procedure used less than 2% of the compute and data relative to pretraining. The important resource shift is that high-quality demonstrations and preference comparisons become central training assets, rather than simply adding more pretraining tokens or parameters.
Implementation Notes
A practical reproduction requires three datasets or data stages: prompts paired with high-quality demonstrations; prompts paired with ranked candidate outputs; and prompts used for policy optimization. Fine-tune a pretrained policy with SFT, train a scalar reward model on preference comparisons, then use PPO with a KL penalty. Track human preference win rates, safety metrics, capability regressions, and reward-model overoptimization.
06
Results
Human evaluators significantly preferred InstructGPT outputs to GPT-3 outputs on the study’s API prompt distribution. Outputs from the 1.3B InstructGPT model were preferred to those from 175B GPT-3 despite having over 100 times fewer parameters. The paper also reports improved truthfulness on TruthfulQA, fewer hallucinations on closed-domain tasks, and about 25% fewer toxic outputs in a respectful-prompt setting. Some public NLP benchmarks showed regressions, which PPO-ptx helped mitigate.
Evaluation
The authors primarily use human comparisons on held-out prompts from their API distribution. They also evaluate truthfulness with TruthfulQA, toxicity with RealToxicityPrompts, bias with Winogender and CrowS-Pairs, and general capabilities on public NLP datasets. The paper notes that human preference is distribution-specific and does not establish alignment with all users or values.
A small aligned model beats a much larger GPT-3
Each line shows how often labelers preferred a model's output over the 175B SFT model's output for the same prompt from the API distribution; 0.5 (dashed) is a tie with that baseline. GPT is plain GPT-3, and GPT (prompted) is GPT-3 given a few-shot prefix that puts it into an instruction-following mode. Both RL-trained models (PPO and PPO-ptx) beat every baseline at every size, and the gap is large: the 1.3B PPO-ptx model, more than 100 times smaller, is preferred to 175B GPT-3. At 175B, InstructGPT outputs are preferred to GPT-3's 85 ± 3% of the time and to few-shot prompted GPT-3's 71 ± 4% of the time. SFT alone helps, but the reward model and PPO steps add a clear further gain. Error bars are 95% confidence intervals.
Figure 1 from Ouyang et al. (2022), supplied by the user. Paper: NeurIPS 2022.
Do the gains hold for labelers who never trained the model?
A risk with learning from human feedback is that the model learns the quirks of the specific people who labeled its training data. To test this, a separate group of held-out labelers, who produced none of the training data, rated the same outputs (Section 4.1). Left: held-out labelers. Right: the training labelers (the same data as Figure 1). The ordering of the models is the same in both panels, and held-out labelers prefer InstructGPT over GPT-3 at about the same rate, so the models are not simply overfitting to their trainers. Agreement levels are similar too: training labelers agree with each other 72.6 ± 1.5% of the time and held-out labelers 77.3 ± 1.3%. This still does not mean the model reflects everyone's preferences, a point the paper returns to in its limitations.
Figure 3 from Ouyang et al. (2022), supplied by the user. Paper: NeurIPS 2022.
Instruction following, constraints and hallucination
Besides overall preference, labelers flagged specific properties of each output on the API prompts, averaged here across model sizes. Compared with GPT-3, InstructGPT (PPO and PPO-ptx) more often attempts the correct instruction and more often follows explicit constraints in the prompt, such as "Write your answer in 2 paragraphs or less". All models use language appropriate for a customer assistant at similar, high rates. Hallucination is the most interesting panel: on closed-domain tasks, where the output should not add information that is not in the input (summarization, for example), InstructGPT makes things up about half as often as GPT-3 (21% vs 41%). SFT hallucinates least of all, but it is preferred less overall (Figure 1), so the RL models trade a little extra hallucination for more helpful answers.
Figure 4 from Ouyang et al. (2022), supplied by the user. Paper: NeurIPS 2022.
FLAN and T0, truthfulness and toxicity
(a) To check whether existing instruction-tuning datasets would do the same job, the authors fine-tuned 175B GPT-3 on FLAN and T0 and had labelers score outputs on a 1 to 7 Likert scale using the API prompts. Both beat plain GPT-3 and roughly match few-shot prompted GPT-3, but they fall short of the SFT model and well short of InstructGPT. The paper's explanation: public NLP datasets focus on tasks that are easy to score automatically, such as classification and question answering, while open-ended generation and brainstorming make up about 57% of real API prompts. (b) On TruthfulQA, grey bars show how often answers were rated truthful and coloured bars truthful and informative; the PPO models give small but significant gains over GPT-3. (c) On RealToxicityPrompts, InstructGPT produces about 25% fewer toxic outputs than GPT-3 when asked to be respectful, but without that instruction the advantage disappears. The paper also finds no significant improvement on the bias benchmarks Winogender and CrowS-Pairs: aligning to labeler preferences improved helpfulness more than it solved safety.
Figure 5 from Ouyang et al. (2022), supplied by the user. Paper: NeurIPS 2022.
07
Limitations
The system is not fully aligned or safe: it can still hallucinate, produce toxic or biased outputs, and respond to harmful instructions. Its behavior reflects the preferences of a particular group of labelers, researchers, and customers rather than a universal human consensus. The study focuses on English and a specific API prompt distribution. Reward models are imperfect proxies, and optimizing them can create reward hacking or distribution-shift problems.
08
Conclusion
Key Contributions
The paper demonstrates a practical RLHF pipeline for instruction following; shows that human preference tuning can outweigh a large parameter-count advantage in human evaluations; evaluates helpfulness, truthfulness, toxicity, and benchmark performance; and documents the trade-off between aligning to user preferences and preserving general benchmark capabilities.
Practical Takeaways
- Pretraining predicts the next token; instruction tuning targets useful responses to user requests.\n
- Human demonstrations provide examples; rankings provide preference signals.\n
- A reward model converts comparisons into an optimization objective.\n
- PPO with a KL constraint is used to optimize the policy while limiting drift.\n
- Alignment can introduce capability trade-offs, so evaluate both user preferences and general benchmarks.
Frequently Asked Questions
What does RLHF stand for? Reinforcement Learning from Human Feedback.\n\nWhat are the three stages in InstructGPT? Supervised fine-tuning, reward-model training, and PPO-based reinforcement learning.\n\nWhy train a reward model? It learns to predict which answer humans prefer, providing a scalable reward signal for policy optimization.\n\nHow did 1.3B InstructGPT compare with 175B GPT-3? Human evaluators preferred the 1.3B InstructGPT outputs on the paper’s prompt distribution.\n\nWhat is PPO-ptx? PPO fine-tuning augmented with a pretraining-data language-model objective.\n\nDoes RLHF guarantee safety or truthfulness? No. The paper explicitly reports remaining failures, biases, and limitations.
09
References
Source trail
Primary papers, implementation pages, and external source records used to ground this explainer.
Training language models to follow instructions with human feedback
Ouyang et al., NeurIPS 2022
Primary InstructGPT paper describing the SFT, reward modeling, and RLHF pipeline.
Deep reinforcement learning from human preferences
Christiano et al., 2017
Foundational work on learning reward signals from human comparisons.
Learning to summarize from human feedback
Stiennon et al., 2020
Earlier application of human-feedback reinforcement learning to summarization.
Finetuned Language Models Are Zero-Shot Learners
Wei et al., 2021
FLAN instruction tuning, discussed as related instruction-following work.
01NeurIPS 2022 conference paper02arXiv preprint (2203.02155)03OpenAI research overview: Aligning language models to follow instructions04OpenAI InstructGPT research repository and model card