Skip to content

WebGPT: Browser-assisted question-answering with human feedback

optionalcorefundamentalpaperrubric 11/122021 · ~40 min

Reiichiro Nakano, Jacob Hilton, Suchir Balaji, …, John Schulman

Read first: Proximal Policy Optimization (PPO) · Reward modeling: Bradley–Terry, label disagreement and a worked example

Status

TL;DR. WebGPT fine-tunes GPT-3 (760M, 13B and 175B) to answer long-form questions by browsing. It uses a text browser built on the Bing API, quotes passages as references, then writes an answer from the question and those references. Training uses two kinds of human data: about 6,000 demonstrations of people browsing, and about 21,500 comparisons between pairs of answers. The best model is the behavior-cloned policy with best-of-64 rejection sampling against a reward model. On ELI5 its answers are preferred to the human demonstrators’ 56% of the time. PPO was tried; it helped less than rejection sampling.

Why it matters now. This is an early large-scale attempt to teach an LM to use a search engine rather than to improve the retriever. Several things it introduced are now standard in deep-research agents:

  • an action space over a real search API;
  • quotes as citations;
  • separate browsing and answering phases;
  • human feedback through a reward model.

Its main empirical lesson is that selection with a reward model beat RL at the inference budgets it studied. Read it before the RL-trained search agents, which revisit that question with verifiable rewards.

Environment. At each step the model sees a text summary of the browser state: the question, the current page text at the cursor, and some other information. It issues one command:

  • Search <query> (Bing) and Clicked on link <id>;
  • Find in page: <text> and Quote: <text>;
  • Scrolled up/down <1–3>, Top and Back;
  • End: Answer, or End: Nonsense/Controversial to skip answering.

Each step starts from a fresh context. The only memory is what the summary records. A quote saves the page title, the domain and the extract as a reference. Browsing ends on End, at the maximum number of actions, or at the maximum total reference length. The model then answers from the question plus the references.

Data. About 6,000 human demonstrations (92% ELI5 questions) and about 21,500 comparisons (98% ELI5). The reward model is trained on about 16,000 comparisons, and 5,500 are held out. BC, RM and RL use disjoint sets of questions.

Four training methods.

  1. Behavior cloning (BC): supervised fine-tuning on the demonstrations.
  2. Reward model (RM): from the BC model, predict r(q,answer,refs)r(q, \text{answer}, \text{refs}) with the Bradley–Terry loss on comparisons, P(A≻B)=σ(rA−rB)P(A \succ B) = \sigma(r_A - r_B). A one-point gap means a σ(1)≈73%\sigma(1) \approx 73\% preference. Ties count as soft 50% labels.
  3. RL: PPO on the BC policy. The episode reward is rRMr_{\text{RM}} at the end, minus a per-token KL penalty to BC: R=rRM(q,a,refs)−β∑tlog⁡π(xt∣⋅)πBC(xt∣⋅)R = r_{\text{RM}}(q, a, \text{refs}) - \beta \sum_t \log \frac{\pi(x_t \mid \cdot)}{\pi_{\text{BC}}(x_t \mid \cdot)} Training data is 90% ELI5 and 10% TriviaQA. Each episode adds 15 answering-only episodes that reuse its references.
  4. Rejection sampling (best-of-nn): sample n∈{4,16,64}n \in \lbrace 4, 16, 64 \rbrace full browse-and-answer episodes from BC or RL, and keep the one the RM scores highest. No extra training is needed; the cost moves to inference.
WebGPT: one browser environment, two kinds of human data, three ways to use the reward model On the left, a text-based browser over the Bing API with actions such as search, click, find, quote, scroll, back and end-answer; quotes become references and the answer is written from the question plus references. Humans using this browser produce about six thousand demonstrations, used for behavior cloning, and about twenty-one and a half thousand comparisons, used to train a reward model. Below, the behavior-cloned policy and the reward model are combined three ways: reinforcement learning with PPO and a KL penalty to the cloned policy, rejection sampling that picks the reward model's favourite of n samples, and both together. The footer states that the best model is 175B behavior cloning with best-of-64 rejection sampling. WebGPT: imitation, preferences, then pick a way to optimise text browser (Bing API) Search · Click · Find Quote · Scroll · Back End: Answer quotes → references answer from q + refs demonstrations ~6,000 human runs comparisons ~21,500 answer pairs behavior cloning (BC) supervised policy reward model (RM) Elo-scaled answer score BC policy + RM, combined three ways RL (PPO) reward = RM at the end − KL to BC per token 58% preferred vs BC rejection sampling sample n from BC, keep the RM's top answer best-of-64: 68% vs BC RL + rejection sampling little extra benefit over rejection sampling alone Best model: 175B BC + best-of-64, preferred 56% vs demonstrators and 69% vs top Reddit answer.
Original sketch. Human demonstrations train the browsing policy; human comparisons train the reward model; the reward model is then used either for PPO or, in the best system, to pick the best of 64 sampled episodes.

A browsing episode (illustrative, not from the paper). Question (ELI5 style): Why does ice float?

Search why is ice less dense than water
Clicked on link 2 # an encyclopedia page about ice
Find in page: hydrogen bond
Quote: As water freezes, hydrogen bonds lock molecules into an open hexagonal lattice ...
Back
Clicked on link 4 # a chemistry explainer
Quote: Ice is about 9% less dense than liquid water ...
End: Answer
Answer: Ice floats because ... [1][2]

With best-of-64, this whole episode is sampled 64 times. The RM sees each final answer with its references, and the top-scoring one is returned.

What changed vs. prior work, and what didn’t.

RAG / REALMReAct (prompted)WebGPT
Retrievertrained dense indexWikipedia lookup APIBing, untouched
Who writes queriesnone; query = inputfrozen LMfine-tuned LM
Learning signalanswer likelihoodnone (few-shot)demonstrations + human preferences
Context across steps—full trajectorybrowser-state summary, fresh each step
Outputshort answershort answerlong-form answer with references
Optimisation of the final modelgradientnoneBC + best-of-64 (RL tried, weaker)

ELI5, human preference for the best model (175B, best-of-64), §4.

  • Preferred to human demonstrators’ answers 56% of the time.
  • Preferred to the highest-voted Reddit (ELI5 reference) answer 69% of the time. The best earlier long-form QA system got 23% against the references, with much less compute.

TruthfulQA. 75% of answers are true and 54% are true and informative. This beats GPT-3 but falls short of humans.

Method comparison (Figure 4, 175B).

  • Best-of-64 BC is preferred to BC 68% of the time.
  • RL is preferred to BC 58% of the time.
  • RL plus rejection sampling gives little benefit over rejection sampling alone.
  • The best-of-nn values evaluated (4, 16, 64 for 760M, 13B, 175B) were chosen as compute-efficient.

Why rejection sampling won (§5.1, the authors’ hypotheses):

  • more inference compute;
  • choosing among many browsed pages with hindsight;
  • an RM trained mostly on BC and rejection-sampling answers, so better matched to them;
  • RL hyperparameters needing tuning;
  • RL reducing the policy’s entropy, which hurts exploration.

Scaling (§5.2). Each doubling of a resource gave roughly:

DoublingEffect
Demonstrationspolicy RM score +0.13
Policy parameterspolicy RM score +0.09 (noisy)
ComparisonsRM accuracy +1.8 points
RM parametersRM accuracy +0.4 points
  • Preference reward invites persuasion. Labelers judge answers with references. The policy can learn to pick convincing but unrepresentative sources and to accept the question’s implicit assumptions.
  • Live web, closed engine. Bing results change, and the model acts on the live web. Results cannot be reproduced exactly, and live actions carry their own risks. Fixed-corpus benchmarks address this.
  • Expensive human data. Demonstrations need people to browse in a custom interface. Comparisons need careful rubrics, and the RM is trained on about 16k of them.
  • RL under-explored. The paper says RL needed tuning and was hurt by falling entropy. With verifiable rewards and newer algorithms, the comparison may come out differently.
  • Open question: at equal total compute (training plus inference), when should a search agent spend on best-of-nn selection and when on RL? WebGPT is one data point, with a preference reward.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    WebGPT's reward model outputs an Elo-style score where the difference between two answers is the logit of the probability that a labeler prefers one. Compute the predicted preference for score differences of 0.8 and 1.0, then translate two scaling results into preference terms: doubling demonstrations raises the policy's RM score by about 0.13, and doubling policy parameters by about 0.09.

    What a strong answer covers
    • P(A preferred over B) = σ(r_A − r_B) = 1 / (1 + exp(−(r_A − r_B))).
    • Difference 0.8: σ(0.8) ≈ 0.69. Difference 1.0: σ(1) ≈ 0.73, the value the paper quotes.
    • Doubling demonstrations: σ(0.13) ≈ 0.53, so the new policy's answers would be preferred about 53% of the time to the old policy's, by the RM's estimate.
    • Doubling policy size: σ(0.09) ≈ 0.52. Each doubling is a small step, so large gains need several doublings or a different lever such as best-of-n.
    • These are RM predictions, not human judgments. They assume the RM is calibrated on the new policy's answers, which over-optimisation can break.
  2. Mechanism

    Both rejection sampling (best-of-64 from the BC policy) and PPO optimise against the same reward model, yet best-of-64 is preferred to BC 68% of the time and RL only 58%. Give the paper's explanations and, for each, the mechanism that makes rejection sampling stronger here.

    What a strong answer covers
    • More inference compute: 64 complete browsing episodes, each visiting different pages, then the best answer is picked. RL produces one episode.
    • Hindsight: the RM judges finished answers with references, so selection happens after the evidence is known. RL must commit to browsing actions before seeing their outcome.
    • Distribution match: the RM was trained mostly on comparisons of BC and rejection-sampling answers, so it is more reliable on that distribution than on RL outputs that drift away.
    • RL needs tuning, and it reduces the policy's entropy. Lower entropy hurts exploration of browsing paths. The paper used no entropy bonus.
    • Rejection sampling needs no training; RL still helps when inference compute is limited, and RL plus rejection sampling adds little over rejection sampling alone.
  3. What if…

    The paper scales three resources separately. Doubling demonstrations raises the policy's RM score by about 0.13; doubling comparisons raises RM accuracy by about 1.8 points; doubling RM parameters raises its accuracy by about 0.4 points; doubling policy parameters raises the RM score by about 0.09. If you had budget to double only one of demonstrations, comparisons or model size, which would you choose and what else would you need to know?

    What a strong answer covers
    • Demonstrations give the largest policy gain per doubling of the four numbers (0.13 RM score), but they are the most expensive data: a full human browsing episode each.
    • Comparisons improve the RM, which helps every optimiser that uses it (best-of-n and RL). A 1.8-point accuracy gain compounds when you select from 64 samples.
    • Model-size doublings give the smallest increments and cost inference compute on every query.
    • You would need the cost per demonstration vs per comparison, and how RM accuracy translates into best-of-n gains. The paper notes the parameter trends are noisy.
    • Data mix matters too: ELI5-heavy data (92% of demonstrations) may not transfer to other question styles.
  4. Critique

    WebGPT is often summarised as "the first RLHF browsing agent". Using the paper's own results, argue why this is misleading, and identify the risk the authors raise about optimising for human preference over answers with references.

    What a strong answer covers
    • The best model is BC plus best-of-64 rejection sampling, not PPO. RL was dropped from the scaling analysis because it gave no significant benefit on top of rejection sampling.
    • Human feedback enters as demonstrations and comparisons. The core technique is imitation plus reranking with a learned reward, which is still RLHF-style data but not RL in the main result.
    • The reward is labeler preference, not truth. The authors warn the setup incentivises cherry-picking references that labelers find convincing, even when they misrepresent the evidence.
    • Labelers can be swayed by fluent, referenced answers; the authors also raise automation bias, where readers over-trust machine answers with citations.
    • TruthfulQA: 75% true and 54% true-and-informative, better than GPT-3 but below humans. Citations do not guarantee truth.
  5. Design

    You want a WebGPT-style training pipeline for a search agent on a fixed research corpus (like BrowseComp-Plus), but questions there have short verifiable answers rather than long ELI5 answers. Decide what to keep from WebGPT (actions, demonstrations, reward model, rejection sampling, RL), what to replace, and how you would evaluate.

    What a strong answer covers
    • Keep the action space idea (search, open, find, quote, answer) and the quote-as-reference mechanism so every answer has explicit evidence.
    • Replace the learned RM with a verifiable reward (exact match or an LLM judge against gold) where possible. Preference labels are expensive and invite convincing-but-wrong answers.
    • Bootstrap with rejection sampling: generate many trajectories, keep the correct ones, and fine-tune (as WebGPT and ReAct's fine-tuning do). Then decide whether RL adds anything at your inference budget.
    • Evaluate accuracy, evidence recall (did the agent open gold documents), citation precision, and cost (searches and tokens per question). Compare best-of-n against RL at equal inference compute.
    • Keep question sets disjoint across demonstration, reward and RL data, as WebGPT does, to avoid leakage.
  6. Connect

    WebGPT's recipe (demonstrations, reward model on comparisons, PPO with a per-token KL to the supervised policy) reappears in InstructGPT a few months later, and its browsing loop reappears in RL-trained search agents such as Search-R1. For each successor, say what was kept and what changed.

    What a strong answer covers
    • InstructGPT keeps the three stages (SFT, RM from comparisons, PPO with KL to the SFT model) but applies them to general instruction following without a browser, and PPO is the final model there.
    • Search agents keep the multi-step tool loop, search queries written by the model, and evidence collected before answering.
    • Search-R1-style methods replace the learned RM with a rule-based outcome reward (exact match), use GRPO or PPO, and train on short-answer QA instead of long-form answers.
    • They also keep full trajectories in context, whereas WebGPT re-prompts each step with a summary of the browser state and a fresh context.
    • The rejection-sampling vs RL question stays open. RL-trained search agents revisit it with verifiable rewards, whereas WebGPT's preference reward was learned and exploitable.

Done with this page?

Status