Skip to content

ReSearch: Learning to Reason with Search for LLMs via Reinforcement Learning

optionalcorefrontierpaperrubric 9/122025 · NeurIPS 2025 · ~40 min

Mingyang Chen, Linzhuang Sun, Tianpeng Li, …, Weipeng Chen

Read first: DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models · Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning

Status

TL;DR. ReSearch trains Qwen2.5 models (7B and 32B, base and instruct) with GRPO to write <think> and <search> segments in one chain, with search results inserted as <result> segments that are masked out of the loss. The reward is the F1 of the final boxed answer, with a 0.1 floor for a well-formatted wrong answer. It trains only on MuSiQue and is evaluated on four multi-hop QA sets over the same Wikipedia index.

Why it matters now. ReSearch is one of three almost simultaneous “R1 for search” papers (with Search-R1 and R1-Searcher). Reading it next to them shows which design choices were shared, which differed, and how little of that difference was ablated. The name is a pun: the model learns to Reason with Search. The abstract’s claim of training without supervised data refers to reasoning traces: there are no human-written chains to imitate, but the method still needs gold answers.

A rollout is one text stream. The policy writes reasoning in <think> tags. When it closes a </search> tag, generation stops, the query is sent to an E5-base-v2 retriever over the December 2018 Wikipedia (via FlashRAG), and the top 5 passages are appended in <result> tags. Generation then continues until the end-of-sequence token. The final answer is written inside <answer> tags with the answer string in \boxed{}.

The training objective is GRPO (Eq. 1). For each question xx, G=5G = 5 rollouts are sampled and each gets the group-normalised advantage

Ai=ri−mean⁡(r1,…,rG)std⁡(r1,…,rG).A_i=\frac{r_i-\operatorname{mean}(r_1,\dots,r_G)}{\operatorname{std}(r_1,\dots,r_G)} .

Retrieved tokens are excluded from the loss, as in Search-R1. The reward (Eq. 2) is

r={F1(apred,agt)if F1>00.1if F1=0 and the format is correct0otherwise.r=\begin{cases}\mathrm{F1}(a_{\text{pred}},a_{\text{gt}}) & \text{if } \mathrm{F1}>0\\ 0.1 & \text{if } \mathrm{F1}=0 \text{ and the format is correct}\\ 0 & \text{otherwise.}\end{cases}

Two things differ from Search-R1. The answer reward is token F1, which gives partial credit for multi-word answers. And there is a small format reward, but only for answers that are fully wrong: a correct answer earns its F1 whatever the format bonus would have been.

ReSearch: a reasoning chain with search, an F1 reward with a small format floor, and GRPO over five rollouts Left: one rollout as a vertical chain. The policy writes a think segment, then a search segment; generation stops at the closing search tag, the E5 retriever over the December 2018 Wikipedia returns the top 5 passages inside result tags, and these result tokens are masked out of the loss. The policy then writes more thinking, possibly further searches, and finally an answer containing a boxed string. Middle: the reward. If the F1 between the boxed answer and the gold answer is above zero, the reward is that F1. If F1 is zero but the tags and the boxed answer are well formed, the reward is 0.1. Otherwise the reward is 0. Right: GRPO. Five rollouts are sampled per MuSiQue training question, their rewards are normalised by the group mean and standard deviation, and every generated token of a rollout receives that rollout's advantage, with a KL penalty of 0.001 and clip ratio 0.2. One rollout think: what is needed? search: a short query result: top-5 E5 passages masked out of the loss think / search again ... answer: \boxed{...} think/search/answer: policy result: retriever, masked Reward (Eq. 2) f = F1(boxed answer, gold) if f > 0: r = f if f = 0 and format ok: r = 0.1 otherwise: r = 0 no reward for searching GRPO update 5 rollouts per question A_i = (r_i - mean) / std same A_i on every generated token KL 0.001, clip 0.2 MuSiQue train only, 19,938 questions, 2 epochs no SFT warm-up
Original sketch. The policy writes think, search and answer segments; retrieved results are inserted by the environment and masked. The reward is answer F1 with a 0.1 floor for a well-formatted wrong answer, optimised with GRPO over five rollouts per question (§2, Eq. 1–2, Appendix B).

Table 3 shows a rollout from training Qwen2.5-32B-Instruct (paraphrased). Question: Who won the 2018 presidential election in the country where the political party of Martín Ramírez Pech operates? Gold: Andrés Manuel López Obrador.

StepWho writes itContent
1policy<think>: first find the country of the politician’s party.
2policy<search> Martín Ramírez Pech
3retriever, masked<result> passages about a different Martín Ramírez, an artist
4policy<think>: these are about someone else; the query needs to be more specific.
5policy<search> Martín Ramírez Pech political party
6retriever, masked<result> passages mentioning the Labor Party (PT) of Mexico
7policy<search> 2018 Mexican presidential election
8retriever, masked<result> the election was won by Andrés Manuel López Obrador
9policy<answer> boxed Andrés Manuel López Obrador → F1 = 1, reward 1

Step 4 is what the paper calls self-elicited reflection: the model wrote “I made a mistake” and refined its query. For an IR reader this is query reformulation after a name-disambiguation failure. Note that the evidence is one example, and the truncated passages shown for step 6 do not name Ramírez Pech, so the party attribution may partly come from the model’s own knowledge.

Prompted iterative RAG (Iter-RetGen, IRCoT)Search-R1ReSearch
Weights trainednonepolicypolicy
Answer rewardn/aEMF1
Format rewardn/anone0.1 only if F1 = 0
Optimisern/aPPO or GRPOGRPO
Training datan/aNQ + HotpotQAMuSiQue only
RetrievalFlashRAG implementationsE5, 2018 Wikipedia, top-3E5, 2018 Wikipedia, top-5
EvidenceTable 2 baselinesSearch-R1 Table 2Table 2

All numbers are paper-reported (arXiv v3, Table 2). EM is exact match; LJ is an LLM-as-judge accuracy scored by gpt-4o-mini. Evaluation uses the full dev sets of HotpotQA (7,405), 2Wiki (12,576) and MuSiQue (2,417) and the Bamboogle test set (125), all over the same E5 + Wikipedia environment.

ModelHotpotQA EM / LJ2Wiki EM / LJMuSiQue EM / LJBamboogle EM / LJ
Iter-RetGen, Qwen2.5-7B-Instruct34.36 / 52.2227.92 / 31.868.69 / 16.1421.60 / 35.20
ReSearch, Qwen2.5-7B40.57 / 60.2644.67 / 50.0621.68 / 32.1943.20 / 54.40
ReSearch, Qwen2.5-7B-Instruct43.52 / 63.6247.59 / 54.2222.30 / 33.4342.40 / 54.40
ReSearch, Qwen2.5-32B-Instruct46.73 / 67.7044.90 / 50.3026.40 / 38.5656.80 / 67.20
  • Headline gains. Averaged over the four benchmarks, the 7B instruct model is 15.81 EM and 17.56 LJ points above Iter-RetGen; at 32B the gaps are 14.82 and 15.46 (§3.2). These are absolute differences of averages.
  • Training dynamics (§3.3). Response length (excluding retrieved text) and the number of searches per rollout grow during training. The 32B models first shorten their responses for about 20 steps and grow again after about step 60, which the authors read as learning to rely on search instead of parametric knowledge. Training reward rises sharply in the first 20 steps.
  • Setup (Appendix B). verl, 8×8 H800 GPUs, full-parameter training, learning rate 1e-6, batch 256, 5 rollouts at temperature 1.0, KL coefficient 0.001, clip ratio 0.2. Validation uses 100 random MuSiQue dev questions.
  • Short answers on Wikipedia only (the authors’ Appendix C). The F1 reward does not extend to long-form answers, and no other corpus is tried.
  • No ablations. It is unclear how much the F1 reward, the 0.1 floor, top-5 retrieval or MuSiQue-only training each contribute.
  • Prompted baselines only. All baselines are prompted (no RL-trained search agent, no SFT on search traces), so the table shows “RL beats prompting”, not “this RL recipe beats others”.
  • Same environment at test time. Generalisation is across question sets, not across retrievers or corpora.
  • Reflection is anecdotal. One case study; no rate of reformulation before vs after training.
  • Code moved. The paper’s repository (github.com/Agent-RL/ReSearch) now redirects to Agent-RL/ReCall, the authors’ later, more general tool-calling version.

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

    The paper says ReSearch improves over "the best baseline" by 15.81% EM and 17.56% LLM-judge on average for 7B, and by 14.82% and 15.46% for 32B. Using Table 2, reproduce the 7B numbers, name the baseline and the ReSearch variant used, and say whether these are relative or absolute gains.

    What a strong answer covers
    • Average the four benchmarks (HotpotQA, 2Wiki, MuSiQue, Bamboogle). ReSearch-Qwen-7B-Instruct: EM 38.95, LJ 51.42. Iter-RetGen (7B-Instruct): EM 23.14, LJ 33.86.
    • Differences: 38.95 − 23.14 = 15.81 EM and 51.42 − 33.86 = 17.56 LJ. Same procedure at 32B: 43.71 − 28.89 = 14.82 and 55.94 − 40.48 = 15.46.
    • So the "%" values are absolute percentage-point gains on the four-benchmark average, not relative gains (relative EM would be about 68% at 7B).
    • Iter-RetGen is the best baseline on average but not everywhere: IRCoT is higher on Bamboogle (24.80 vs 21.60 EM at 7B). The comparison uses the stronger instruct ReSearch model; the base model gives 37.53 EM, about 14.4 points above Iter-RetGen.
  2. Mechanism

    ReSearch gives reward F1 when F1 is above 0, 0.1 when F1 is 0 but the format is correct, and 0 otherwise. Compute the GRPO advantages (sample std) for a group of five rollouts with rewards (1, 0.5, 0.1, 0.1, 0) and for (0.1, 0.1, 0.1, 0.1, 0). What does the 0.1 floor teach in each group, and when could it become the dominant signal?

    What a strong answer covers
    • Group 1: mean 0.34, std ≈ 0.416, advantages ≈ +1.59, +0.39, −0.58, −0.58, −0.82. Without the floor, (1, 0.5, 0, 0, 0) gives +1.57, +0.45 and −0.67 for all three failures, so the floor separates a well-formed wrong answer from a malformed one.
    • Group 2: mean 0.08, std ≈ 0.045, advantages +0.45 for each well-formed failure and −1.79 for the malformed one. Standard-deviation normalisation turns a 0.1 reward gap into a large update.
    • In a hard group where no rollout gets any F1, the only signal is format; the policy is pushed towards valid tags and a boxed answer, not towards better searches.
    • This is useful early, when instruct models must learn the tag protocol, but on hard questions it can dominate and reward "well-formatted guessing". Monitoring the share of groups with all F1 = 0 tells you how much of the update is format-only.
  3. Critique

    The abstract says ReSearch learns "without using any supervised data on reasoning steps" and that reflection is "naturally elicited". List every source of supervision or prior that the method still relies on, and say what evidence would be needed to support the reflection claim.

    What a strong answer covers
    • Supervision that remains: gold short answers for 19,938 MuSiQue questions (the reward); a prompt template that spells out the tag protocol with an example; the F1 metric and the format checker; and, for instruct models, the vendor's instruction tuning.
    • The retriever (E5-base-v2) and the 2018 Wikipedia index are fixed and the same at evaluation, so "generalisation" is to new question sets over the same corpus.
    • The reflection claim rests on one training-time example from Qwen2.5-32B-Instruct ("I made a mistake" followed by a refined query). Base and instruct Qwen models can already produce such phrases before RL.
    • Evidence needed: the frequency of query reformulation after an unhelpful result, measured before and after RL on the same questions, and whether reformulations raise the chance of retrieving a gold-supporting passage.
  4. What if…

    The paper has no ablation table. Design the smallest set of runs that would tell you which of its choices matter: the F1 reward vs EM, the 0.1 format floor, retrieval-result masking, top-5 vs top-3, and MuSiQue-only training. State what each run holds fixed and what outcome would surprise you.

    What a strong answer covers
    • Fix the backbone (Qwen2.5-7B-Instruct), steps, batch 256, 5 rollouts, KL 0.001 and seeds; change one factor per run and report the four-benchmark EM and LJ averages plus searches per rollout.
    • F1 vs EM: expect F1 to give denser signal on multi-token answers; the Search-R1 follow-up study found F1 can collapse into answer avoidance, so log the answer rate.
    • Floor 0.1 vs 0: expect faster format learning with the floor; a surprise would be equal final accuracy, which would make the floor a convergence aid only.
    • Masking off: Search-R1 lost about 9 EM points without it; a much smaller drop here would suggest the effect depends on passage length or optimiser.
    • MuSiQue-only vs NQ + HotpotQA training: tests whether the transfer to 2Wiki and Bamboogle comes from MuSiQue's harder compositional questions or from the method itself.
  5. Design

    Appendix C says the method only handles short, objectively checkable answers over Wikipedia. You need a version for a domain corpus where answers are one to three sentences (for example a scientific-paper collection). Specify the reward, the format check, the retrieval setup and the evaluation, and explain which ReSearch choices you would keep.

    What a strong answer covers
    • Keep: the tag protocol, retrieval-result masking, GRPO with small groups, and a low learning rate (1e-6) with a small KL coefficient.
    • Reward: replace answer F1 by a claim-level score, e.g. nugget recall judged by an LLM against reference nuggets, or a judge's correctness label; keep a small format floor but cap it so it cannot exceed a partially correct answer.
    • Guard against judge hacking: hold out a second judge, check length correlation, and audit a sample by hand.
    • Retrieval: your own dense or hybrid retriever over the corpus, top-k tuned on held-out recall; log the share of gold-supporting passages retrieved per query.
    • Evaluation: a held-out question set written differently from training, plus a different-retriever test to check that the policy has not fitted one index.
  6. Connect

    ReSearch, Search-R1 and R1-Searcher appeared within three weeks of each other in March 2025. Compare them on reward, training data, retriever and top-k, and optimiser, and name one conclusion you cannot draw from their reported numbers.

    What a strong answer covers
    • Reward: Search-R1 uses EM only; ReSearch uses F1 with a 0.1 floor for correct format; R1-Searcher uses a retrieval-plus-format reward in Stage 1 and F1 with a format penalty in Stage 2.
    • Data: Search-R1 trains on NQ + HotpotQA; ReSearch on MuSiQue only; R1-Searcher on difficulty-filtered HotpotQA and 2Wiki questions.
    • Retrieval: Search-R1 and ReSearch both use E5 over the 2018 Wikipedia dump (top-3 and top-5); R1-Searcher uses BGE-large over the 2019 KILT Wikipedia.
    • Optimiser: PPO or GRPO (Search-R1), GRPO (ReSearch), Reinforce++ (R1-Searcher). All three mask retrieved tokens.
    • You cannot rank the methods: the benchmarks overlap but metrics (EM, LJ, cover-EM), splits, retrievers and backbones differ. Only a common harness such as BrowseComp-Plus or the 2026 Search-R1 study gives like-for-like comparisons.

Done with this page?

Status