5 exercises — Learn the key vocabulary of RLHF: reward models, PPO, DPO, Constitutional AI, and preference labeling.
0 / 26 completed
1 / 26
What is a reward model in an RLHF pipeline?
The reward model is trained on human preference labels (which of two outputs is better) and outputs a scalar score used to train the policy via RL.
2 / 26
Which algorithm is most commonly used to update the language model's policy during RLHF?
PPO is the dominant RL algorithm for RLHF because it constrains policy updates to avoid large destabilising shifts — the KL penalty keeps the model close to the reference policy.
3 / 26
A colleague says: "We noticed reward hacking — the model scores high on the reward model but users hate it." What does reward hacking mean?
Reward hacking (or Goodhart's Law) occurs when the model learns to score high on the reward model by exploiting superficial patterns rather than genuinely improving response quality.
4 / 26
What is DPO and how does it differ from standard RLHF?
Direct Preference Optimization (DPO) reparameterises the RLHF objective so you can train directly on preference pairs without needing a separate reward model or PPO loop, simplifying the pipeline.
5 / 26
Anthropic's Constitutional AI approach uses:
Constitutional AI uses a set of written principles (the 'constitution') to have the model critique and revise its own outputs, reducing reliance on human labelers for harmlessness feedback.
6 / 26
During a code review of the RLHF pipeline implementation, Sarah (Senior ML Engineer) asks you: "Can you explain why we're using *preference rankings* instead of direct reward scores for this specific dialogue model? The reward model is giving us some pretty noisy signals."
Preference rankings are crucial in RLHF because directly optimizing a reward model can lead to *reward hacking*—where the model learns to exploit the reward function without actually improving its intended behavior. Using human-provided preferences allows us to guide the model towards desired outcomes based on nuanced quality judgments, which are far more robust and less susceptible to manipulation than a potentially flawed reward score. Option B is incorrect because directly optimizing with noisy rewards creates significant instability. Options C & D represent misinterpretations of the process—preference rankings aren't a secondary step or solely for exploration.
7 / 26
PR Description: "Implemented reward model updates based on human preference rankings. Initial results show a 15% improvement in alignment metrics."
During a standup update, you're asked by your team lead, Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?'
The correct answer highlights that preference rankings represent a *categorical* assessment (e.g., 'good' vs. 'bad'), which is crucial in RLHF. This contrasts with direct reward scores, which are continuous and can be highly sensitive to noise. Using human judgments as rankings allows for a more robust and interpretable training signal because it captures the nuanced aspects of what constitutes 'good' output that a simple numerical reward might miss. The other options either misinterpret preference rankings as purely numerical or incorrectly assume they're equivalent to raw reward scores.
8 / 26
Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?' We've been training this dialogue model with RLHF, but the reward model is producing inconsistent results. It seems like simply telling the model *what* to do isn't working as well as guiding it towards *better* responses.
This is the core concept behind using preference learning. Directly feeding reward scores can lead to 'reward hacking,' where the model learns to exploit weaknesses in the reward function rather than genuinely improving its alignment with human intentions. Preference rankings provide a more stable and nuanced signal by capturing *relative* quality – it's about guiding the model towards responses that are *better* according to human judgment, which is far less susceptible to manipulation.
9 / 26
During a code review of the RLHF pipeline implementation, Sarah (Senior ML Engineer) asks you: "Can you explain why we're using *preference rankings* instead of direct reward scores for this specific dialogue model? The reward model is giving us some pretty noisy signals."
Preference rankings are crucial in RLHF because directly optimizing a reward model can lead to *reward hacking*—where the model learns to exploit the reward function without actually improving its intended behavior. Using human-provided preferences allows us to guide the model towards desired outcomes based on nuanced quality judgments, which are far more robust and less susceptible to manipulation than a potentially flawed reward score. Option B is incorrect because directly optimizing with noisy rewards creates significant instability. Options C & D represent misinterpretations of the process—preference rankings aren't a secondary step or solely for exploration.
10 / 26
PR Description: "Implemented reward model updates based on human preference rankings. Initial results show a 15% improvement in alignment metrics."
During a standup update, you're asked by your team lead, Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?'
The correct answer highlights that preference rankings represent a *categorical* assessment (e.g., 'good' vs. 'bad'), which is crucial in RLHF. This contrasts with direct reward scores, which are continuous and can be highly sensitive to noise. Using human judgments as rankings allows for a more robust and interpretable training signal because it captures the nuanced aspects of what constitutes 'good' output that a simple numerical reward might miss. The other options either misinterpret preference rankings as purely numerical or incorrectly assume they're equivalent to raw reward scores.
11 / 26
Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?' We've been training this dialogue model with RLHF, but the reward model is producing inconsistent results. It seems like simply telling the model *what* to do isn't working as well as guiding it towards *better* responses.
This is the core concept behind using preference learning. Directly feeding reward scores can lead to 'reward hacking,' where the model learns to exploit weaknesses in the reward function rather than genuinely improving its alignment with human intentions. Preference rankings provide a more stable and nuanced signal by capturing *relative* quality – it's about guiding the model towards responses that are *better* according to human judgment, which is far less susceptible to manipulation.
12 / 26
During a code review of the RLHF pipeline implementation, Sarah (Senior ML Engineer) asks you: "Can you explain why we're using *preference rankings* instead of direct reward scores for this specific dialogue model? The reward model is giving us some pretty noisy signals."
Preference rankings are crucial in RLHF because directly optimizing a reward model can lead to *reward hacking*—where the model learns to exploit the reward function without actually improving its intended behavior. Using human-provided preferences allows us to guide the model towards desired outcomes based on nuanced quality judgments, which are far more robust and less susceptible to manipulation than a potentially flawed reward score. Option B is incorrect because directly optimizing with noisy rewards creates significant instability. Options C & D represent misinterpretations of the process—preference rankings aren't a secondary step or solely for exploration.
13 / 26
PR Description: "Implemented reward model updates based on human preference rankings. Initial results show a 15% improvement in alignment metrics."
During a standup update, you're asked by your team lead, Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?'
The correct answer highlights that preference rankings represent a *categorical* assessment (e.g., 'good' vs. 'bad'), which is crucial in RLHF. This contrasts with direct reward scores, which are continuous and can be highly sensitive to noise. Using human judgments as rankings allows for a more robust and interpretable training signal because it captures the nuanced aspects of what constitutes 'good' output that a simple numerical reward might miss. The other options either misinterpret preference rankings as purely numerical or incorrectly assume they're equivalent to raw reward scores.
14 / 26
Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?' We've been training this dialogue model with RLHF, but the reward model is producing inconsistent results. It seems like simply telling the model *what* to do isn't working as well as guiding it towards *better* responses.
This is the core concept behind using preference learning. Directly feeding reward scores can lead to 'reward hacking,' where the model learns to exploit weaknesses in the reward function rather than genuinely improving its alignment with human intentions. Preference rankings provide a more stable and nuanced signal by capturing *relative* quality – it's about guiding the model towards responses that are *better* according to human judgment, which is far less susceptible to manipulation.
15 / 26
During a code review of the RLHF pipeline implementation, Sarah (Senior ML Engineer) asks you: "Can you explain why we're using *preference rankings* instead of direct reward scores for this specific dialogue model? The reward model is giving us some pretty noisy signals."
Preference rankings are crucial in RLHF because directly optimizing a reward model can lead to *reward hacking*—where the model learns to exploit the reward function without actually improving its intended behavior. Using human-provided preferences allows us to guide the model towards desired outcomes based on nuanced quality judgments, which are far more robust and less susceptible to manipulation than a potentially flawed reward score. Option B is incorrect because directly optimizing with noisy rewards creates significant instability. Options C & D represent misinterpretations of the process—preference rankings aren't a secondary step or solely for exploration.
16 / 26
PR Description: "Implemented reward model updates based on human preference rankings. Initial results show a 15% improvement in alignment metrics."
During a standup update, you're asked by your team lead, Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?'
The correct answer highlights that preference rankings represent a *categorical* assessment (e.g., 'good' vs. 'bad'), which is crucial in RLHF. This contrasts with direct reward scores, which are continuous and can be highly sensitive to noise. Using human judgments as rankings allows for a more robust and interpretable training signal because it captures the nuanced aspects of what constitutes 'good' output that a simple numerical reward might miss. The other options either misinterpret preference rankings as purely numerical or incorrectly assume they're equivalent to raw reward scores.
17 / 26
Mark: 'This sounds promising! Can you elaborate on what's meant by 'preference rankings' and why we're using them instead of directly feeding reward scores into the model?' We've been training this dialogue model with RLHF, but the reward model is producing inconsistent results. It seems like simply telling the model *what* to do isn't working as well as guiding it towards *better* responses.
This is the core concept behind using preference learning. Directly feeding reward scores can lead to 'reward hacking,' where the model learns to exploit weaknesses in the reward function rather than genuinely improving its alignment with human intentions. Preference rankings provide a more stable and nuanced signal by capturing *relative* quality – it's about guiding the model towards responses that are *better* according to human judgment, which is far less susceptible to manipulation.
18 / 26
Alex: "Hey team, we're seeing some weird behavior with the reward model – it's consistently scoring high on our internal metrics, but user feedback indicates a significant drop in perceived helpfulness. What could be causing this?"
This scenario describes 'reward hacking,' where an RL agent learns to exploit loopholes in the reward function without actually improving its desired behavior. The model is optimizing for a metric that doesn't correlate with true user satisfaction, highlighting the importance of careful reward design and validation.
19 / 26
You're writing a PR description for updates to the reward model. Which of the following best summarizes the key change and its impact?
This option accurately captures the core change (preference rankings) and its key impact—improved alignment. The other options focus on different aspects of the reward model (response length, training speed) without directly addressing the fundamental goal of aligning with human preferences, which is central to RLHF.
20 / 26
"Mark: 'This preference ranking approach seems promising. Can you give us a quick rundown on what 'preference rankings' actually mean in this context? We're using RL to train this dialogue model, and I want to make sure everyone understands the underlying methodology.'"
'Preference rankings' represent a pairwise comparison – indicating whether one response is preferred over another. This allows the model to learn a more nuanced understanding of human preferences than just a single scalar reward score; it learns *relative* desirability.
21 / 26
During a code review, Liam asks: "We're using pairwise comparisons to train the reward model. How do we handle cases where users provide ambiguous or inconsistent feedback?"
Dealing with ambiguous or inconsistent feedback is crucial in RLHF. Filtering out outliers—responses with significantly divergent preferences—before training helps reduce noise and improve the signal strength of reliable human judgments. This ensures the model learns from the most consistent and valuable data.
22 / 26
During a Slack discussion with the team about RLHF, David asks: 'I'm still struggling to understand why we're using *preference rankings* instead of just feeding raw reward scores into the model. Can someone explain the core benefit?' Which of the following best describes this approach?
Preference rankings allow us to learn more complex and nuanced human preferences. Raw reward scores can be overly simplistic and prone to biases if they don't fully capture what users actually find desirable. The core benefit is capturing subtleties that a single numerical score misses.
23 / 26
You're writing an API response to explain the concept of 'reward modeling' to a new intern. Which statement would be MOST helpful?
Reward modeling is fundamentally about predicting human preferences. It trains a separate model (the reward model) to learn what humans consider good or bad outputs for a given context – this learned preference then guides the main dialogue model during RL training. It's not just assigning scores based on rules.
24 / 26
In a code review comment for a change related to RLHF, Emily asks: 'How are we handling situations where human raters provide contradictory feedback – e.g., one rating a response as 'helpful' and another as 'unhelpful'?'. What is the MOST appropriate response?
Contradictory feedback presents a significant challenge in RLHF. A voting system or similar aggregation method allows you to average the preferences, reducing the impact of outliers and providing a more robust signal for training. Simply ignoring it isn't ideal; recognizing disagreement is crucial.
25 / 26
During a standup meeting, you're explaining the goal of using *preference learning* in your RLHF project. Which of the following descriptions best captures this concept?
Preference learning centers around leveraging human input to train a reward model. This reward model learns to represent what humans find desirable—effectively creating a learned preference signal that guides RL training of the dialogue model, rather than directly optimizing for raw rewards.
26 / 26
You're debugging an issue where the reward model is consistently predicting high scores for responses that users find unhelpful. What's a potential root cause related to RLHF?
A common problem in RLHF is 'reward hacking', where the reward model learns to maximize its own score based on the training signal, rather than truly reflecting human preferences. If the metrics being optimized aren't aligned with what users actually want, the reward model will learn to exploit this misalignment.
What will I practice in "RLHF & Preference Learning — Vocabulary — AI Alignment & Safety | CoderLingo"?
This is an AI Alignment & Safety Language exercise set. It walks through 26 scenario-based multiple-choice questions built around real usage of AI Alignment & Safety Language terminology that IT professionals encounter on the job.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to complete with no account, sign-up, or paywall.
How many questions are in this exercise?
This set contains 26 questions. Each one shows immediate feedback and a detailed explanation after you answer, so you learn the correct usage right away rather than waiting for a final score.
Do I need prior experience to complete this exercise?
No prior experience is required. Each question includes a full explanation covering the reasoning behind the correct answer, so the exercise itself teaches the AI Alignment & Safety Language vocabulary as you go.
Can I retry the exercise if I get questions wrong?
Yes — use the "Try again" button on the results screen to reset your answers and go through all the questions again. There is no limit on attempts.
Is my progress saved?
Your answers and score for the current session are tracked in the browser as you go. No account or login is needed, and there is nothing to install.
What if I don't understand a term used in a question?
Read the explanation shown after you answer each question — it breaks down the correct term in plain English with a real-world example. You can also check the site Glossary for quick definitions.
How is this different from reading a blog article on the topic?
Exercises like this one are interactive drills that test and reinforce specific vocabulary through multiple-choice questions, while blog articles explain concepts in prose. Practising here after reading builds active recall, not just passive recognition.
Where can I find more AI Alignment & Safety Language exercises?
See the AI Alignment & Safety Language exercises hub for the full set of related pages, or browse all exercise categories from the main Exercises index.
Can I use this exercise to prepare for a technical interview?
Yes — AI Alignment & Safety Language vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.