SpaRAGraph: Spatial Reasoning using Retrieval-Augmented Generation
The advent of large language models (LLMs) has enabled powerful applications across several domains such as science, healthcare, finance, and law. However, the spatial inference capabilities of LLMs are limited. Our goal is to facilitate more accurate LLM responses to spatial queries. To this end, we leverage inference-time retrieval augmented generation (RAG) to enrich LLM context using external data. We present SpaRAGraph, a framework that i) performs spatial-to-RDF data processing to capture spatial relations between nearby entities, ii) indexes relation-RDFs using a graph to facilitate semantic traversal, and iii) retrieves the relevant context to a question at inference time, contextualizing it with factual, spatial information enhancing the LLM’s accuracy. Additionally, we present a spatial reasoning benchmark that challenges LLMs on binary, multiclass and multilabel classification tasks on real-world, spatial entities. Overall, SpaRAGraph sets the ground for using spatial knowledge retrieval techniques to improve LLM effectiveness in spatial reasoning tasks.
Authors
- Thanasis Georgiadis (ORCID: https://orcid.org/0009-0009-7684-0296)
- John Pavlopoulos
Institutions
- University of Ioannina (GR)
- Athens University of Economics and Business (GR)
Publication Details
- Journal
- ACM Transactions on Spatial Algorithms and Systems
- Published
- 2026-02-26
- DOI
- https://doi.org/10.1145/3799424
- Primary Topic
- Multimodal Machine Learning Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00