FDEInterviews logo
NeurIPS 2022

Training language models to follow instructions with human feedback

The 2022 OpenAI paper that turned GPT-3 into an assistant with human feedback, and showed a 1.3B model people preferred to the 175B original.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2022
AUTHORS
Ouyang, Wu, Jiang, Almeida, et al.
FROM
OpenAI
PUBLISHED
Mar 2022 · NeurIPS 2022
CITED BY
25,055Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 17% of this breakdown.

01

The paper in one minute

GPT-3 could do remarkable things if you phrased the prompt as a pattern for it to continue. Ask it a plain question, though, and it might continue your question with more questions, invent facts, or ignore the instruction entirely. The reason is the training objective: predict the next token on web pages. That is not the same as "help the user". The authors call this a misaligned objective.

Their fix has three steps. First, contractors wrote ideal answers to real prompts and GPT-3 was fine-tuned on them. Second, the model wrote several answers per prompt, people ranked them, and a separate reward model learned to predict which answer a person would prefer. Third, the model was trained with reinforcement learning to produce answers the reward model scores highly, kept on a leash so it did not drift too far from step one.

The result was a model people liked far more. Labelers preferred the 175B InstructGPT to GPT-3 85% of the time, and preferred even a 1.3B InstructGPT, a hundred times smaller, to the full 175B GPT-3. On tasks where the answer should come only from the input, such as summaries, it made things up 21% of the time against GPT-3's 41%.

This is the paper behind the chat assistant. The same three-step recipe, with variations, trained most of the models you will deploy.

THE IDEA, VISUALLY
THREE STEPS FROM GPT-3 TO A MODEL THAT FOLLOWS INSTRUCTIONS 1 · SUPERVISED FINE-TUNING ~13k prompts Prompt from the API Labeler writes the ideal answer Fine-tune GPT-3 on it 2 · REWARD MODEL ~33k prompts Model writes 4 to 9 answers Labeler ranks them, best to worst Train a 6B model to predict the rank 3 · REINFORCEMENT LEARNING ~31k prompts Policy writes an answer Reward model scores it PPO update, KL leash to step 1 COMPUTE, PETAFLOP/S-DAYS (SECTION 5.1) Pre-training GPT-3 3,640 RLHF, 175B PPO-ptx 60, about 1.6%
The recipe behind every chat assistant since: demonstrations, then rankings turned into a reward model, then reinforcement learning against it. All of it cost under 2% of pre-training.
Research notes: the problem, approach and results
100×

fewer parameters in the 1.3B InstructGPT that labelers still preferred to 175B GPT-3

21%

hallucination rate on closed-domain tasks, against 41% for GPT-3

1.6%

of GPT-3's pre-training compute spent on the whole RLHF stage (60 of 3,640 petaflop/s-days)

THE PROBLEM

A bigger language model is not a more helpful one. GPT-3 completed text; it did not reliably do what users asked, and it made things up.

THE IDEA

Fine-tune on human demonstrations, train a reward model on human rankings of outputs, then optimize the model against that reward with reinforcement learning.

THE RESULT

Labelers preferred a 1.3B InstructGPT to the 175B GPT-3. Made-up facts on closed tasks halved. The method became the template for chat models.

02

Why it matters to an FDE

Two findings in this paper shape how you should evaluate any model for a customer.

Real usage does not look like benchmarks. The authors sorted the prompts customers actually sent to their API. Open-ended generation was 45.6% of them, open questions 12.4%, brainstorming 11.2%. Classification, the staple of public benchmarks, was 3.5%. Models fine-tuned on public NLP task collections (FLAN and T0) did worse on real prompts than the simple supervised baseline, and labelers chose InstructGPT over them about three times out of four. The lesson for a deployment is blunt: build the eval from the customer's real requests, not from a leaderboard.

"Aligned" means aligned to specific people. The model was shaped by about 40 contractors, the researchers who wrote their instructions, and the customers whose prompts were sampled. The labelers agreed with each other only about 73% of the time. On your project the equivalent people are the customer's subject-matter experts, and they will disagree too. Measure how often they agree before you promise the model will match "what the business wants", because that agreement rate is the ceiling on any score you report.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 49 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦4 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The ideas to keep, the method's numbers, why it hedges, and the misreadings to avoid

    Free account
  2. 04How it works

    Each training stage in detail, the reward model's loss, and the leash that stops reward hacking

    Premium
  3. 05The numbers that matter

    Preference, truthfulness, toxicity, cost and agreement, with sources

    Premium
  4. 06Try it yourself

    Train a reward model on noisy rankings and watch it learn the raters' bias along with their taste

    Premium
  5. 07Where it breaks

    The limits the authors name, and the ones the field found later

    Premium
  6. 08Using it on a deployment

    Building an eval from real prompts, calibrating raters, and when to fine-tune on preferences

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →