Search papers, labs, and topics across Lattice.
This paper introduces PlanRAG, a novel framework that utilizes logical query trees (LQTs) to enhance Retrieval-Augmented Generation (RAG) for tackling exploratory reasoning problems (ERPs) in natural language. By decomposing ERPs into atomic queries and employing dynamic programming for LQT construction, PlanRAG effectively minimizes retrieval noise and error accumulation, which are prevalent in traditional RAG approaches. Experimental results demonstrate that PlanRAG significantly outperforms existing iteration-based and graph-based RAG systems on the newly created WikiWeb-ERP dataset, marking a substantial advancement in optimizing natural language queries.
PlanRAG transforms exploratory reasoning by leveraging logical query trees, achieving superior performance in complex query resolution.
Retrieval-Augmented Generation (RAG) effectively grounds large language models (LLMs) in external knowledge but struggles with \textbf{exploratory reasoning problems (ERPs)} that are the complex queries involving high uncertainty and ambiguity. Resolving ERPs requires complex reasoning with unclear paths, tending to result in retrieval noise and error accumulation. Furthermore, the absence of an end-to-end planning mechanism makes it difficult to generate effective trajectories for ERPs. Motivated by database query planning, we introduce \emph{PlanRAG}, an RAG framework that models ERPs of natural language as \textbf{logical query trees (LQTs)}. However, translating ERPs into LQTs is non-trivial due to representation and optimization gaps between structured SQL and unstructured natural language, making it highly challenging to construct high-quality LQTs. To address these problems, we first decompose ERPs into atomic queries and then organize them into LQTs using dynamic programming guided by a cost model involving multiple complementary dimensions. Finally, we execute iterative aggregation, rewriting, retrieval, and generation over LQTs, processing nodes concurrently and propagating intermediate results upward, with further parallelization across multiple threads for efficiency. Our experimental results show that PlanRAG outperforms state-of-the-art iteration-based and graph-based RAG systems on our newly constructed dataset, \textbf{WikiWeb-ERP}, thereby providing a new formulation for optimizing natural language queries. Our source code and dataset are available at https://anonymous.4open.science/r/PlanRAG-main-B2C8/.