Papers
arxiv:2505.07233

DynamicRAG: Leveraging Outputs of Large Language Model as Feedback for Dynamic Reranking in Retrieval-Augmented Generation

Published on May 12
ยท Submitted by gasolsun on May 13
Authors:
,
,
,

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, which refines retrieved documents to enhance generation quality and explainability. The challenge of selecting the optimal number of documents (k) remains unsolved: too few may omit critical information, while too many introduce noise and inefficiencies. Although recent studies have explored LLM-based rerankers, they primarily leverage internal model knowledge and overlook the rich supervisory signals that LLMs can provide, such as using response quality as feedback for optimizing reranking decisions. In this paper, we propose DynamicRAG, a novel RAG framework where the reranker dynamically adjusts both the order and number of retrieved documents based on the query. We model the reranker as an agent optimized through reinforcement learning (RL), using rewards derived from LLM output quality. Across seven knowledge-intensive datasets, DynamicRAG demonstrates superior performance, achieving state-of-the-art results. The model, data and code are available at https://github.com/GasolSun36/DynamicRAG

Community

Paper submitter

Excited to share our latest work: DynamicRAG: Leveraging Outputs of Large Language Model as Feedback for Dynamic Reranking in Retrieval-Augmented Generation ๐Ÿš€๐Ÿ“„๐Ÿง 

Tired of RAG systems missing critical info or drowning in noise? ๐Ÿค” We propose DynamicRAG, a novel framework where the reranker dynamically adjusts the order AND number of retrieved documents based on YOUR query! ๐Ÿคฏโœจ

Key innovations:

๐Ÿ”„ Dynamic Reranking: No more fixed 'k'! Adapts to each query's needs.
๐Ÿค– RL Agent Reranker: Optimized using reinforcement learning with rewards from LLM output quality. ๐ŸŽฎ๐Ÿ†
๐Ÿค Joint Training: Reranker and generator learn together for optimal synergy.
๐Ÿ“ˆ DynamicRAG achieves state-of-the-art results across SEVEN knowledge-intensive datasets! ๐Ÿ†๐Ÿฅ‡ outperforms existing methods, even with less training data! ๐Ÿ“Š

Say goodbye to static reranking and hello to more relevant, efficient, and high-quality generation! ๐Ÿ‘‹๐Ÿ’ก

๐Ÿ”— Check out the paper: https://arxiv.org/abs/2505.07233
๐Ÿ’ป Code & data: https://github.com/GasolSun36/DynamicRAG

Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2505.07233 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2505.07233 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2505.07233 in a Space README.md to link it from this page.

Collections including this paper 1