AgentSM: Semantic Memory for Agentic Text-to-SQL
Asim Biswal, Chuan Lei, Xiao Qin, Aodong Li, Balakrishnan Narayanaswamy, Tim Kraska

TL;DR
AgentSM introduces an interpretable semantic memory framework for Text-to-SQL tasks, enhancing scalability, efficiency, and accuracy in complex enterprise scenarios by reusing reasoning paths and guiding future queries.
Contribution
This paper presents AgentSM, a novel agentic framework that leverages structured semantic memory to improve reasoning efficiency and accuracy in Text-to-SQL systems.
Findings
Achieves 25% reduction in token usage and 35% shorter trajectories compared to state-of-the-art.
Reaches 44.8% accuracy on Spider 2.0 Lite benchmark, setting a new state-of-the-art.
Effectively scales to larger schemas and more complex questions.
Abstract
Recent advances in LLM-based Text-to-SQL have achieved remarkable gains on public benchmarks such as BIRD and Spider. Yet, these systems struggle to scale in realistic enterprise settings with large, complex schemas, diverse SQL dialects, and expensive multi-step reasoning. Emerging agentic approaches show potential for adaptive reasoning but often suffer from inefficiency and instability-repeating interactions with databases, producing inconsistent outputs, and occasionally failing to generate valid answers. To address these challenges, we introduce Agent Semantic Memory (AgentSM), an agentic framework for Text-to-SQL that builds and leverages interpretable semantic memory. Instead of relying on raw scratchpads or vector retrieval, AgentSM captures prior execution traces-or synthesizes curated ones-as structured programs that directly guide future reasoning. This design enables…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Semantic Web and Ontologies · Advanced Database Systems and Queries
