esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

What Is RLHF?

What RLHF is, how people's rankings train a reward model, where it falls short, and how it compares with newer methods, for your AI interview.

In short

RLHF, short for reinforcement learning from human feedback, tunes a language model so its replies match what people prefer. People rank replies, a reward model learns to predict those rankings, and reinforcement learning pushes the model toward replies that score well.

10 min readIntermediateVery common · 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. It is how a company tunes a chat model so its replies are the kind people prefer. Labellers rank pairs of answers, a reward model learns to predict their choices, and reinforcement learning rewards the model for replies that score high. It helps make assistants more helpful and harmless, but it is costly, and the reward model can be wrong. Newer methods such as DPO try to simplify it.

What is RLHF, in plain words?

A language model learns by predicting the next word in huge amounts of text. That makes it fluent. It does not, on its own, teach it which replies people want. RLHF is a second round of training that uses human judgement to close that gap.

Think of a new claims officer at an insurance firm. They can write a letter, but the house style comes from watching senior staff pick the better of two drafts, again and again. After enough picks, the officer writes that way without being told the rules. RLHF works the same way for a model: people pick the better reply, and the model learns their taste.

Here is a realistic case, made up for this answer. A bank's support bot answers customers about late fees. A customer asks, "Why was I charged a late fee?" One reply explains the fee and offers a review. Another just says no. Labellers pick the first, and RLHF pushes the bot toward that kind of reply.

Key words

Base model
The model after pretraining: fluent, but not yet tuned to what people want.
Human ranking
A person picking the better of two or more replies to the same prompt.
Reward model
A model that learns to predict which reply people would prefer.
Reinforcement learning
Training by trying actions and getting scores, then favouring the ones that score high.

How does RLHF work, step by step?

OpenAI describes its method this way: it uses human preferences as a reward signal to fine-tune the model. Anthropic used the same idea to train helpful and harmless assistants. The steps below follow the InstructGPT recipe.

How RLHF is built, in three stages

Base model

predicts the next word, nothing more

Stages 1 and 2: people

Written answers

people write good replies

Ranked replies

people pick the better of two

Stage 3: reinforcement learning

Reward model

guesses which reply people like

The model

writes replies, gets a score

Tuned assistant

replies people prefer

  1. 1The base model is fine-tuned on answers people wrote.
  2. 2People then rank the tuned model's replies.
  3. 3The rankings train the reward model to predict them.
  4. 4The reward model scores the model's new replies.
  5. 5The model that scores well becomes the assistant.
Two stages use people: first they write answers, then they rank the model's replies. The reward model learns from those rankings, and reinforcement learning tunes the model against it. The tuned model is the assistant.
  1. 1

    Teach the basics with written answers

    People write good answers to real prompts. The base model is fine-tuned on them, so it learns the shape of a helpful reply.

  2. 2

    Rank the model's replies

    The tuned model writes several replies to each prompt, and people rank them. Those rankings become the training data for the reward model.

  3. 3

    Tune against the reward model

    Reinforcement learning rewards the model for replies the reward model scores high. This step needs prompts and the scorer, not a new human ranking for every try.

Each stage has a clear job, so when an answer goes wrong you can say which stage to check.

What does the reward step look like in a bank bot?

Say labellers compared three replies to a late-fee question, in pairs, and picked a winner each time. Counting wins is the simplest possible reward. Real systems train a neural network on many such pairs, but the idea is the same. The numbers below are made up.

Python
# A simplified reward step for a bank's support bot. Labellers compared
# pairs of replies and picked the better one. We count their wins.
REPLIES = {
    "A": "Late fees apply automatically. Nothing you can do.",
    "B": "The payment posted two days late, so the fee applies. You can ask us to review it.",
    "C": "Fee reversed. Sorry about that.",
}
# (winner, loser) pairs from labellers
PREFERENCES = [("B", "A"), ("B", "C"), ("A", "C"), ("B", "A"), ("A", "C")]

def reward(reply_id):
    # A real reward model is a neural network trained on pairs like these.
    wins = sum(1 for w, _ in PREFERENCES if w == reply_id)
    games = sum(1 for p in PREFERENCES if reply_id in p)
    return wins / games

for rid in sorted(REPLIES):
    print(rid, round(reward(rid), 2), REPLIES[rid])
best = max(REPLIES, key=reward)
print("Chosen:", best)

Output

A 0.5 Late fees apply automatically. Nothing you can do.
B 1.0 The payment posted two days late, so the fee applies. You can ask us to review it.
C 0.0 Fee reversed. Sorry about that.
Chosen: B

The bot ends up with reply B, the one that explains the fee and offers a review. Reply C says the fee is reversed, a step the bot cannot take on its own, and labellers ranked it last. The score only reflects the pairs labellers judged, so it is only as good as that data.

Tip

In an interview, say the reward is learned from people's pairwise picks. Don't say the bot checks a score table each time it answers. The score only steers training.

What are the limits of RLHF?

  • Cost

    Human time

    Every ranking is a person's time, and the reward is only as good as the people and instructions behind it.

  • Risk

    A guess, not the goal

    The reward model only predicts what raters would pick. The model may learn to please the predictor instead of the real goal.

  • Aim

    Stay near the start

    RLHF tuning tries to raise the reward without drifting far from the original model.

  • “We then collect a dataset of rankings of model outputs, which we use to further fine-tune this supervised model using reinforcement learning from human feedback.”

    OpenAI researchers, InstructGPT paper (2022)

  • “A limitation of this approach is that it introduces an "alignment tax": aligning the models only on customer tasks can make their performance worse on some other academic NLP tasks.”

    OpenAI

  • “RLHF is a complex and often unstable procedure”

    Authors of Direct Preference Optimization (2023)

OpenAI calls the cost an alignment tax. It also notes that its sources of influence, including labellers, researchers and customers, do not guarantee alignment with any broader group, so the people in the loop shape the result.

Newer methods try to make that process simpler. Direct Preference Optimization (DPO) fits preference pairs with a simple classification loss in place of the reinforcement learning step. Its authors describe the standard method as complex and often unstable.

Tip

Asked about the limits? Name the human cost, the reward model's guess, and the alignment tax. Don't say RLHF makes a model safe on its own.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: people rank replies, and a reward model steers training.
  • The three stages, in order, and what people do in each.
  • The reward model: a learned guess at what people prefer.
  • The cost: human time, the reward model's errors, and the alignment tax.
  • Where it fits: after pretraining, so it shapes behaviour more than knowledge.
  • A newer option such as DPO, named and explained in one line.

Common traps

  • Trap"RLHF teaches the model new facts."

    BetterMostly it shapes how the model answers. OpenAI says the procedure has a limited ability to teach new capabilities compared with pretraining.

  • Trap"Human labels make the model fully objective."

    BetterLabels are people's judgements. OpenAI says its sources of influence, labellers included, do not guarantee alignment with any broader group.

  • Trap"The reward model is the truth."

    BetterIt only predicts what raters would pick, so the model can learn to please it.

Can you spot the wrong claim?

Spot the wrong claim

Your team says RLHF was run, so the bot will never be rude again. Which claim is wrong?

Quick check

A bank's support model gives correct answers, but staff say the replies sound cold. Which change is most likely to help with RLHF?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q289What is a reward model?11 min
  2. Q290What is PPO in RLHF, simply?Coming soon
  3. Q291What is DPO?11 min
  4. Q292What is RL from verifiable rewards?10 min
  5. Q294How do you prepare a fine-tuning dataset?11 min

Learn it in depth

Last updated on 26 November 2026

Building an assistant that has to sound right to your customers?

I design and build AI products and agents, with the interface and the system behind them. Book a short call and tell me what your assistant needs to do.