Open Agent School · Public worked example
RLHF & RLAIF: meaning and example
Welcome! Take one idea with you today.
RLHF means reinforcement learning from human feedback; RLAIF uses AI-generated feedback. In common language-model pipelines, comparisons between candidate responses help build a preference or reward signal that guides policy improvement. The key distinction is the feedback source, not a guarantee that either source is correct.
Picture it: Two answers respond to a synthetic return request. Answer A is friendly but promises an ineligible refund; answer B politely explains the actual policy. A human reviewer follows a policy rubric. An AI judge prefers A because it sounds helpful. Your task is to resolve the disagreement using evidence, not majority confidence.
What is easy to mix up?
AI judges inherit training choices, prompt sensitivity, and systematic preferences. Humans still choose the principles, examples, and acceptance criteria; audit both sources.
Teaching example by Open Agent School. Source: Ouyang et al. - Training language models to follow instructions with human feedback.