Redirecting to original paper in 30 seconds...

Click below to go immediately or wait for automatic redirect

arxiv_ai 95% Match Research Paper Data Analysts,Business Intelligence Professionals,Software Developers,AI Researchers 1 week ago

From Queries to Insights: Agentic LLM Pipelines for Spatio-Temporal Text-to-SQL

large-language-models › reasoning
📄 Abstract

Abstract: 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.
Authors (3)
Manu Redd
Tao Zhe
Dongjie Wang
Submitted
October 29, 2025
arXiv Category
cs.AI
arXiv PDF

Key Contributions

Presents an agentic pipeline that enhances a baseline Text-to-SQL model (llama-3-sqlcoder-8b) with a Mistral-based ReAct agent. This agent plans, decomposes, and adapts queries through schema inspection, SQL generation, and execution, significantly improving accuracy and usability for complex spatio-temporal queries.

Business Value

Empowers non-technical users to easily query complex spatio-temporal datasets, unlocking insights for business intelligence, urban planning, and logistics without requiring SQL expertise.