Automating spatial analysis remains challenging due to its dependence on predefined workflows, static schemas, and expert-driven configurations, which limit adaptability across diverse datasets and analytical contexts. Recent advances in large language models (LLMs) provide new opportunities to address these challenges by enabling systems to interpret human intent, reason over structured data, and generate executable analytical workflows. This study presents an automated Spatial Query and Analysis (SQA) framework that leverages LLMs to translate natural language queries into validated spatial operations. The framework interprets user prompts and classifies them as either general or spatial queries. General queries are answered directly by a language model, whereas spatial queries are processed through a multi-agent reasoning pipeline that performs semantic interpretation, spatial analysis, peer-review validation, and code execution checks to ensure accuracy and consistency. In addition to query-based interaction, users can upload new spatial datasets that are automatically validated and integrated into the system through dynamic knowledge augmentation. Evaluation using a large metropolitan university campus dataset shows that SQA framework achieves improved spatial reasoning performance compared with single-agent baselines, including configurations with metadata access and error-correction mechanisms. The framework also incorporates a two-step error recovery process that successfully resolves common failure types, including table or schema mismatches, coordinate reference system (CRS) misuse, and column or spatial reasoning errors. SQA framework demonstrates consistent accuracy across single-table, multi-table, and 3D queries, producing integrated outputs in map, chart, and tabular formats.
Pour et al. (Mon,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: