GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
ICLR 2024

Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection

Train a model to emit its own control tokens: whether to retrieve, whether a passage is relevant, whether each sentence is supported. Beam search on those scores; strong results, with fine print.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2023
AUTHORS
Asai, Wu, Wang, Sil, Hajishirzi
FROM
University of Washington, Allen Institute for AI, IBM Research AI
PUBLISHED
Oct 2023 · ICLR 2024
CITED BY
2,866Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 21% of this breakdown.

01

The paper in one minute

Retrieval-augmented generation prepends retrieved passages to the prompt and hopes the model uses them well. It retrieves even when the input needs no facts (write an essay about your summer), it passes along irrelevant passages, and nothing checks that the answer follows the evidence. Akari Asai, Hannaneh Hajishirzi and colleagues at the University of Washington, AI2 and IBM proposed Self-RAG, which makes those judgments part of the model's own output.

The model gets four kinds of reflection tokens. Retrieve says whether to fetch passages before the next sentence. IsRel says whether a retrieved passage is relevant. IsSup says whether the sentence just written is fully, partially or not supported by the passage. IsUse rates the whole answer's usefulness from 1 to 5.

Training happens in two steps. GPT-4 labels 4,000 to 20,000 examples per token type, and a critic (Llama 2 7B) learns to reproduce those labels. The critic and a retriever then annotate 150,000 instruction-output pairs offline: they insert passages where retrieval helps, and add the relevance, support and utility tokens. The generator (Llama 2 7B or 13B) is trained on that corpus with the ordinary next-token loss, so at inference it emits reflection tokens itself, without a separate critic or reward model.

At inference, the model works one sentence at a time. If it predicts retrieval (or the probability of Retrieve=Yes passes a threshold), it retrieves passages, writes one candidate sentence per passage in parallel, and scores each by its relevance, support and utility tokens. A segment-level beam search keeps the best candidates. The weights on each score can be changed at inference: weight support higher for citation precision, lower for fluency.

On six tasks (open-domain QA, fact verification, multiple-choice reasoning, biographies and long-form QA with citations), Self-RAG beat open models with or without retrieval and beat retrieval-augmented ChatGPT on several.

THE IDEA, VISUALLY
TRAINING: CRITIC LABELS OFFLINE, GENERATOR LEARNS THEM GPT-4 labels 4k-20k Critic Llama 2 7B Annotate 150k pairs Generator 7B / 13B INFERENCE: ONE SENTENCE AT A TIME Retrieve? p(Yes) > 0.2 passage 1 Relevant Supported passage 2 Irrelevant No support passage 3 Relevant Partially one candidate per passage, plus utility 1-5 Score = segment probability + 1.0·relevance + 1.0·support + 0.5·utility; keep the best 2 (segment beam), next sentence. Raise the support weight for citation precision; lower it for fluency. No retraining needed. Up to 5 passages x 2 beams = 10 continuations per sentence. Closed-set tasks: scores aggregated per answer option. Baselines generate their answer. TABLE 2, WITH RETRIEVAL PopQA (acc) Llama2-FT 7B 48.7 Ret-ChatGPT 50.8 Self-RAG 13B 55.8 PubHealth (acc) Llama2-FT 7B 64.3 Ret-ChatGPT 54.7 Self-RAG 13B 74.5 ASQA citation precision Alpaca 13B 2.0 Ret-ChatGPT 65.1 Self-RAG 13B 70.3 ABLATION, 7B ON 50K: POPQA (FIGURE 3A) default (threshold 0.2) 45.5 no critic in training 42.6 retrieve top 1 always 41.8 retrieve only on Yes 28.3 no retrieval at test 24.7 PubHealth: 73.5 default, 73.0 with no retrieval CRITIC VS GPT-4 LABELS (APPENDIX) Retrieve 93.8% IsSup 93.5% IsRel 80.2% IsUse 73.5%
Self-RAG distills GPT-4's judgments into special tokens a 7B or 13B model learns to emit, then ranks candidate sentences by them. It led open models on all six tasks. Most of the PopQA gain comes from retrieving almost every time; the model's own retrieve decision, used alone, cost 17 points.
Research notes: the problem, approach and results
55.8

PopQA accuracy for Self-RAG 13B, against 50.8 for retrieval-augmented ChatGPT and 46.1 for Alpaca 13B with retrieval

70.3

ASQA citation precision for Self-RAG 13B, against 65.1 for retrieval-augmented ChatGPT

45.5 vs 28.3

PopQA for the 7B ablation with the default retrieval threshold against retrieving only when the model predicts Retrieve=Yes

THE PROBLEM

Standard RAG retrieves a fixed number of passages for every input, whether or not the task needs them, and nothing checks that the output actually follows the passages. Irrelevant passages hurt quality, and citations are often unsupported.

THE IDEA

Add reflection tokens to the vocabulary: Retrieve (yes, no, continue), IsRel (relevant or not), IsSup (fully, partially or not supported) and IsUse (utility 1 to 5). A critic distilled from GPT-4 inserts them into 150k training examples offline; the generator learns to emit them, and decoding ranks candidate sentences by them.

THE RESULT

Self-RAG 7B and 13B beat open models with and without retrieval on all six tasks and beat retrieval-augmented ChatGPT on PopQA, TriviaQA, PubHealth and ASQA citation precision (70.3 against 65.1). Open retrieval baselines had ASQA citation precision of 2 to 5.5.

02

Why it matters to an FDE

Self-RAG is one of the most cited RAG papers and the origin of patterns you will see everywhere: decide whether to retrieve, grade passages before using them, check that the answer is supported, and cite per sentence.

You can apply the pattern without training. The four judgments map directly onto pipeline steps: a retrieval router, a passage grader, a groundedness check on each sentence, an answer-quality score. Many production RAG systems implement them with prompts or small classifiers rather than special tokens.

Retrieval decisions are where the risk is. In the paper's own ablation, letting the model decide when to retrieve, with no threshold to push it, lost 17 points on PopQA. The reported numbers use a threshold that makes it retrieve almost always. For factual products, default to retrieving.

Grounding checks cost compute. Writing one candidate per passage and keeping a beam multiplies generation work by up to ten per sentence. Budget latency before promising per-sentence verification.

Citation precision is a trainable property. Open models with plain retrieval almost never produced supported citations in this benchmark; a model trained to cite reached 70%.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

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

    Token types, training data, decoding knobs, headline results and misreadings to avoid

    Free account
  2. 04How it works

    Critic distillation, corpus augmentation, the inference loop and the scoring rule

    Premium
  3. 05The numbers that matter

    Main results, ablations, customization, retrieval frequency, data scale and human checks

    Premium
  4. 06Try it yourself

    Implement the critique scoring both ways, check the headline comparisons, and count decoding work

    Premium
  5. 07Where it breaks

    Retrieval decisions, evaluation asymmetries, cost, inconsistencies and dated components

    Premium
  6. 08Using it on a deployment

    Bringing Self-RAG's judgments into a customer's RAG pipeline

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →