Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
arXiv ↗PDF ↗Paper ↗Website ↗Code ↗
Read first: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
TL;DR. Self-RAG trains one LM (Llama 2, 7B or 13B) to write four kinds of special reflection tokens alongside its answer:
- Retrieve: should I fetch passages now?
- ISREL: is this passage relevant?
- ISSUP: is my sentence supported by it?
- ISUSE: how useful is the answer overall?
At inference the model retrieves only when the Retrieve probability passes a threshold. It processes several passages in parallel and keeps the segments its own critique scores highest. The training is supervised fine-tuning on data labelled offline by a critic that was distilled from GPT-4. It is not RL, and the model never writes search queries.
Why it matters now. Self-RAG gives explicit answers to three questions every search agent faces: whether to retrieve, which evidence to trust, and whether the output is grounded. It shows these can be learned as tokens and then controlled at decoding time. It is also the key paper in Akari Asai’s job talk. Its ISSUP signal looks ahead to process-level grounding rewards.
Key idea
Section titled “Key idea”Reflection tokens. One segment is one sentence.
| Token | Values | Question it answers |
|---|---|---|
| Retrieve | yes, no, continue | Should I retrieve before the next segment? |
| ISREL | relevant, irrelevant | Is passage relevant to ? |
| ISSUP | fully, partially, no support | Is segment supported by ? |
| ISUSE | 5, 4, 3, 2, 1 | Is the response useful for ? |
Training, in two offline stages.
- Critic. Prompt GPT-4 for each token type, giving 4k–20k examples per type. Train a critic (Llama 2 7B) to maximise . It agrees with GPT-4 more than 90% of the time on most categories.
- Generator. Run the retriever and over 150k instruction–output pairs. This inserts passages and reflection tokens into each target. Train the generator with next-token loss, , with the passage tokens masked out and the vocabulary extended with the reflection tokens.
There is no reward model and no PPO; the critic is used only to build the data.
Inference.
- Retrieval decision. Retrieve when the normalised probability of Retrieve = yes exceeds . The paper uses 0.2 for most tasks and 0 for ALCE, so retrieval almost always fires there.
- Candidates. The retriever is Contriever-MS MARCO, top 5. For each passage , generate a candidate segment together with its ISREL, ISSUP and ISUSE tokens.
- Scoring. Each candidate is scored as where each is a normalised probability of the desirable tokens. For ISSUP, “partially” counts half; ISUSE is a weighted sum over its 5 ratings. Defaults are .
- Search. A segment-level beam of size 2 keeps the top candidates. Hard constraints, such as dropping segments rated “no support”, are an alternative to soft weights.
A worked segment (illustrative, not from the paper). Question: Who designed the retrieval model ColBERT?
[Retrieve=Yes] p(yes) = 0.7 > δ = 0.2, so retrieve top-5 d1: "ColBERT ... by Khattab and Zaharia ..." [ISREL=Relevant] candidate: "ColBERT was introduced by Omar Khattab and Matei Zaharia." [ISSUP=Fully supported] [ISUSE=5] d2: "Colbert is a French surname ..." [ISREL=Irrelevant] candidate: "Colbert was a French minister." [ISSUP=No support] [ISUSE=1]beam keeps the d1 segment; next segment: [Retrieve=No] ... [ISUSE=5]Retrieval is ordinary dense retrieval. What Self-RAG adds is the model’s own judgment of each passage and each sentence.
What changed vs. prior work, and what didn’t.
| RAG (Lewis et al.) | Prompted RAG with an LLM | Self-RAG | |
|---|---|---|---|
| When to retrieve | always, once | always, once | per segment, by a learned token and a threshold |
| Passage use | marginalise over top-k | concatenate top-k | one candidate per passage, then rank |
| Groundedness check | none | none | ISSUP token per segment |
| Training | end to end, answer likelihood | none | SFT on critic-labelled data |
| Who writes queries | none | none | none (input and output so far) |
| Inference control | none | prompt | threshold, critique weights, hard constraints |
Key results
Section titled “Key results”Main table (Table 2).
| Model | PopQA acc | TQA acc | PubHealth acc | ARC acc | Bio FS | ASQA em | ASQA rg | ASQA mau | ASQA pre | ASQA rec |
|---|---|---|---|---|---|---|---|---|---|---|
| ChatGPT | 29.3 | 74.3 | 70.1 | 75.3 | 71.8 | 35.3 | 36.2 | 68.8 | – | – |
| Ret-ChatGPT | 50.8 | 65.7 | 54.7 | 75.3 | – | 40.7 | 39.9 | 79.7 | 65.1 | 76.6 |
| Llama2-FT 7B (retrieval at test) | 48.7 | 57.3 | 64.3 | 65.8 | 78.2 | 31.0 | 35.8 | 51.2 | 5.0 | 7.5 |
| Alpaca 13B (retrieval) | 46.1 | 66.9 | 51.1 | 57.6 | 77.7 | 34.8 | 36.7 | 56.6 | 2.0 | 3.8 |
| Self-RAG 7B | 54.9 | 66.4 | 72.4 | 67.3 | 81.2 | 30.0 | 35.7 | 74.3 | 66.9 | 67.8 |
| Self-RAG 13B | 55.8 | 69.3 | 74.5 | 73.1 | 80.2 | 31.7 | 37.0 | 71.6 | 70.3 | 71.3 |
- Cleanest comparison: Llama2-FT 7B. It is trained on the same 150k pairs without reflection tokens and retrieves only at test time. Self-RAG 7B beats it on every column except ASQA exact match and rouge, and its citation precision is 66.9 vs 5.0.
- Against ChatGPT. ChatGPT is still stronger on TriviaQA, ARC and ASQA exact match. Retrieval-augmented ChatGPT has higher citation recall.
Ablations (Figure 3a, 7B trained on 50k, PopQA / PubHealth / ASQA em). The ASQA ablations use 150 sampled instances.
| Variant | PopQA | PubHealth | ASQA em |
|---|---|---|---|
| Self-RAG (50k) | 45.5 | 73.5 | 32.1 |
| No Retriever (trained without passages) | 43.6 | 67.8 | 31.0 |
| No Critic (always top-1, no reflection tokens) | 42.6 | 72.0 | 18.1 |
| No retrieval at test time | 24.7 | 73.0 | – |
| Retrieve only when Retrieve = Yes | 28.3 | 72.6 | – |
| Always retrieve top-1 | 41.8 | 73.1 | 28.6 |
| Remove ISSUP from beam score | 44.1 | 73.2 | 30.6 |
Other analysis (§5.2).
- Customisation: raising the ISSUP weight increases ASQA citation precision and lowers MAUVE.
- Retrieval frequency: lowering it hurts PopQA much more than PubHealth.
- Training data: performance generally rises as training data grows from 5k to 150k, most clearly on PopQA and ASQA.
- Human evaluation: on 50 sampled PopQA and Bio outputs, annotators mostly agree with the predicted ISREL and ISSUP tokens.
Limitations & open questions
Section titled “Limitations & open questions”- Teacher ceiling. All critique labels come from GPT-4 through a 7B critic. Errors and biases in GPT-4’s judgments of relevance and support are copied into the generator.
- The retriever is fixed and query-less. Self-RAG cannot reformulate a query when the top-5 passages are poor. Multi-hop questions that need a new query are out of scope; IRCoT and search agents address them.
- Inference cost. One candidate per passage, a beam of 2 and critique tokens per segment multiply the decoding work compared with plain RAG.
- Thresholds and weights are set by hand. and are chosen per task, and the paper shows the trade-offs are real. A method for setting them from data is open.
- Support ≠ truth. ISSUP checks entailment by the retrieved passage, not whether the passage is correct.
- Open question: can the reflection signals, especially ISSUP, serve as process rewards for RL-trained search agents, and do they resist being gamed once optimised against?
Connections
Section titled “Connections”- Before: RAG (always retrieve, marginalise); IRCoT (retrieve every step, with when-to-retrieve as stated future work); Toolformer (self-supervised API-call insertion, a similar offline-labelling idea).
- Talk: Akari Asai’s job talk.
- After: Search-o1 lets a reasoning model write queries mid-thought. RL-trained agents such as Search-R1 learn whether and what to search from reward.
- Rewards: outcome vs process rewards, generative reward models (critique as generation).
- Evaluation: citation and attribution, LLM-as-judge (the critic is one).
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.
- Derive / compute
Two candidate segments compete in Self-RAG's beam. A, from passage d1, has segment probability 0.40, P(ISREL = relevant) = 0.9 of the ISREL mass, ISSUP probabilities fully / partially / no = 0.2 / 0.3 / 0.5, and all ISUSE mass on 4. B, from d2, has probability 0.55, ISREL relevant 0.6, ISSUP 0.8 / 0.1 / 0.1, and all ISUSE mass on 3. Using the paper's scores and default weights (1.0, 1.0, 0.5), which segment wins? Which wins if the ISSUP weight is set to 0?
What a strong answer covers
- Scores: s_ISREL = normalised P(relevant). s_ISSUP = P(fully) + 0.5 × P(partially), normalised. s_ISUSE = Σ w_i P(i) with w = −1, −0.5, 0, 0.5, 1 for ratings 1–5.
- A: 0.40 + 1.0 × 0.9 + 1.0 × (0.2 + 0.15) + 0.5 × 0.5 = 0.40 + 0.9 + 0.35 + 0.25 = 1.90.
- B: 0.55 + 1.0 × 0.6 + 1.0 × (0.8 + 0.05) + 0.5 × 0 = 0.55 + 0.6 + 0.85 + 0 = 2.00. B wins, because its claim is better supported.
- With ISSUP weight 0: A = 0.40 + 0.9 + 0.25 = 1.55 and B = 0.55 + 0.6 + 0 = 1.15. A wins.
- So the weights decide whether support or relevance and usefulness dominate. This is the paper's inference-time control knob: raising the ISSUP weight raises citation precision and lowers fluency (MAUVE).
- Mechanism
Self-RAG trains its generator with ordinary next-token loss, not PPO, yet the model learns to judge its own retrieval and support. Explain the two-stage data pipeline (GPT-4, critic, offline token insertion), what is masked from the loss, and why this is cheaper than RLHF while still giving a controllable policy.
What a strong answer covers
- Stage 1: prompt GPT-4 to produce each reflection token type on sampled examples (4k to 20k per type). Distil these into a critic C (Llama 2 7B), which agrees with GPT-4 over 90% of the time on most categories.
- Stage 2: run the retriever and the critic offline over 150k instruction-output pairs. This inserts Retrieve, ISREL, ISSUP and ISUSE tokens and passages into the targets.
- Train the generator M (Llama 2 7B or 13B) with next-token loss on the augmented text, after adding the reflection tokens to the vocabulary. Retrieved passage tokens are masked from the loss, because the model should not learn to generate evidence.
- There is no reward model in the training loop and no on-policy sampling, so the cost is one supervised fine-tuning run. The paper contrasts this with PPO-based RLHF.
- The critic's judgments become part of the policy's own output. At inference the generator predicts the tokens itself, and decoding can weight them, so behaviour is tunable without retraining.
- What if…
In the 7B ablations (50k training instances), PopQA accuracy is 45.5 for full Self-RAG, 41.8 when always retrieving and using the top-1 passage, 28.3 when retrieving only if Retrieve = Yes is generated rather than using the adaptive threshold, and 24.7 with no retrieval at test time. On PubHealth the same variants score 73.5, 73.1, 72.6 and 73.0. Explain the pattern across the two datasets.
What a strong answer covers
- PopQA asks about long-tail entities that the LM does not know, so retrieval is essential: no retrieval drops it to 24.7.
- Retrieving only when Retrieve = Yes is the most likely token (28.3) retrieves too rarely. A threshold on the normalised probability (0.2 here) triggers retrieval far more often.
- Top-1 always (41.8): retrieval fires, but there is no choice among passages or critique. Ranking several passages by ISREL, ISSUP and ISUSE adds 3.7 points.
- PubHealth is a claim-verification task where parametric knowledge suffices; all variants sit within 1 point, so retrieval policy barely matters there.
- The lesson: how often to retrieve should depend on the task. The paper exposes the threshold as a knob rather than fixing it.
- Critique
Self-RAG is sometimes described either as "the model checks its own answer" or as "an agent trained to search". Using the paper's method and results, argue why both descriptions are wrong, and identify what its comparison against ChatGPT does and does not show.
What a strong answer covers
- Not just self-checking: the critique tokens are trained from GPT-4 labels via a critic and are used during decoding to choose among passages and segments, not as a post-hoc verifier.
- Not a search agent: the model never writes a query. The retriever (Contriever-MS MARCO) is called with the input and the output so far; the model only decides whether to retrieve and which passage to trust.
- Not RL: training is supervised next-token prediction; there is no reward and no exploration.
- Against ChatGPT: Self-RAG 13B wins on PopQA, PubHealth, biography FactScore, ASQA ROUGE and MAUVE, and citation precision (70.3 vs 65.1 for retrieval-augmented ChatGPT). ChatGPT wins on TriviaQA, ARC, ASQA exact match and citation recall (76.6 vs 71.3).
- Confounds: the comparison mixes model sizes and retrieval setups. Gains over Llama2-FT 7B, trained on the same 150k pairs with retrieval only at test time, are the cleaner evidence.
- Design
You run a RAG service over a large enterprise document collection. Latency budgets differ: a chat surface needs fast answers, while a compliance surface needs every sentence cited. Using Self-RAG's inference knobs, specify the settings for each surface and the measurements that would tell you they are right.
What a strong answer covers
- Chat: higher retrieval threshold (retrieve less), fewer passages, beam of 1. Weight usefulness (ISUSE) relatively higher for fluent answers. Measure latency, retrieval rate and answer quality.
- Compliance: low or zero threshold (always retrieve, as the paper does for ALCE), more passages, a higher ISSUP weight or a hard constraint that drops segments rated "no support". Measure citation precision and recall.
- Expect the trade-off the paper reports: a higher ISSUP weight raises citation precision and lowers MAUVE fluency.
- Check that the critic transfers to your domain: hand-label a sample of ISREL and ISSUP predictions, as the paper does with 50 sampled outputs.
- Log the normalised Retrieve probability per query to set the threshold from data rather than by guessing.
- Connect
IRCoT retrieves after every reasoning sentence and lists "deciding dynamically when to retrieve" as future work; Self-RAG learns a Retrieve token for exactly that. Later RL-trained search agents learn when to search from an outcome reward. Compare the three ways of making this decision and what each needs.
What a strong answer covers
- IRCoT: a fixed rule (retrieve after every sentence). It needs nothing extra, but every step costs a search.
- Self-RAG: a learned token from distilled GPT-4 labels, with a threshold set at inference. It needs a critic and 150k labelled examples, and the decision is local to each segment.
- RL agents (for example Search-R1): the decision is part of the policy, trained by outcome reward. It needs rollouts with a live retriever, but no labels for when to retrieve.
- Only the RL agents write their own queries. Self-RAG and IRCoT retrieve with the input or generated text.
- Self-RAG's ISSUP is a precursor to process-level rewards for groundedness. RL search agents mostly use only an answer-level reward.