RLHF typically involves three stages: first, supervised fine-tuning (SFT) on human-written demonstrations; second, training a reward model (RM) based on human rankings of model outputs; and third, fine-tuning the language model using reinforcement learning (often PPO) guided by the reward model.