Superposition Prompting: Improving and Accelerating Retrieval-Augmented Generation
Abstract
Despite the successes of large language models (LLMs), they exhibit significant drawbacks, particularly when processing long contexts. Their inference cost scales quadratically with respect to sequence length, making it expensive for deployment in some real-world text processing applications, such as retrieval-augmented generation (RAG). Additionally, LLMs also exhibit the"distraction phenomenon", where irrelevant context in the prompt degrades output quality. To address these drawbacks, we propose a novel RAG prompting methodology, superposition prompting, which can be directly applied to pre-trained transformer-based LLMs without the need for fine-tuning. At a high level, superposition prompting allows the LLM to process input documents in parallel prompt paths, discarding paths once they are deemed irrelevant. We demonstrate the capability of our method to simultaneously enhance time efficiency across a variety of question-answering benchmarks using multiple pre-trained LLMs. Furthermore, our technique significantly improves accuracy when the retrieved context is large relative the context the model was trained on. For example, our approach facilitates a 93x reduction in compute time while improving accuracy by 43% on the NaturalQuestions-Open dataset with the MPT-7B instruction-tuned model over naive RAG.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- SURf: Teaching Large Vision-Language Models to Selectively Utilize Retrieved Information cites Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Reformer: The Efficient Transformer
- KBLaM: Knowledge Base augmented Language Model cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- AGRAG: Advanced Graph-Based Retrieval-Augmented Generation for LLMs cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Block-Attention for Efficient Prefilling cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Block-Attention for Efficient Prefilling cites Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
- Block-Attention for Efficient Prefilling cites Attention Entropy is a Key Factor: An Analysis of Parallel Context Encoding with Full-attention-based Pre-trained Language Models
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Attention Entropy is a Key Factor: An Analysis of Parallel Context Encoding with Full-attention-based Pre-trained Language Models cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Attention Entropy is a Key Factor: An Analysis of Parallel Context Encoding with Full-attention-based Pre-trained Language Models cites Reformer: The Efficient Transformer
- Attention Entropy is a Key Factor: An Analysis of Parallel Context Encoding with Full-attention-based Pre-trained Language Models cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
Cited by top-tier papers5
- Attention Entropy is a Key Factor: An Analysis of Parallel Context Encoding with Full-attention-based Pre-trained Language ModelsZhisong Zhang, Yan Wang, Xinting Huang, Tianqing Fang et al.ACL 2025 · 22 citations
- SURf: Teaching Large Vision-Language Models to Selectively Utilize Retrieved InformationJiashuo Sun, Jihai Zhang, Yucheng Zhou, Zhaochen Su et al.EMNLP 2024 · 2 citations
- KBLaM: Knowledge Base augmented Language ModelXi Wang, Taketomo Isazawa, Liana Mikaelyan, James HensmanICLR 2025
- AGRAG: Advanced Graph-Based Retrieval-Augmented Generation for LLMsYubo Wang, Haoyang Li, Fei Teng, Lei ChenICDE 2026
- Block-Attention for Efficient PrefillingDongyang Ma, Yan Wang, Tian LanICLR 2025
Builds on15
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-ReflectionAkari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil et al.ICLR 2024 · 1,798 citations
Related papers
- Accelerating Inference of Retrieval-Augmented Generation via Sparse Context SelectionYun Zhu, Jia-Chen Gu, Caitlin Sikora, Ho Ko et al.ICLR 2025
- ConvX: A Lightweight Converter to Bridge Indexed Dense Representations and Large Language Models for Retrieval-Augmented GenerationBonggeun Choi, Keunha Kim, Junho Han, Youngjoong KoACL Findings 2026
- Inference Scaling for Long-Context Retrieval Augmented GenerationZhenrui Yue, Honglei Zhuang, Aijun Bai, Kai Hui et al.ICLR 2025
- More Documents, Same Length: Isolating the Challenge of Multiple Documents in RAGShahar Levy, Nir Mazor, Lihi Shalmon, Michael Hassid et al.EMNLP Findings 2025 · 4 citations
- QPaug: Question and Passage Augmentation for Open-Domain Question Answering of LLMsMinsang Kim, Cheoneum Park, Seung BaekEMNLP Findings 2024 · 5 citations
