Reinforcement learning from human feedback — training a model to prefer answers humans rate as better, which turns a raw text predictor into a usable assistant.
A pretrained model will happily continue any text, helpful or not. RLHF adds a shaping step: humans compare pairs of model answers, a reward model learns those preferences, and the model is trained to produce answers the reward model scores highly.
This is a big part of why assistants follow instructions, decline harmful requests, and "sound" the way they do. Its known failure mode: models can learn to produce answers that look good to raters — confident, agreeable, polished — rather than answers that are right, one root of sycophancy.