arXiv:2606.00547cs.CL2026-06被引 2

提出双层次记忆检索框架,提升文本转SQL智能体的交互效率。

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

论文配图:Learning to Retrieve: Dual-Level Long-Term Memory for Text-to-SQL Agents
图 1 · 摘自论文原文
  • 分两层记忆:全局策略与局部决策分别使用不同记忆
  • 通过强化学习优化记忆检索,提升任务成功率
  • 适合需要长期经验复用的交互式数据库查询场景

交互式文本转SQL智能体通过多轮交互完成数据库任务,包括模式探索、查询执行、反馈理解与决策修正。长期记忆有助于复用过往经验,但现有检索方法受限:静态方法依赖固定相似性规则,无法优化下游效果;动态方法通常仅基于稀疏最终结果学习,且在单一决策阶段检索记忆。这在交互过程中不充分,因不同阶段所需记忆类型不同——初始规划有用的记忆,未必适用于状态相关的局部执行。本文提出MERIT,一种动态多时序记忆检索框架,维护两个层级的记忆:任务级记忆用于全局战略引导,对话轮级记忆用于局部决策支持。两个层级均采用强化学习优化的检索策略。为解决中间阶段监督信号稀疏问题,MERIT引入轻量级过程奖励模型,提供密集代理奖励以指导局部记忆选择。在BIRD-Interact上的实验表明,MERIT在成功率达最优的同时,显著减少平均交互轮次。跨基准迁移实验(Spider2-Snow)显示无需特定调优即具正向迁移能力。结果表明,多时序记忆检索可有效提升交互式文本转SQL智能体的经验复用能力。

原文摘要 · Abstract (English)

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 rely on fixed similarity heuristics that do not optimize downstream utility, while dynamic methods often learn from sparse final outcomes and retrieve memories 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. Experiments on BIRD-Interact show that MERIT outperforms no-memory, static-retrieval, and dynamic-retrieval baselines in success rate while reducing average interaction turns. Transfer results on Spider2-Snow further show positive cross-benchmark transfer without benchmark-specific tuning. These results suggest that multi-horizon retrieval improves experience reuse in interactive text-to-SQL agents.

文本转SQL记忆机制强化学习交互式查询

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