RankRAG: Unifying Context Ranking with Retrieval-Augmented Generation in LLMs

Authors: Yue Yu, Wei Ping, Zihan Liu, Boxin Wang, Jiaxuan You, Chao Zhang, Mohammad Shoeybi, Bryan Catanzaro

Submitted to arXiv on 02 Jul. 2024
License: CC BY 4.0
Abstract

Large language models (LLMs) typically utilize the top-k contexts from a retriever in retrieval-augmented generation (RAG). In this work, we propose a novel instruction fine-tuning framework RankRAG, which instruction-tunes a single LLM for the dual purpose of context ranking and answer generation in RAG. In particular, the instruction-tuned LLMs work surprisingly well by adding a small fraction of ranking data into the training blend, and outperform existing expert ranking models, including the same LLM exclusively fine-tuned on a large amount of ranking data. For generation, we compare our model with many strong baselines, including GPT-4-0613, GPT-4-turbo-2024-0409, and ChatQA-1.5, an open-sourced model with the state-of-the-art performance on RAG benchmarks. Specifically, our Llama3-RankRAG significantly outperforms Llama3-ChatQA-1.5 and GPT-4 models on nine knowledge-intensive benchmarks. In addition, it also performs comparably to GPT-4 on five RAG benchmarks in the biomedical domain without instruction fine-tuning on biomedical data, demonstrating its superb capability for generalization to new domains.

The papers around it, by date and closeness

Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper

How to read this map? Illustrated guide

Closest papers Prior work it builds on Papers that cite it

Papers around this one

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Broader context Cites this paper
    Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG
    Bowen Jin, Jinsung Yoon, Jiawei Han et al. · 2024 · Computation and Language · cited 188 times · AI summary available

    Long-Context LLMs Meet RAG measures how output quality changes with more retrieved passages, while RankRAG combines context ranking and answer generation.

    Abstract

    Retrieval-augmented generation (RAG) empowers large language models (LLMs) to utilize external knowledge sources. The increasing capacity of LLMs to process longer input sequences opens up avenues for providing more retrieved information, to potentially enhance the quality of generated outputs. It is plausible to assume that a larger retrieval set would contain more relevant information (higher recall), that might result in improved performance. However, our empirical findings demonstrate that for many long-context LLMs, the quality of generated output initially improves first, but then subsequently declines as the number of retrieved passages increases. This paper investigates this phenomen…

  2. Very close Another approach to the problem
    RQ-RAG: Learning to Refine Queries for Retrieval Augmented Generation
    Chi-Min Chan, Chunpu Xu, Ruibin Yuan et al. · 2024 · Computation and Language · preprint, not peer reviewed · cited 219 times · AI summary available

    RQ-RAG refines ambiguous or complex queries before retrieval, whereas RankRAG trains one LLM to rank contexts and generate answers.

    Abstract

    Large Language Models (LLMs) exhibit remarkable capabilities but are prone to generating inaccurate or hallucinatory responses. This limitation stems from their reliance on vast pretraining datasets, making them susceptible to errors in unseen scenarios. To tackle these challenges, Retrieval-Augmented Generation (RAG) addresses this by incorporating external, relevant documents into the response generation process, thus leveraging non-parametric knowledge alongside LLMs' in-context learning abilities. However, existing RAG implementations primarily focus on initial input for context retrieval, overlooking the nuances of ambiguous or complex queries that necessitate further clarification or d…

  3. Very close Broader context
    LongRAG: A Dual-Perspective Retrieval-Augmented Generation Paradigm for Long-Context Question Answering
    Qingfei Zhao, Ruobing Wang, Yukuo Cen et al. · 2024 · Computation and Language · cited 84 times · AI summary available

    LongRAG addresses noisy retrieval and lost-in-the-middle problems in long-context question answering, rather than jointly training context ranking and generation.

    Abstract

    Long-Context Question Answering (LCQA), a challenging task, aims to reason over long-context documents to yield accurate answers to questions. Existing long-context Large Language Models (LLMs) for LCQA often struggle with the "lost in the middle" issue. Retrieval-Augmented Generation (RAG) mitigates this issue by providing external factual evidence. However, its chunking strategy disrupts the global long-context information, and its low-quality retrieval in long contexts hinders LLMs from identifying effective factual details due to substantial noise. To this end, we propose LongRAG, a general, dual-perspective, and robust LLM-based RAG system paradigm for LCQA to enhance RAG's understandin…

  4. Very close Another approach to the problem
    AdaptiRAG: Adaptive Retrieval-Augmented Generation with Co-Trained Domain-Specific Fine-Tuned LLMs for Question Answering
    Vijayakumar Venganti, S. Rayarao · 2026 · 2026 International Conference on Artificial Intelligence, Systems, and Emerging Technologies (ICAISET) · Not summarized yet

    AdaptiRAG co-trains adaptive retrieval and a domain-specific generator, while RankRAG instruction-tunes one LLM for context ranking and answer generation.

    Abstract

    Retrieval-Augmented Generation (RAG) has emerged as a powerful paradigm for grounding large language model (LLM) outputs in external knowledge, yet existing approaches suffer from two compounding limitations: (1) static retrieval policies that incur unnecessary latency for queries answerable from parametric memory, and (2) independently optimized retrieval and generation components that fail to leverage cross-component learning signals. We present AdaptiRAG, a co-trained framework that integrates a lightweight context classifier for adaptive retrieval gating, a hybrid dense–sparse retrieval pipeline with cross-encoder reranking, and a LoRA-adapted domain-specific LLM whose fine-tuning object…

  5. Very close Broader context Cites this paper
    RAG-R1: Incentivizing the Search and Reasoning Capabilities of LLMs Through Multi-Query Parallelism
    Zhiwen Tan, Jia-Ming Huang, Qintong Wu et al. · 2025 · AAAI Conference on Artificial Intelligence · cited 25 times · Not summarized yet

    RAG-R1 trains LLMs for parallel multi-query search and reasoning, while RankRAG focuses on unified context ranking and answer generation.

    Abstract

    Large Language Models (LLMs), despite their remarkable capabilities, are prone to generating hallucinated or outdated content due to their static internal knowledge. While Retrieval-Augmented Generation (RAG) integrated with Reinforcement Learning (RL) offers a solution, these methods are fundamentally constrained by a single-query mode, leading to prohibitive latency and inherent brittleness. To overcome these limitations, we introduce RAG-R1, a novel two-stage training framework centered around multi-query parallelism. Our framework enables LLMs to adaptively leverage internal and external knowledge during the reasoning process while transitioning from the single-query mode to multi-query …

  6. Very close Broader context
    Context Tuning for Retrieval Augmented Generation
    Raviteja Anantha, Tharun Bethi, Danil Vodianik et al. · 2023 · Information Retrieval · cited 17 times · AI summary available

    Context Tuning retrieves information to improve tool selection and planning, while RankRAG ranks retrieved passages for knowledge-intensive answer generation.

    Abstract

    Large language models (LLMs) have the remarkable ability to solve new tasks with just a few examples, but they need access to the right tools. Retrieval Augmented Generation (RAG) addresses this problem by retrieving a list of relevant tools for a given task. However, RAG's tool retrieval step requires all the required information to be explicitly present in the query. This is a limitation, as semantic search, the widely adopted tool retrieval method, can fail when the query is incomplete or lacks context. To address this limitation, we propose Context Tuning for RAG, which employs a smart context retrieval system to fetch relevant information that improves both tool retrieval and plan gener…

  7. Very close Different results Cites this paper
    RAG in the Wild: On the (In)effectiveness of LLMs with Mixture-of-Knowledge Retrieval Augmentation
    Ran Xu, Yu-Chen Zhuang, Yue Yu et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 6 times · Not summarized yet

    RAG in the Wild reports that rerankers add minimal value in its diverse datastore evaluation, unlike RankRAG's reported gains from LLM-based context ranking.

    Abstract

    Retrieval-augmented generation (RAG) enhances large language models (LLMs) by integrating external knowledge retrieved at inference time. While RAG demonstrates strong performance on benchmarks largely derived from general-domain corpora like Wikipedia, its effectiveness under realistic, diverse retrieval scenarios remains underexplored. We evaluated RAG systems using MassiveDS, a large-scale datastore with mixture of knowledge, and identified critical limitations: retrieval mainly benefits smaller models, rerankers add minimal value, and no single retrieval source consistently excels. Moreover, current LLMs struggle to route queries across heterogeneous knowledge sources. These findings hig…

  8. Very close Same method, another problem
    Chain-of-Rank: Enhancing Large Language Models for Domain-Specific RAG in Edge Device
    Juntae Lee, Jihwan Bang, Seunghan Yang et al. · 2025 · Computation and Language · cited 7 times · AI summary available

    Chain-of-Rank uses a ranking-oriented reasoning process for domain-specific RAG on edge devices, while RankRAG instruction-tunes an LLM to rank contexts and answer.

    Abstract

    Retrieval-augmented generation (RAG) with large language models (LLMs) is especially valuable in specialized domains, where precision is critical. To more specialize the LLMs into a target domain, domain-specific RAG has recently been developed by allowing the LLM to access the target domain early via finetuning. The domain-specific RAG makes more sense in resource-constrained environments like edge devices, as they should perform a specific task (e.g. personalization) reliably using only small-scale LLMs. While the domain-specific RAG is well-aligned with edge devices in this respect, it often relies on widely-used reasoning techniques like chain-of-thought (CoT). The reasoning step is usef…

Prior work it builds on

  1. Close Another approach to the problem Used in depth by this paper
    Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
    Akari Asai, Zeqiu Wu, Yizhong Wang et al. · 2023 · Computation and Language · cited 3,006 times · AI summary available

    Self-RAG trains an LM to decide when to retrieve and to critique its generations, whereas RankRAG jointly trains ranking and answer generation.

    Abstract

    Despite their remarkable capabilities, large language models (LLMs) often produce responses containing factual inaccuracies due to their sole reliance on the parametric knowledge they encapsulate. Retrieval-Augmented Generation (RAG), an ad hoc approach that augments LMs with retrieval of relevant knowledge, decreases such issues. However, indiscriminately retrieving and incorporating a fixed number of retrieved passages, regardless of whether retrieval is necessary, or passages are relevant, diminishes LM versatility or can lead to unhelpful response generation. We introduce a new framework called Self-Reflective Retrieval-Augmented Generation (Self-RAG) that enhances an LM's quality and fa…

  2. Close Same question Used in depth by this paper
    ChatQA: Surpassing GPT-4 on Conversational QA and RAG
    Zi-Han Liu, Wei Ping, Rajarshi Roy et al. · 2024 · Neural Information Processing Systems · cited 123 times · Not summarized yet

    ChatQA develops models and retrieval for RAG and conversational question answering, and RankRAG compares its generation performance with ChatQA.

    Abstract

    In this work, we introduce ChatQA, a suite of models that outperform GPT-4 on retrieval-augmented generation (RAG) and conversational question answering (QA). To enhance generation, we propose a two-stage instruction tuning method that significantly boosts the performance of RAG. For effective retrieval, we introduce a dense retriever optimized for conversational QA, which yields results comparable to the alternative state-of-the-art query rewriting models, while substantially reducing deployment costs. We also present the ChatRAG Bench, which encompasses ten datasets covering comprehensive evaluations on RAG, table-related QA, arithmetic calculations, and scenarios involving unanswerable qu…

  3. Very close Shared data, tool or method
    Benchmarking Retrieval-Augmented Generation for Medicine
    Guangzhi Xiong, Qiao Jin, Zhiyong Lu et al. · 2024 · Computation and Language · cited 693 times · AI summary available

    MIRAGE provides a benchmark of medical QA questions for evaluating RAG systems, while RankRAG reports results on biomedical RAG benchmarks.

    Abstract

    While large language models (LLMs) have achieved state-of-the-art performance on a wide range of medical question answering (QA) tasks, they still face challenges with hallucinations and outdated knowledge. Retrieval-augmented generation (RAG) is a promising solution and has been widely adopted. However, a RAG system can involve multiple flexible components, and there is a lack of best practices regarding the optimal RAG setting for various medical purposes. To systematically evaluate such systems, we propose the Medical Information Retrieval-Augmented Generation Evaluation (MIRAGE), a first-of-its-kind benchmark including 7,663 questions from five medical QA datasets. Using MIRAGE, we condu…

  4. Very close Broader context
    Retrieval meets Long Context Large Language Models
    Peng Xu, Wei Ping, Xianchao Wu et al. · 2023 · Computation and Language · cited 158 times · AI summary available

    Retrieval meets Long Context compares retrieval augmentation with long context windows, whereas RankRAG studies unified ranking and generation in RAG.

    Abstract

    Extending the context window of large language models (LLMs) is getting popular recently, while the solution of augmenting LLMs with retrieval has existed for years. The natural questions are: i) Retrieval-augmentation versus long context window, which one is better for downstream tasks? ii) Can both methods be combined to get the best of both worlds? In this work, we answer these questions by studying both solutions using two state-of-the-art pretrained LLMs, i.e., a proprietary 43B GPT and LLaMA2-70B. Perhaps surprisingly, we find that LLM with 4K context window using simple retrieval-augmentation at generation can achieve comparable performance to finetuned LLM with 16K context window via…

  5. Very close Another approach to the problem
    Adaptive-RAG: Learning to Adapt Retrieval-Augmented Large Language Models through Question Complexity
    Soyeong Jeong, Jinheon Baek, Sukmin Cho et al. · 2024 · Computation and Language · cited 789 times · AI summary available

    Adaptive-RAG selects retrieval strategies according to question complexity, while RankRAG trains one LLM to rank contexts and generate answers.

    Abstract

    Retrieval-Augmented Large Language Models (LLMs), which incorporate the non-parametric knowledge from external knowledge bases into LLMs, have emerged as a promising approach to enhancing response accuracy in several tasks, such as Question-Answering (QA). However, even though there are various approaches dealing with queries of different complexities, they either handle simple queries with unnecessary computational overhead or fail to adequately address complex multi-step queries; yet, not all user requests fall into only one of the simple or complex categories. In this work, we propose a novel adaptive QA framework, that can dynamically select the most suitable strategy for (retrieval-augm…

Papers that cite it

  1. Very close Same question Uses this paper in depth
    DynamicRAG: Leveraging Outputs of Large Language Model as Feedback for Dynamic Reranking in Retrieval-Augmented Generation
    Jiashuo Sun, Xian-Rui Zhong, Sizhe Zhou et al. · 2025 · Neural Information Processing Systems · cited 22 times · Not summarized yet

    DynamicRAG studies reranking retrieved documents to improve RAG generation, the context-selection problem also addressed by RankRAG.

    Abstract

    Retrieval-augmented generation (RAG) systems combine large language models (LLMs) with external knowledge retrieval, making them highly effective for knowledge-intensive tasks. A crucial but often under-explored component of these systems is the reranker. Since irrelevant documents in RAG systems can mislead the generator, the reranker plays a vital role in refining retrieved documents to enhance generation quality and explainability. However, it is challenging to determine the appropriate number of documents ($k$) that the reranker should select: too few may result in missing critical information, while too many introduce noise and inefficiencies. Although recent studies have explored LLM-b…

  2. Very close Same method, another problem
    SimRAG: Self-Improving Retrieval-Augmented Generation for Adapting Large Language Models to Specialized Domains
    Ran Xu, Hui Liu, Sreyashi Nag et al. · 2024 · Computation and Language · cited 56 times · AI summary available

    SimRAG self-trains an LLM for question answering and question generation to adapt RAG to specialized domains, while RankRAG instruction-tunes ranking and generation together.

    Abstract

    Retrieval-augmented generation (RAG) enhances the question-answering (QA) abilities of large language models (LLMs) by integrating external knowledge. However, adapting general-purpose RAG systems to specialized fields such as science and medicine poses unique challenges due to distribution shifts and limited access to domain-specific data. To tackle this, we propose SimRAG, a self-training approach that equips the LLM with joint capabilities of question answering and question generation for domain adaptation. Our method first fine-tunes the LLM on instruction-following, question-answering, and search-related data. Then, it prompts the same LLM to generate diverse domain-relevant questions f…

  3. Close Another approach to the problem Uses this paper in depth
    Collab-RAG: Boosting Retrieval-Augmented Generation for Complex Question Answering via White-Box and Black-Box LLM Collaboration
    Ran Xu, Wenqi Shi, Yu-Chen Zhuang et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 31 times · Not summarized yet

    Collab-RAG decomposes complex queries with a small model and uses a black-box LLM for reasoning, rather than unifying ranking and generation in one LLM.

    Abstract

    Retrieval-Augmented Generation (RAG) systems often struggle to handle multi-hop question-answering tasks accurately due to irrelevant context retrieval and limited complex reasoning capabilities. We introduce Collab-RAG, a collaborative training framework that leverages mutual enhancement between a white-box small language model (SLM) and a blackbox large language model (LLM) for RAG. Specifically, the SLM decomposes complex queries into simpler sub-questions, thus enhancing the accuracy of the retrieval and facilitating more effective reasoning by the black-box LLM. Concurrently, the black-box LLM provides feedback signals to improve the SLM's decomposition capability. We observe that Colla…

  4. Very close Same method, another problem
    SFR-RAG: Towards Contextually Faithful LLMs
    Xuan-Phi Nguyen, Shrey Pandit, Senthil Purushwalkam et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 25 times · Not summarized yet

    SFR-RAG instruction-tunes a small LLM for context-grounded generation, while RankRAG instruction-tunes an LLM for both context ranking and generation.

    Abstract

    Retrieval Augmented Generation (RAG), a paradigm that integrates external contextual information with large language models (LLMs) to enhance factual accuracy and relevance, has emerged as a pivotal area in generative AI. The LLMs used in RAG applications are required to faithfully and completely comprehend the provided context and users' questions, avoid hallucination, handle unanswerable, counterfactual or otherwise low-quality and irrelevant contexts, perform complex multi-hop reasoning and produce reliable citations. In this paper, we introduce SFR-RAG, a small LLM that is instruction-tuned with an emphasis on context-grounded generation and hallucination minimization. We also present Co…

  5. Very close Same question
    JudgeRank: Leveraging Large Language Models for Reasoning-Intensive Reranking
    Tong Niu, Shafiq Joty, Ye Liu et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 44 times · Not summarized yet

    JudgeRank develops an LLM-based reranker for document relevance in RAG, matching RankRAG's focus on context ranking for generation.

    Abstract

    Accurate document retrieval is crucial for the success of retrieval-augmented generation (RAG) applications, including open-domain question answering and code completion. While large language models (LLMs) have been employed as dense encoders or listwise rerankers in RAG systems, they often struggle with reasoning-intensive tasks because they lack nuanced analysis when judging document relevance. To address this limitation, we introduce JudgeRank, a novel agentic reranker that emulates human cognitive processes when assessing document relevance. Our approach consists of three key steps: (1) query analysis to identify the core problem, (2) document analysis to extract a query-aware summary, a…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 2 November 2026.

The illustrated guide to the papers around a paper