[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-82520-en":3,"doc-seo-82520-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},82520,687197100911,"Himbo","https://ap-avatar.wpscdn.com/avatar/a000239b6f1da00475?x-image-process=image/resize,m_fixed,w_180,h_180&k=1782698725881665579",8,"Research & Report","When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems","Retrieval-Augmented Generation (RAG) grounds large language models in external knowledge but struggles with exploratory reasoning problems (ERPs), which are complex, ambiguous queries with high uncertainty. Solving ERPs requires multi-step reasoning with unclear trajectories, leading to retrieval noise and cascading errors. PlanRAG addresses this gap by modeling ERPs as logical query trees (LQTs) and decomposing them into atomic queries. Dynamic-programming construction using a multi-dimensional cost model and concurrent iterative aggregation, rewriting, retrieval, and generation improve effectiveness, validated on WikiWeb-ERP.","When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems  \nGanlin Xu  \nSchool of Data Science Fudan University Shanghai, China [glxu24@m.fudan.edu.cn](glxu24@m.fudan.edu.cn)  \nLinghao Zhang  \nSchool of Data Science Fudan University Shanghai, China [22307130274@m.fudan.edu.cn](22307130274@m.fudan.edu.cn)  \nZhitao Yin  \nSchool of Data Science Fudan University Shanghai, China [ztyin22@m.fudan.edu.cn](ztyin22@m.fudan.edu.cn)  \narXiv :2607 .00508v2 [ cs .IR] 2 Jul 2026  \nHongda Xi  \nSchool of Data Science Fudan University Shanghai, China [hdxi22@m.fudan.edu.cn](hdxi22@m.fudan.edu.cn)  \nChen Yang  \nSchool of Data Science Fudan University Shanghai, China [yang_c25@m.fudan.edu.cn](yang_c25@m.fudan.edu.cn)  \nJiaqing Liang  \nSchool of Data Science Fudan University Shanghai, China [liangjiaqing@fudan.edu.cn](liangjiaqing@fudan.edu.cn)  \nWeijia Lu  \nUnited Automotive Electronic Systems Shanghai, China [alfredwjlu@gmail.com](alfredwjlu@gmail.com)  \nSihang Jiang  \nCollege of Computer Science and Artificial Intelligence Fudan University Shanghai, China [jiangsihang@fudan.edu.cn](jiangsihang@fudan.edu.cn)  \nYanghua Xiao  \nCollege of Computer Science and Artificial Intelligence Fudan University Shanghai, China [shawyh@fudan.edu.cn](shawyh@fudan.edu.cn)  \nDeqing Yang∗ School of Data Science Fudan University Shanghai, China [yangdeqing@fudan.edu.cn](yangdeqing@fudan.edu.cn)  \nAbstract  \nRetrieval-Augmented Generation (RAG) effectively grounds large language models (LLMs) in external knowledge but struggles with 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 PlanRAG, an RAG framework that models ERPs of natural language as 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  \n∗ Corresponding author.  \nConference acronym ’XX, Woodstock, NY 2018. ACM ISBN 978-1-4503-XXXX-X/2018/06 [https://doi.org/XXXXXXX.XXXXXXX](https://doi.org/XXXXXXX.XXXXXXX)  \nresults show that PlanRAG outperforms state-of-the-art iterationbased and graph-based RAG systems on our newly constructed dataset, 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](https://anonymous.4open.science/r/PlanRAG-main)B2C8/ .  \nKeywords  \nretrieval-augmented generation, query planning, logical query tree, large language model  \nACM Reference Format:  \nGanlin Xu, Linghao Zhang, Zhitao Yin, Hongda Xi, Chen Yang, Jiaqing Liang, Weijia Lu, Sihang Jiang, Yanghua Xiao, and Deqing Yang. 2018. When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems. In Proceedings of Make sure to enter the correct conference title from your rights confirmation email (Conference acronym ’XX) . ACM, New York, NY, USA, 18 pages. [https://doi.org/XXXXXXX.XXXXXXX](https://doi.org/XXXXXXX.XXXXXXX)  \n1 Introduction  \nRetrieval-Augmented Generation (RAG) integrates large language models (LLMs) with external document repositories, groun","cbCaikvybXN0UcaA","https://ap.wps.com/l/cbCaikvybXN0UcaA","pdf",1521995,1,18,"English","en",105,"# Abstract\n# Introduction\n# Database Query Planning\n# Logical Query Trees and PlanRAG\n# Figure 1: ERP vs. Conventional Multi-Hop Queries","[{\"question\":\"为什么传统 RAG 系统难以解决 exploratory reasoning problems（ERPs）？\",\"answer\":\"ERPs 的查询路径不清晰、存在高不确定性与歧义，导致检索噪声与错误累积。由于缺少端到端规划机制，也难以生成有效的推理轨迹。\"},{\"question\":\"PlanRAG 的核心思想是什么？\",\"answer\":\"PlanRAG 受数据库查询规划启发，将自然语言形式的 ERPs 建模为逻辑查询树（LQTs），以支持更系统的查询推理与执行。\"},{\"question\":\"PlanRAG 如何构建高质量的逻辑查询树？\",\"answer\":\"先将 ERPs 分解为原子查询，再借助基于多维成本模型的动态规划对原子查询进行组织，从而缓解结构化 SQL 与非结构化自然语言之间的表示与优化差距。\"}]",1784181149,45,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"when-rag-meets-query-planning-logical-query-trees-for-resolving-exploratory-reasoning-problems","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/when-rag-meets-query-planning-logical-query-trees-for-resolving-exploratory-reasoning-problems/82520/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"为什么传统 RAG 系统难以解决 exploratory reasoning problems（ERPs）？","Question",{"text":75,"@type":76},"ERPs 的查询路径不清晰、存在高不确定性与歧义，导致检索噪声与错误累积。由于缺少端到端规划机制，也难以生成有效的推理轨迹。","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"PlanRAG 的核心思想是什么？",{"text":80,"@type":76},"PlanRAG 受数据库查询规划启发，将自然语言形式的 ERPs 建模为逻辑查询树（LQTs），以支持更系统的查询推理与执行。",{"name":82,"@type":73,"acceptedAnswer":83},"PlanRAG 如何构建高质量的逻辑查询树？",{"text":84,"@type":76},"先将 ERPs 分解为原子查询，再借助基于多维成本模型的动态规划对原子查询进行组织，从而缓解结构化 SQL 与非结构化自然语言之间的表示与优化差距。","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":45,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":45,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]