arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.00547cs.CL
收藏

学习检索:面向文本到SQL代理的双层长期记忆

Learning to Retrieve: Dual-Level Long-Term Memory for Text-to-SQL Agents

University of Illinois Chicago(伊利诺伊大学芝加哥分校);Snowflake AI Research(Snowflake AI研究院)

Yibo Wang, Nikki Lijing Kuang, Philip S. Yu, Zhewei Yao, Yuxiong He

AI总结:

提出MERIT框架,通过强化学习优化双层记忆检索(全局策略与局部决策),提升交互式文本到SQL代理的成功率并减少交互轮次。

摘要:

交互式文本到SQL代理通过多轮交互解决数据库任务,涉及模式探索、查询执行、反馈解释和决策修订。长期记忆帮助代理重用过去经验,但现有检索方法仍有局限。静态方法依赖固定的相似性启发式,无法优化下游效用;动态方法通常从稀疏的最终结果中学习,并在单一决策水平上检索记忆。当记忆有用性随交互阶段变化时,这种方法是 insufficient 的,因为用于初始规划的记忆可能不同于局部、状态条件执行所需的记忆。我们提出MERIT,一种动态多水平记忆检索框架。MERIT维护用于全局策略指导的片段级记忆和用于局部决策支持的轮次级记忆。两个水平都使用通过强化学习优化的学习检索策略。为了在有限的中间监督下训练轮次级检索,MERIT使用轻量级过程奖励模型为局部记忆选择提供密集的代理奖励。在BIRD-Interact上的实验表明,MERIT在成功率上优于无记忆、静态检索和动态检索基线,同时减少了平均交互轮次。在Spider2-Snow上的迁移结果进一步显示了无需基准特定调优的跨基准正迁移。这些结果表明,多水平检索改善了交互式文本到SQL代理中的经验重用。

英文摘要:

Interactive text-to-SQL agents solve database tasks through multi-turn interactions involving schema exploration, query execution, feedback interpretation, and decision revision. Long-term memory helps agents reuse past experiences, but existing retrieval methods remain limited. Static methods use fixed similarity heuristics, whereas dynamic methods often learn from sparse terminal outcomes and retrieve at a single decision horizon. This is insufficient when memory usefulness changes across interaction stages, since memories useful for initial planning may differ from those needed for local, state-conditioned execution. We propose MERIT, a dynamic multi-horizon memory retrieval framework. MERIT maintains episode-level memory for global strategic guidance and turn-level memory for local decision support. Both levels use learned retrieval policies optimized with reinforcement learning. To train turn-level retrieval despite limited intermediate supervision, MERIT uses a lightweight Process Reward Model to provide dense proxy rewards for local memory selection. On BIRD-Interact, MERIT achieves higher success rates and fewer interaction turns than no-memory, static-retrieval, and dynamic-retrieval baselines. Transfer results on Spider2-Snow further show that the learned policies transfer without degradation, staying above all memory baselines without benchmark-specific tuning. These results suggest that multi-horizon retrieval improves experience reuse in interactive text-to-SQL agents. Our code is available at https://github.com/YiboWANG214/MERIT.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑