Skip to main content
Training & Optimization

Reinforcement Learning from Human Feedback (RLHF)

Reinforcement Learning from Human Feedback (RLHF) is a training technique that aligns a language model's outputs with human preferences by training a reward model on human comparisons of candidate responses, then optimizing the LLM against that reward.

AIDOLS Research Team · Editorial standards

Full definition

RLHF has three stages: (1) supervised fine-tuning (SFT) on demonstrations; (2) collecting pairwise human preferences (response A vs B) and training a reward model to predict them; (3) optimizing the SFT model with reinforcement learning (typically PPO) against that reward model, with a KL penalty back to the SFT policy to prevent reward hacking. Direct Preference Optimization (DPO, Rafailov et al. 2023) skips the explicit reward model and trains directly on the preferences. RLHF is the technique that turned raw GPT-3 into InstructGPT, and a GPT-3.5 model into ChatGPT — taking a model that completed text into one that follows instructions, refuses unsafe requests, and behaves like an assistant.

Why it matters

RLHF (and successors like Constitutional AI and DPO) is what makes frontier LLMs safe and useful enough to deploy in regulated environments. Without alignment training, the same base models are not enterprise-deployable. When a vendor says it uses RLHF, ask for the size and source of its preference data: DPO on synthetic preferences is a different, cheaper process.

Example

OpenAI used RLHF to turn GPT-3.5 into ChatGPT in 2022, producing the first mass-market LLM assistant.

Next steps

More training & optimization terms

Source & further reading

Primary source: Ouyang et al. — "Training language models to follow instructions with human feedback" (InstructGPT) (2022).

Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/en/glossary/rlhf/.