GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

ReasonIR: Training Retrievers for Reasoning Tasks

Meta trains an 8B retriever on LLM-written hard queries and hard negatives. It leads BRIGHT, helps RAG on GPQA, and shows why an LLM reranker that scores 0-5 needs a tie-breaker.

Breakdown by FDE Interviews · 14 min read · Updated

About the original · 2025
AUTHORS
Shao, Qiao, Kishore, Muennighoff, et al.
FROM
FAIR at Meta, University of Washington, National University of Singapore, Allen Institute for AI, Stanford, MIT, UC Berkeley
PUBLISHED
Apr 2025 · arXiv preprint
CITED BY
89Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 17% of this breakdown.

01

The paper in one minute

A question like "a researcher notices night-shift workers struggle to sleep during the day; what is the primary factor?" is best served by a document on circadian rhythms, which shares no key words with it. Retrievers are trained on queries such as "Where did Yellowstone National Park get its name?", whose answer passage repeats the question. NQ and MS MARCO queries average 20 and 21 tokens; BRIGHT, a benchmark of reasoning-intensive retrieval, averages 194.

ReasonIR-8B is a bi-encoder trained for the second kind. The authors build ReasonIR-Synthesizer, which makes two kinds of synthetic data with Llama 3.1 70B. Varied-length (VL): the LLM writes a long query, 300 to 2,000 words, and a positive document for it. Hard queries (HQ): the LLM reads a reasoning-worthy seed document, brainstorms background knowledge and realistic scenarios, and writes a self-contained hard question that the document helps answer. For both, a hard negative is written in a second turn, conditioned on the query and positive, because asking for it in the same turn produced short, easy negatives.

They fine-tune Llama 3.1 8B, switched to bidirectional attention, with a contrastive loss on 1,383,877 public pairs, 244,970 VL pairs and 100,521 HQ pairs, for 1,000 steps at batch size 2,048.

On BRIGHT, ReasonIR-8B scores 24.4 nDCG@10 with the original queries against 20.9 for GritLM-7B, and 29.9 when GPT-4 first rewrites each query into a long reasoning query, slightly above Rank1-32B, an LLM reranker (29.4). Adding BM25 reaches 32.0, and a zero-shot Qwen 2.5 32B reranker on top reaches 36.9. The paper also introduces that reranker; its main trick is breaking ties.

THE IDEA, VISUALLY
THREE KINDS OF TRAINING PAIR Public 1,383,877 MS MARCO, NQ, HotpotQA and 8 more; NQ, MS MARCO queries: 20-21 tokens VL 244,970 LLM writes a 300-2,000 word query and its positive; turn 2: hard negative HQ 100,521 seed doc (FineWeb-Edu ≥ 2) → brainstorm a hard query; turn 2: hard negative HARD NEGATIVE SCORED ABOVE POSITIVE (FIG. 3C) BM25 GRIT-7B Public 25.1% 3.9% VL 37.3% 11.3% HQ 53.0% 42.3% a semantic retriever already solves the public data TRAINING Llama 3.1 8B, causal mask → bidirectional, mean pooling contrastive loss, τ 0.02, in-batch + hard negatives batch 2,048 · 1,000 steps · data from Llama 3.1 70B BRIGHT nDCG@10 (TABLE 1) original query BM25 14.8 GritLM-7B 20.9 ReasonIR-8B 24.4 GPT-4 rewritten query (Reason-query) BM25 26.5 Rank1-32B rerank 29.4 ReasonIR-8B 29.9 + BM25 hybrid 32.0 + Qwen 32B rerank 36.9 THE RERANKER NEEDS A TIE-BREAK (TABLE 7) 0-5 score only 30.3 + BM25 score 34.9 blend with retriever 36.9 RAG ACCURACY (TABLE 2) closed original rewritten MMLU, Llama 3.1 8B 71.1 75.0 75.6 GPQA, Qwen 2.5 7B 31.3 38.4 35.4 Rewriting with the small reader helped MMLU and hurt GPQA for every dense retriever.
Hard queries written from real documents, with a hard negative written in a second turn, are the data that existing retrievers fail on. Trained on them, an 8B bi-encoder leads BRIGHT, and a zero-shot LLM reranker on top gains most of its edge from breaking ties.
Research notes: the problem, approach and results
24.4

BRIGHT nDCG@10 with original queries, against 20.9 for GritLM-7B and 14.8 for BM25

30.3 → 36.9

the zero-shot reranker's BRIGHT score before and after blending its 0-5 scores with the retriever's to break ties

53.0%

share of the synthetic hard-query pairs where BM25 ranks the hard negative above the positive; 25.1% for public data

THE PROBLEM

Retrievers are trained on short factual queries whose answers share words or meaning with the question. Reasoning-heavy queries, such as a long problem description whose useful document explains the underlying principle, share neither, and retrievers trained on public data do poorly on them.

THE IDEA

Generate training data with an LLM: long varied-length queries with positives, and hard queries brainstormed from reasoning-worthy documents, each with a hard negative written in a separate turn. Fine-tune Llama 3.1 8B as a bidirectional bi-encoder on that plus 1.38M public pairs.

THE RESULT

ReasonIR-8B scores 24.4 nDCG@10 on BRIGHT with original queries (GritLM-7B 20.9), 29.9 with GPT-4 rewritten queries, 32.0 combined with BM25 and 36.9 with a zero-shot Qwen 32B reranker. As a RAG retriever it lifts GPQA from 31.3 to 38.4 and MMLU from 71.1 to 75.6.

02

Why it matters to an FDE

Customer queries in support, engineering, legal and research tools are often long problem descriptions, not lookups. An engineer pastes a stack trace and three paragraphs of context; the useful document is a design note on the retry policy. Standard embedders score that pair low because the words and topics differ. If the assistant answers from the wrong documents, nothing downstream recovers.

This paper puts numbers on four levers you can pull, in order of cost.

Swap the retriever. ReasonIR-8B is released with code and data. On BRIGHT it beats the best similar-size embedder by 3.5 points with no other change.

Add BM25. A 0.5 blend with BM25 adds 2.1 points on rewritten queries; the two retrievers share only 28.2% of their top 100 documents.

Rewrite the query. Having an LLM expand the query into a long reasoning query helps on BRIGHT, but in the RAG tests a small reader rewriting its own queries helped MMLU and hurt GPQA for every dense retriever. Test before turning it on.

Rerank with an LLM, and break ties. A zero-shot 32B model scoring 0 to 5 reached 30.3; blending its score with the retriever's reached 36.9. An LLM reranker asked for a small integer score is a common setup, and its ties are easy to miss.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 149 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
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    What made the data hard, which mix worked, the reranker fix, compute claims and three misreadings

    Free account
  2. 04How it works

    The generation prompts, hard negatives, training setup and the tie-breaking reranker

    Premium
  3. 05The numbers that matter

    BRIGHT by setting, RAG results, data ablations, recall and overlap, and the FLOPs table

    Premium
  4. 06Try it yourself

    Recheck the relative gains and FLOPs, then measure what ties cost an LLM reranker

    Premium
  5. 07Where it breaks

    Seed documents from the benchmark's pool, small margins, rewrite costs and reranker mismatch

    Premium
  6. 08Using it on a deployment

    Checking if a customer's queries are reasoning-heavy, then each lever in cost order

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →