RLHF
Fine-tuning the model based on human ratings: 'good response / bad response'. Thanks to this, models become polite, useful, and safe.
Why is it needed
After initial training, the model can continue text but does not know how to be a useful assistant. RLHF 'educates' the model.
How it works
flowchart LR
A[Model responses] --> B[Humans choose the best]
B --> C[Reward model]
C --> D[Retraining the model]
- Humans choose the best response.
- The reward model is trained on these ratings.
- The main model is retrained to maximize scores.
Result
- polite and useful responses;
- rejection of harmful requests;
- fewer hallucinations.
Cost of the method
RLHF sometimes makes models overly cautious and prone to agreeing with the user.
Alternative: DPO
DPO solves the same problem more simply — without a separate reward model.