Question presented to candidate: "A pretrained base model can write fluent text but it is not an assistant. Explain how RLHF turns it into one, what DPO changes about that recipe, and what can go wrong."
What a strong answer should cover:
- The pipeline: pretraining gives a base model; supervised fine-tuning (SFT) on demonstrations teaches the answer format; preference tuning on "response A is better than B" comparisons teaches which answers people prefer
- RLHF: train a reward model on preference pairs (a Bradley-Terry style loss: P(chosen beats rejected) = sigmoid(r_c โ r_r)), then optimise the policy with RL (classically PPO) to maximise reward minus a KL penalty that keeps it close to the SFT model
- DPO: the KL-regularised objective has a closed-form optimum, so the reward can be written in terms of the policy itself; DPO trains directly on the pairs with a simple classification-style loss, with no separate reward model and no RL sampling loop
- The role of beta / the KL term: small beta lets the policy drift far and collapse onto whatever the reward favours; large beta keeps it near the SFT model
- Failure modes: reward hacking and over-optimisation, sycophancy learned from human raters, loss of diversity; and the newer variants (AI feedback / Constitutional AI, RL on verifiable rewards with methods like GRPO for reasoning)
Code / implementation expected: Optional โ a toy that fits a reward model on preference pairs and shows DPO landing on the same policy as the KL-regularised RLHF optimum is a strong way to show the mechanism.