arXiv:2607.00508cs.IR2026-07中稿 · SIGMOD 2027

用查询树规划复杂问题,让大模型推理更准更稳

When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems

论文配图:When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems
图 1 · 摘自论文原文
  • 将自然语言问题转为逻辑查询树,分步拆解复杂任务
  • 在新数据集WikiWeb-ERP上超越现有方法,准确率提升12.7%
  • 适合需要多步推理的科研、问答等高难度场景

检索增强生成(RAG)虽能帮助大模型调用外部知识,但在处理高不确定性和模糊性的探索性推理问题(ERPs)时表现不佳。这类问题路径不明确,易导致检索噪声和错误累积。现有方法缺乏端到端规划机制,难以生成有效推理路径。受数据库查询规划启发,我们提出PlanRAG框架,将自然语言的ERPs建模为逻辑查询树(LQTs)。由于结构化SQL与非结构化自然语言间存在表示与优化鸿沟,构建高质量LQTs极具挑战。为此,我们先将ERPs分解为原子查询,再通过基于多维成本模型的动态规划组织成LQTs;最后在树上迭代执行聚合、重写、检索与生成,支持节点并行与多线程加速。实验表明,PlanRAG在新构建的WikiWeb-ERP数据集上优于当前最先进的迭代式与图结构RAG系统,为自然语言查询优化提供了新范式。

原文摘要 · Abstract (English)

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/.

RAG推理规划查询树大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。