From Questions to Queries: An AI-powered Multi-Agent Framework for Spatial Text-to-SQL
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
The complexity of SQL and the spatial semantics of PostGIS create barriers for non-experts working with spatial data. Although large language models can translate natural language into SQL, spatial Text-to-SQL is more error-prone than general Text-to-SQL because it must resolve geographic intent, schema ambiguity, geometry-bearing tables and columns, spatial function choice, and coordinate reference system and measurement assumptions. We introduce a multi-agent framework that addresses these coupled challenges through staged interpretation, schema grounding, logical planning, SQL generation, and execution-based review. The framework is supported by a knowledge base with programmatic schema profiling, semantic enrichment, and embedding-based retrieval. We evaluated the framework on the non-spatial KaggleDBQA benchmark and on SpatialQueryQA, a new multi-level and coverage-oriented benchmark with diverse geometry types, workload categories, and spatial operations. On KaggleDBQA, the system reached 81.2% accuracy, 221 of 272 questions, after reviewer corrections. On SpatialQueryQA, the system achieved 87.7% accuracy, 79 of 90, compared with 76.7% without the review stage. These results show that decomposing the task into specialized but tightly coupled agents improves robustness, especially for spatially sensitive queries. The study improves access to spatial analysis and provides a practical step toward more reliable spatial Text-to-SQL systems and autonomous GIS.
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 14 of its 34 references that are in the map. First posted on arXiv 23 Oct 2025.
Builds on
14 of 34 references.
Closest ancestors · 1
Same direction, newest first
Other references · 13
- 2017Attention Is All You Needcited by 59,932
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
- 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 105
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
- 2023Autonomous GIS: the next-generation AI-powered GIScited by 52
- 2024Unveiling the Impact of Coding Data Instruction Fine-Tuning on Large Language Models Reasoningcited by 31
- 2024GIS Copilot: Towards an Autonomous GIS Agent for Spatial Analysiscited by 26
- 2024An Autonomous GIS Agent Framework for Geospatial Data Retrievalcited by 25
- 2025MapQA: Open-domain Geospatial Question Answering on Map Datacited by 15
- 2025Spatial-RAG: Spatial Retrieval Augmented Generation for Real-World Geospatial Reasoning Questionscited by 13
- 2025GIScience in the Era of Artificial Intelligence: A Research Agenda Towards Autonomous GIScited by 13
- 2023Text-to-OverpassQL: A Natural Language Interface for Complex Geodata Querying of OpenStreetMapcited by 9
1 more
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025From Queries to Insights: Agentic LLM Pipelines for Spatio-Temporal Text-to-SQL
- 2026Spatial-Agent: Agentic Geo-spatial Reasoning with Scientific Core Concepts
- 2025MapAgent: A Hierarchical Agent for Geospatial Reasoning with Dynamic Map Tool Integration
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
- 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agents
- 2026MultiGlobeQA: A Multilingual and Globally Diverse Benchmark for Geospatial Reasoning
- 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
- 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL