{"ID":5551873,"CreatedAt":"2026-07-02T01:54:51.863792489Z","UpdatedAt":"2026-07-04T06:25:51.571775532Z","DeletedAt":null,"paper_url":"https://arxiv.org/abs/2607.00508","arxiv_id":"2607.00508","title":"When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems","abstract":"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/.","short_abstract":"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 re...","url_abs":"https://arxiv.org/abs/2607.00508","url_pdf":"https://arxiv.org/pdf/2607.00508v1","authors":"[\"Ganlin Xu\",\"Linghao Zhang\",\"Zhitao Yin\",\"Hongda Xi\",\"Chen Yang\",\"Jiaqing Liang\",\"Weijia Lu\",\"Sihang Jiang\",\"Yanghua Xiao\",\"Deqing Yang\"]","published":"2026-07-01T06:43:55Z","proceeding":"cs.IR","tasks":"[\"cs.IR\"]","methods":"[\"RAG\",\"Large Language Model\",\"Language Model\",\"LoRA\",\"Generative Adversarial Network\"]","project_urls":"[\"https://anonymous.4open.science/r/PlanRAG-main-B2C8/\"]","has_code":false}
