RLHF

RLHF, reinforcement learning from human feedback, trains a language model with rewards learned from human ratings of its answers.

RLHF stands for reinforcement learning from human feedback. It is a training method that makes a language model more helpful and better at following instructions. People compare pairs of answers from the model and choose the one they prefer. These choices teach the model what kind of answers people want.

RLHF usually has two steps. First, a separate reward model is trained on the human choices, so that it can score any answer. Then the language model is trained with reinforcement learning to produce answers that the reward model scores high. A penalty keeps the model close to its starting point, so that it does not drift into odd text that only exploits the reward model.

RLHF became widely known from 2022, when it was used to turn base models into chat assistants. It is one part of post-training, next to supervised fine-tuning and newer methods such as RLVR. Human ratings are slow and costly, and a learned reward model can be fooled, which is a form of reward hacking. For tasks with answers that can be checked, such as code, training often uses verifiable rewards from sandboxes instead.