From Queries to Insights: Agentic LLM Pipelines for Spatio-Temporal Text-to-SQL
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
Natural-language-to-SQL (NL-to-SQL) systems hold promise for democratizing access to structured data, allowing users to query databases without learning SQL. Yet existing systems struggle with realistic spatio-temporal queries, where success requires aligning vague user phrasing with schema-specific categories, handling temporal reasoning, and choosing appropriate outputs. We present an agentic pipeline that extends a naive text-to-SQL baseline (llama-3-sqlcoder-8b) with orchestration by a Mistral-based ReAct agent. The agent can plan, decompose, and adapt queries through schema inspection, SQL generation, execution, and visualization tools. We evaluate on 35 natural-language queries over the NYC and Tokyo check-in dataset, covering spatial, temporal, and multi-dataset reasoning. The agent achieves substantially higher accuracy than the naive baseline 91.4% vs. 28.6% and enhances usability through maps, plots, and structured natural-language summaries. Crucially, our design enables more natural human-database interaction, supporting users who lack SQL expertise, detailed schema knowledge, or prompting skill. We conclude that agentic orchestration, rather than stronger SQL generators alone, is a promising foundation for interactive geospatial assistants.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 1 of its 12 references that are in the map. First posted on arXiv 29 Oct 2025.
Builds on
1 of 12 references.
References · 1
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
- 2025From Questions to Queries: An AI-powered Multi-Agent Framework for Spatial Text-to-SQL
- 2026AgentSM: Semantic Memory for Agentic Text-to-SQL
- 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL
- 2025RAISE: Reasoning Agent for Interactive SQL Exploration
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL
- 2026An Agentic System for Schema Aware NL2SQL Generation
- 2026AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views