When should language models retrieve external knowledge versus use internal knowledge?
Can we model retrieval as a per-step decision problem rather than an always-on strategy? This matters because unnecessary retrieval adds noise and latency without improving accuracy.
Retrieval augmentation is not always helpful. Some queries require external knowledge that the LLM does not have. Others require reasoning over knowledge the LLM already contains. For the second type, retrieval adds noise: potentially irrelevant retrieved documents compete with the model's correct internal representations, increasing latency without improving accuracy.
DeepRAG formalizes this as a Markov Decision Process. At each reasoning step, the model makes a binary decision: retrieve external knowledge or rely on parametric knowledge. The state is the current question and available information; the action is the decision; the reward is downstream answer accuracy. The model learns a policy for when to retrieve.
The MDP framing makes explicit what standard RAG leaves implicit: retrieval is a resource with a cost, not a free improvement. Always-retrieve is a degenerate policy that ignores the cost. Never-retrieve is a degenerate policy that ignores the benefit. Optimal policy adapts to step-level information needs.
The 21.99% accuracy improvement comes from two sources: better answers when retrieval is used (because the model retrieves more targeted subqueries), and reduced noise when retrieval is not used (because the model stops disrupting correct parametric reasoning with irrelevant retrieved content).
The connection to Does reasoning fine-tuning make models worse at declining to answer?: both findings highlight that LLMs trained with outcome rewards learn to always engage (always answer, always retrieve) rather than calibrating engagement to actual knowledge state. The MDP explicitly rewires this — abstention (use parametric knowledge) becomes an active and rewarded choice.
Inquiring lines that read this note 67
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
How should dialogue systems represent uncertainty from noisy speech input? What memory architectures best support persistent reasoning across extended interactions?- Do retrieval-augmented memory systems actually solve the compartmentalization problem?
- How do retrieved memories differ from decision-context passages for prediction?
- Does including full context always degrade memory retrieval quality in practice?
- Can external managers optimize context better than the model itself?
- Why does attending to own latents work better than bolted-on external memory stores?
- How does externalized state affect the long-context bottleneck in language models?
- How does uncertainty-gated retrieval compare to continuous retrieval efficiency?
- What makes reranking during retrieval better than catching failures at plan time?
- Why does retrieval quality sometimes conflict with final answer quality?
- Should retrieval be triggered always or only for difficult questions?
- Could eliminating retrieval entirely work better than shifting the burden?
- Should retrieval be triggered by model uncertainty or fixed intervals?
- Does uncertainty trigger retrieval better than fixed-interval tool calls?
- How does response content compare to model confidence as a retrieval trigger?
- How should retrieval systems decide when to fetch new information?
- How much does retrieval budget improve when triggered by dual signals instead of fixed intervals?
- How do confidence thresholds compare to learned policies for triggering retrieval?
- What role does document reranking play alongside decisions about whether to retrieve?
- How should retrieval triggers use model uncertainty instead of fixed intervals?
- Are uncertainty estimation and external feature signals complementary for retrieval?
- Why do external feature triggers outperform uncertainty on complex questions?
- What are the 27 external features that predict retrieval need?
- Can retrieval systems decide when to retrieve instead of always querying?
- Does parallel retrieval outperform sequential search chains at test time?
- Why do pretrained retrievers struggle with ambiguous or implicit queries?
- Can parallel retrieval chains avoid the context consumption problem?
- How can inference-time retrieval avoid the domain boundary problem?
- Why does single-round retrieval fail on multi-step tasks across different domains?
- What limits exist on retrieval budget during inference?
- How should retrieval and verification tasks be separated architecturally?
- How do case memory and Q-function updates enable better retrieval decisions over time?
- Can adaptive per-step decisions outperform uniform retrieval policies across different reasoning tasks?
- Does retrieval quality depend more on access structure or write gating?
- How can per-step decisions about knowledge retrieval improve reasoning over uniform policies?
- Do single-step retrieval systems with sophisticated synthesis qualify as deep research?
- How does overthinking in early turns degrade later retrieval rounds?
- How does proactive information-gathering capability differ from passive knowledge retrieval?
- Do expansion-reflection loops and chain-of-retrieval approaches solve the same problem?
- Can stateless multi-step retrieval capture evidence integration as well as dynamic memory?
- Why do language models substitute parametric knowledge over retrieved context mid-reasoning?
- Can models internalize retrieved context as static parametric knowledge?
- Can retrieval policies learn to use pretraining statistics as decision features?
- What is the difference between changing model outputs versus changing internal representations?
- How does training order affect knowledge acquisition in language models?
- What specific information must be exported from the language system?
- Why do language models need external temporal signals at all?
- How do attention heads separate text retrieval from internal thought representation?
- What are retrieval heads and why do they matter for reasoning?
- What is the difference between procedural knowledge and factual retrieval in reasoning?
- How do retrieval heads interact with layer-level separation of knowledge and reasoning?
- How many document exposures does procedural knowledge versus factual information require?
Related concepts in this collection 8
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
When should retrieval happen during model generation?
Explores whether retrieval should occur continuously, at fixed intervals, or only when the model signals uncertainty. Standard RAG retrieves once; long-form generation requires dynamic triggering based on confidence signals.
complementary: FLARE uses confidence as trigger; DeepRAG uses a trained MDP policy as trigger; both target the same decision but with different mechanisms
-
Does reasoning fine-tuning make models worse at declining to answer?
When models are trained to reason better, do they lose the ability to say 'I don't know'? This matters for high-stakes applications like medical and legal AI that depend on appropriate uncertainty.
the same over-engagement failure applies to retrieval; the MDP fixes retrieval engagement just as abstention training would fix reasoning engagement
-
Can we allocate inference compute based on prompt difficulty?
Does adjusting how much compute each prompt receives—rather than using a fixed budget—improve model performance? Could smarter allocation let smaller models compete with larger ones?
adaptive allocation at the retrieval level; the MDP determines retrieval budget allocation per step
-
Why do reasoning systems keep discovering new connections?
Explores whether agentic graph reasoning systems maintain a special balance between semantic diversity and structural organization that enables continuous discovery of novel conceptual relationships.
both formalize reasoning over external knowledge as per-step optimization; DeepRAG decides whether to retrieve at each step while ComoRAG decides which graph edges to explore, both demonstrating that adaptive per-step decisions outperform uniform policies
-
Can document count be learned instead of fixed in RAG?
Standard RAG systems use a fixed number of documents regardless of query complexity. Can an RL agent learn to dynamically select both how many documents and their order based on what helps the generator produce correct answers?
complementary RL optimization in RAG: DeepRAG learns when to retrieve (per-step binary), DynamicRAG learns what to include from retrieved results (count and order); both use generator quality as reward signal
-
Does supervising retrieval steps outperform final answer rewards?
Can intermediate feedback on retrieval decisions—which documents to fetch, when to stop—train agentic RAG systems more effectively than rewarding only the final answer? This matters because poor retrieval paths can accidentally succeed or good ones can fail on noisy metrics.
DeepRAG's MDP framing provides the theoretical structure, RAG-Gym provides the training methodology: process-level rewards supervise the quality of the retrieval steps that the MDP policy selects
-
Does RL improve domain reasoning by adding knowledge or removing it?
When reinforcement learning improves reasoning in specialized domains like medicine, is it teaching models new facts or preventing them from using wrong ones? Understanding this distinction matters for how we design RL training.
the MDP's "use parametric knowledge" action is the retrieval analog of RL pruning: both suppress suboptimal engagement (unnecessary retrieval / inaccurate knowledge paths) rather than adding new capability
-
Can reasoning systems maintain memory across retrieval cycles?
Existing retrieval systems treat each lookup independently. But what if reasoning required a persistent memory workspace that evolves as contradictions emerge and understanding deepens?
ComoRAG adds the statefulness dimension that DeepRAG's per-step MDP lacks: while DeepRAG decides whether to retrieve at each step, ComoRAG maintains a persistent memory workspace that integrates evidence across cycles, enabling contradiction detection and resolution
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- DeepRAG: Thinking to Retrieval Step by Step for Large Language Models
- Deep Research: A Systematic Survey
- Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMs
- Rethinking with Retrieval: Faithful Large Language Model Inference
- LLM-Independent Adaptive RAG: Let the Question Speak for Itself
- Metacognitive Retrieval-Augmented Large Language Models
- RAG-R1 : Incentivize the Search and Reasoning Capabilities of LLMs through Multi-query Parallelism
- Context Embeddings for Efficient Answer Generation in RAG
Original note title
retrieval-augmented reasoning as Markov Decision Process enables per-step parametric versus external knowledge switching