What Does RLHF Do for Safety?
How human ratings teach an AI model safer habits, what that training cannot stop, and how to explain it in your AI interview.
In short
RLHF uses human ratings of model replies to teach safer habits, such as refusing harmful requests and avoiding toxic language. It teaches habits that can still fail, so checks outside the model are still needed.
10 min readIntermediateCommon · estimateFacts checked 26 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
RLHF stands for reinforcement learning from human feedback. People rate the model's replies, a second model learns those ratings, and the main model is trained to earn higher scores. For safety, careful, honest and harmless replies win. That teaches habits, but a clever prompt can still get past them, so I add checks in code, least access for tools and human sign-off on risky actions.
RLHF stands for reinforcement learning from human feedback. People compare pairs of model replies and pick the better one. For safety, the better reply is the one that helps and avoids harm. A second model, called a reward model, learns to predict those picks. Then the main model is trained to earn high scores from it.
The result is a habit. A model trained this way learns to refuse help with harm and to avoid toxic language. OpenAI's InstructGPT work reported fewer toxic outputs after this training. Anthropic's 2022 paper also found that helpfulness and harmlessness often stand in opposition to each other, so teams have to balance them.
A learned habit can still fail. Raters can be wrong, the reward model is an imperfect guess, and the model can learn to game that guess, which is called reward hacking. Attackers also write prompts that slip past learned habits. OWASP says no reliable prevention mechanism exists for prompt injection today, so I add checks in code, least access for tools and a human sign-off before risky actions.
On a claims assistant, a reply that promises flood cover should lose every rating. A reply that says an adjuster will check the policy should win. That is the safety signal RLHF gives. It is a learned preference, so it can still be wrong about a case nobody rated.
What does RLHF do for safety, in plain words?
RLHF stands for reinforcement learning from human feedback. It comes after a model has learned to write text and a supervised fine-tuning step, where people teach it which replies are good. For safety, the lesson is simple: a careful, honest and harmless reply earns a higher rating than a harmful one.
Think of a new call-centre agent who gets coaching. A supervisor listens to recorded calls and marks the handling that was careful and right. Over months the agent stops reading a policy out to an upset customer and starts checking the account first. Nobody wrote a rule for every call. The habit came from the marked calls, and RLHF works the same way for a model. In an AI claims assistant, a reply that once promised flood cover loses its ratings, so the model learns to say an adjuster will check first.
Key words
- Rater
- A person who compares two or more replies and picks the better one.
- Reward model
- A second model trained to predict which reply raters would pick. It gives the score.
- Fine-tuning
- Extra training on a model that already exists, usually with a smaller set of examples.
- Red teaming
- Testers who try hard to make the model misbehave, which shows where it still fails.
A 2023 review of open problems says RLHF 'has emerged as the central method used to finetune state-of-the-art large language models'. It is a common topic when safety comes up.
How does RLHF make a model safer?
After the supervised step, it runs in four steps. Each step is small, but the picks decide what the model learns.
- 1
Raters compare replies
Raters see the same prompt with two or more replies and pick the better one. For safety, the better reply helps and avoids harm.
- 2
A reward model learns the picks
After many picks, a reward model learns to score replies the way raters would. OpenAI describes it as a model trained 'to predict which output our labelers would prefer'.
- 3
The main model is tuned
Reinforcement learning nudges the main model toward replies the reward model scores high. Replies that break the rules score low, so the model moves away from them.
- 4
Testers attack it
Red teamers try to provoke harmful replies, which shows the team where the model still fails. Anthropic's 2022 paper describes its crowdworkers this way: they probe the model 'in order to provoke harmful responses'.
How rater picks become a safer habit
Training data
Raters pick replies
the better reply wins each pair
Red-team attacks
testers try to provoke harm
Reward model
learns to predict the picks
Main model
tuned toward higher scores
Safer habits
refuses harm, avoids toxic words
- 1Raters choose the better reply in each pair.
- 2Red-team attacks surface the harmful replies.
- 3The reward model learns to predict those choices.
- 4The main model is tuned toward high scores, so its replies change.
The results come from tests. InstructGPT, OpenAI's 2022 paper, reported 'reductions in toxic output generation' and 'minimal performance regressions on public NLP datasets'. It still made simple mistakes, and the authors call fine-tuning with human feedback 'a promising direction'.
What does this look like on a claims assistant?
Imagine an insurer's claims assistant. A policyholder asks "Will my flood claim be paid in full?" The assistant can answer in three ways, and raters pick a winner for each pair. The counts below are made up, and the code only counts wins, a rough stand-in for how a reward model learns scores from picks like these.
# A simplified safety check for an insurance claims assistant. Raters read a policyholder's
# question and picked the better of two replies. We count their picks.
REPLIES = {
"A": "Yes, flood damage is always covered. Go ahead and book the repair.",
"B": "I can't say if this claim is covered. A claims adjuster will check your policy.",
"C": "Your claim is probably covered. Please send the invoice to our team.",
}
# (winner, loser) pairs from the raters
PICKS = [("B", "A"), ("B", "C"), ("C", "A"), ("B", "A"), ("B", "C")]
def win_rate(reply_id):
# A real reward model is a neural network trained on picks like these.
wins = sum(1 for winner, _ in PICKS if winner == reply_id)
games = sum(1 for pair in PICKS if reply_id in pair)
return wins / games
for rid in sorted(REPLIES):
print(rid, round(win_rate(rid), 2), REPLIES[rid])
print("Best:", max(REPLIES, key=win_rate))Output
A 0.0 Yes, flood damage is always covered. Go ahead and book the repair. B 1.0 I can't say if this claim is covered. A claims adjuster will check your policy. C 0.33 Your claim is probably covered. Please send the invoice to our team. Best: B
Reply A promised cover, so it lost every pair it was in. Reply B admitted it could not decide and sent the claim to a person, so it won every pair it was in. Reply C sits in between. The reward model learns that pattern, and the main model is nudged toward it.
What can RLHF not fix?
RLHF changes which replies the model prefers. It does not give a guarantee, and its failures follow a few known patterns.
What rating training does not stop
Two kinds of request
Plain harmful ask
the kind raters trained on
Wrapped in a story
a role-play or a fake test
Trained case
Refused
the trained habit does its job
Can get past
Reply gets through
a learned habit can be argued around
- 1A plain harmful request is the case the training was aimed at.
- 2A wrapped request can still get past the habit.
Imperfect rewards
The reward model is a guess at what raters want, and the model can learn to score well on the guess. That is reward hacking.
Clever wording
A request wrapped in a role-play or a fake test can still get a harmful reply past a learned habit.
Injected instructions
Text in a web page or email can still steer the model. Rating training does not stop that, so code has to check tool calls.
Over-refusal
If raters punish anything risky-looking, the model can refuse ordinary questions too often. That is a separate problem to measure.
“Reward models tend to be imperfect, and imperfection in reward models leads to reward hacking”
Casper et al., a review of RLHF's open problems
“LLMs make no architectural distinction between instructions and data, and their behavior is stochastic, so no reliable prevention mechanism exists today”
OWASP, LLM01:2026
Tip
Asked what you would add after RLHF? Name layers: checks in code, least access for tools, outside text marked as untrusted, and a human for risky steps. RLHF is one layer of several.
What does the interviewer want to hear?
A strong answer covers
- A plain answer: RLHF teaches a model habits from human ratings.
- The four steps: rate replies, learn a reward model, tune the model, red-team it.
- What it helps with: fewer toxic or harmful replies, checked with tests.
- What it cannot promise: reward hacking, clever wording and over-refusal.
- What else you add: checks in code, least access and human approval.
- How you measure it: red-team tests and a sample of real replies each week.
Common traps
Trap"RLHF makes the model safe, so nothing else is needed."
BetterIt teaches habits, and a learned habit can be argued away. Add checks in code that a prompt cannot change.
Trap"RLHF is a filter on the output."
BetterIt changes what the model learns to write. A filter is a separate check on text. Name both, and say which one checks the tool calls.
Trap"The raters decide what is safe, so it is objective."
BetterRaters bring their own views and blind spots. Say who the raters are, what guidance they had, and how you test the result.
Can you spot the weak claim?
Spot the weak claim
Which design-doc line overclaims what RLHF does?
Quick check
A bank's assistant now refuses ordinary account questions after RLHF. What is the most likely cause?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
- Q231What is Constitutional AI?11 min
- Q232What is over-refusal?11 min
- Q233How do you balance safety and helpfulness?12 min
- Q241What is reward hacking?Coming soon
- Q229What is alignment?12 min
Learn it in depth
Last updated on 26 November 2026
Building an assistant that answers customers or claims?
I design and build AI products and agents, the interface and the system behind it. Book a short call and say what your assistant needs to do.