Learning to Retrieve: Dual-Level Long-Term Memory for Text-to-SQL Agents
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 22 of its 43 references that are in the map. First posted on arXiv 30 May 2026.
Builds on
22 of 43 references.
References · 22
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 800
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 158
- 2024EASYTOOL: Enhancing LLM-based Agents with Concise Tool Instructioncited by 153
- 2025Evaluation and Benchmarking of LLM Agents: A Surveycited by 145
- 2026SimpleMem: Efficient Lifelong Memory for LLM Agentscited by 140
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2023MemoChat: Tuning LLMs to Use Memos for Consistent Long-Range Open-Domain Conversationcited by 94
- 2025MemInsight: Autonomous Memory Augmentation for LLM Agentscited by 84
10 more
- 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
- 2025Process Reward Models for LLM Agents: Practical Framework and Directionscited by 81
- 2024RAP: Retrieval-Augmented Planning with Contextual Memory for Multimodal LLM Agentscited by 80
- 2024A Review of Prominent Paradigms for LLM-Based Agents: Tool Use (Including RAG), Planning, and Feedback Learningcited by 74
- 2025Hierarchical Memory for High-Efficiency Long-Term Reasoning in LLM Agentscited by 60
- 2024On the Structural Memory of LLM Agentscited by 37
- 2023Interactive Text-to-SQL Generation via Editable Step-by-Step Explanationscited by 19
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 17
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
- 2025Topic Coverage-based Demonstration Retrieval for In-Context Learningcited by 3
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Data Intelligence Agents: Interpreting, Modeling, and Querying Enterprise Data via Autonomous Coding Agentscited by 0
- 2026From Test-Time Scaling to Reusable Memory: Measuring Crystallization in Text-to-SQLcited by 0
- 2026Beyond Context Windows: Persistent Discovery Context for Data-Centric Agentscited by 0
- 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnessescited by 0
- 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnesses28 Sep 2026
- 2026Beyond Context Windows: Persistent Discovery Context for Data-Centric Agents2 Sep 2026
- 2026From Test-Time Scaling to Reusable Memory: Measuring Crystallization in Text-to-SQL7 Aug 2026
- 2026Data Intelligence Agents: Interpreting, Modeling, and Querying Enterprise Data via Autonomous Coding Agents17 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2025MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents
- 2026AdMem: Advanced Memory for Task-solving Agents
- 2026LazyMem: Retrieve Broadly, Construct Selectively for Efficient Long-Term Agent Memory
- 2026ERSkill: Evolving for Skill-Guided Adaptive Memory Retrieval
- 2026Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents
- 2026AMA: Adaptive Memory via Multi-Agent Collaboration
- 2026Beyond Semantic Organization: Memory as Execution State Management for Long-Horizon Agents
- 2026UpliftMem: Learning Set-Level Uplift for Agent Memory Retrieval