Geospatial Knowledge-Base Question Answering Using Multi-Agent Systems
Abstract
1. Introduction
- We propose a multi-agent system capable of converting natural language into GeoSPARQL queries.
- We empirically demonstrate that multi-agent systems outperform single-agent systems, highlighting the necessity of multi-agent systems for GeoKBQA.
- We design a multi-agent system pipeline based on domain knowledge in GIScience and the design principles of SPARQL/GeoSPARQL, and we conduct ablation studies to demonstrate the importance of each component.
2. Related Works
2.1. LLMs for Geospatial Applications
2.2. Question Answering over Geospatial Knowledge Base
2.3. LLMS to Multi-Agent Systems
3. Methodology
3.1. Intent-Analyzer Agent
3.2. Multi-Grained Retriever Agents
3.2.1. Concept Retriever
3.2.2. Geospatial-Relation Retriever
3.2.3. Property Retriever
3.3. Operator-Builder Agent
3.4. Query-Generator Agent
4. Experimental Results and Analysis
4.1. Setup
4.2. Overall Performance
4.3. Multi-Agent System vs. Single-Agent System
4.4. Multi-Agent System Ablation
4.5. Case Study
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| LLM | Large language model |
| AI | Artificial intelligence |
| NLP | Natural-language processing |
| GeoAI | Geospatial artificial intelligence |
| GIS | Geographic information system |
| RAG | Retrieval-augmented generation |
| QA | Question answering |
| SQL | Structured Query Language |
| KB | Knowledge-base |
| GeoKBQA | Geospatial Knowledge-base Question Answering |
| ELQ | Entity Linking for Questions |
| SLM | Small language model |
| OSM | OpenStreetMap |
| POS | Parse/part-of-speech |
| RNN | Recurrent neural network |
| LSTM | Long short-term memory |
| IR | Intermediate representation |
| DSL | Domain-specific language |
| BGP | Basic graph pattern |
| FOL | First-order logic |
Appendix A
Prompt Template for Multi-Agent System






References
- Wei, J.; Tay, Y.; Bommasani, R.; Raffel, C.; Zoph, B.; Borgeaud, S.; Yogatama, D.; Bosma, M.; Zhou, D.; Metzler, D.; et al. Emergent Abilities of Large Language Models. arXiv 2022, arXiv:2206.07682. [Google Scholar] [CrossRef]
- Wei, J.; Wang, X.; Schuurmans, D.; Bosma, M.; Xia, F.; Chi, E.; Le, Q.; Zhou, D. Chain-of-thought prompting elicits reasoning in large language models. Adv. Neural Inf. Process. Syst. 2022, 35, 24824–24837. [Google Scholar]
- Liu, P.; Biljecki, F. A review of spatially explicit GeoAI applications in urban geography. Int. J. Appl. Earth Obs. Geoinf. 2022, 112, 102936. [Google Scholar] [CrossRef]
- Wang, S.; Huang, X.; Liu, P.; Zhang, M.; Biljecki, F.; Hu, T.; Fu, X.; Liu, L.; Liu, X.; Wang, R.; et al. Mapping the landscape and roadmap of geospatial artificial intelligence (GeoAI) in quantitative human geography: An extensive systematic review. Int. J. Appl. Earth Obs. Geoinf. 2024, 128, 103734. [Google Scholar] [CrossRef]
- Mai, G.; Huang, W.; Sun, J.; Song, S.; Mishra, D.; Liu, N.; Gao, S.; Liu, T.; Cong, G.; Hu, Y.; et al. On the opportunities and challenges of foundation models for geospatial artificial intelligence. arXiv 2023, arXiv:2304.06798. [Google Scholar] [CrossRef]
- Tan, C.; Cao, Q.; Li, Y.; Zhang, J.; Yang, X.; Zhao, H.; Wu, Z.; Liu, Z.; Yang, H.; Wu, N.; et al. On the Promises and Challenges of Multimodal Foundation Models for Geographical, Environmental, Agricultural, and Urban Planning Applications. arXiv 2023, arXiv:2312.17016. [Google Scholar] [CrossRef]
- Manvi, R.; Khanna, S.; Mai, G.; Burke, M.; Lobell, D.B.; Ermon, S. GeoLLM: Extracting Geospatial Knowledge from Large Language Models. 2024. Available online: https://rohinmanvi.github.io/GeoLLM/ (accessed on 1 October 2025).
- Wei, C.; Zhang, Y.; Zhao, X.; Zeng, Z.; Wang, Z.; Lin, J.; Guan, Q.; Yu, W. GeoTool-GPT: A trainable method for facilitating Large Language Models to master GIS tools. Int. J. Geogr. Inf. Sci. 2025, 39, 707–731. [Google Scholar] [CrossRef]
- Zhang, Y.; Li, J.; Wang, Z.; He, Z.; Guan, Q.; Lin, J.; Yu, W. Geospatial large language model trained with a simulated environment for generating tool-use chains autonomously. Int. J. Appl. Earth Obs. Geoinf. 2025, 136, 104312. [Google Scholar] [CrossRef]
- Lewis, P.; Perez, E.; Piktus, A.; Petroni, F.; Karpukhin, V.; Goyal, N.; Küttler, H.; Lewis, M.; Yih, W.-T.; Rocktäschel, T.; et al. Retrieval-augmented generation for knowledge-intensive NLP tasks. Adv. Neural Inf. Process. Syst. 2020, 33, 9459–9474. [Google Scholar]
- Wang, J.; Zhao, Z.; Wang, Z.J.; Da Cheng, B.; Nie, L.; Luo, W.; Yu, Z.Y.; Yuan, L.W. GeoRAG: A Question-Answering Approach from a Geographical Perspective. arXiv 2025, arXiv:2504.01458. [Google Scholar]
- Peng, Z.; Kuai, X.; Ke, S.; Dong, X.; Guo, R. Enhancing geodatabases operability: Advanced human-computer interaction through RAG and Multi-Agent Systems. Big Earth Data 2025, 9, 217–242. [Google Scholar] [CrossRef]
- Feng, Y.; Zhang, P.; Xiao, G.; Ding, L.; Meng, L. Towards a Barrier-free GeoQA Portal: Natural Language Interaction with Geospatial Data Using Multi-Agent LLMs and Semantic Search. arXiv 2025, arXiv:2503.14251. [Google Scholar] [CrossRef]
- Punjani, D.; Singh, K.; Both, A.; Koubarakis, M.; Angelidis, I.; Bereta, K.; Angelidis, I.; Bereta, K.; Beris, T.; Bilidas, D.; et al. Template-based question answering over linked geospatial data. In Proceedings of the 12th Workshop on Geographic Information Retrieval, Seattle, WA, USA, 6 November 2018; pp. 1–10. [Google Scholar]
- Hamzei, E.; Tomko, M.; Winter, S. Translating place-related questions to GeoSPARQL queries. In Proceedings of the ACM Web Conference 2022, Lyon, France, 25–29 April 2022; pp. 902–911. [Google Scholar]
- Kefalidis, S.A.; Punjani, D.; Tsalapati, E.; Plas, K.; Pollali, M.A.; Maret, P.; Koubarakis, M. The question answering system GeoQA2 and a new benchmark for its evaluation. Int. J. Appl. Earth Obs. Geoinf. 2024, 134, 104203. [Google Scholar] [CrossRef]
- Yang, J.; Jang, H.; Yu, K. Geographic Knowledge Base Question Answering over OpenStreetMap. ISPRS Int. J. Geo-Inf. 2023, 13, 10. [Google Scholar] [CrossRef]
- Raffel, C.; Shazeer, N.; Roberts, A.; Lee, K.; Narang, S.; Matena, M.; Zhou, Y.; Li, W.; Liu, P.J. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res. 2020, 21, 1–67. [Google Scholar]
- Li, B.Z.; Min, S.; Iyer, S.; Mehdad, Y.; Yih, W.T. Efficient One-Pass End-to-End Entity Linking for Questions. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, 16–20 November 2020; pp. 6433–6441. [Google Scholar]
- Goodfellow, I.; Bengio, Y.; Courville, A.; Bengio, Y. Deep Learning (Vol. 1, No. 2); MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
- Talebirad, Y.; Nadiri, A. Multi-agent collaboration: Harnessing the power of intelligent LLM agents. arXiv 2023, arXiv:2306.03314. [Google Scholar] [CrossRef]
- Wang, Y.; Wu, Z.; Yao, J.; Su, J. Tdag: A multi-agent framework based on dynamic task decomposition and agent generation. Neural Netw. 2025, 185, 107200. [Google Scholar] [CrossRef]
- Touvron, H.; Martin, L.; Stone, K.; Albert, P.; Almahairi, A.; Babaei, Y.; Bashlykov, N.; Batra, S.; Bhargava, P.; Bhosale, S.; et al. Llama 2: Open foundation and fine-tuned chat models. arXiv 2023, arXiv:2307.09288. [Google Scholar] [CrossRef]
- Achiam, J.; Adler, S.; Agarwal, S.; Ahmad, L.; Akkaya, I.; Aleman, F.L.; Almeida, D.; Altenschmidt, J.; Altman, S.; Anadkat, S.; et al. Gpt-4 technical report. arXiv 2023, arXiv:2303.08774. [Google Scholar] [CrossRef]
- Singh, K.; Radhakrishna, A.S.; Both, A.; Shekarpour, S.; Lytra, I.; Usbeck, R.; Vyas, A.; Khikmatullaev, A.; Punjani, D.; Lange, C.; et al. Why reinvent the wheel: Let’s build question answering systems together. In Proceedings of the 2018 World Wide Web Conference, Lyon, France, 23–27 April 2018; pp. 1247–1256. [Google Scholar]
- Finkel, J.R.; Grenager, T.; Manning, C.D. Incorporating non-local information into information extraction systems by gibbs sampling. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL’05), Ann Arbor, MI, USA, 25–30 June 2005; pp. 363–370. [Google Scholar]
- Usbeck, R.; Ngonga Ngomo, A.C.; Röder, M.; Gerber, D.; Athaide Coelho, S.; Auer, S.; Both, A. AGDISTIS–agnostic disambiguation of named entities using linked open data. In ECAI 2014; IOS Press: Amsterdam, The Netherlands, 2014; pp. 1113–1114. [Google Scholar]
- Lample, G.; Ballesteros, M.; Subramanian, S.; Kawakami, K.; Dyer, C. Neural Architectures for Named Entity Recognition. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego, CA, USA, 12–17 June 2016; Association for Computational Linguistics: East Stroudsburg, PA, USA, 2016. [Google Scholar]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, MN, USA, 2–7 June 2019; Volume 1, pp. 4171–4186. [Google Scholar]
- Ferragina, P.; Scaiella, U. Tagme: On-the-fly annotation of short text fragments (by wikipedia entities). In Proceedings of the 19th ACM International Conference on Information and Knowledge Management, Toronto, ON, Canada, 26–30 October 2010; pp. 1625–1628. [Google Scholar]
- Brown, P.F.; Della Pietra, V.J.; Desouza, P.V.; Lai, J.C.; Mercer, R.L. Class-based n-gram models of natural language. Comput. Linguist. 1992, 18, 467–480. [Google Scholar]
- Elman, J.L. Finding structure in time. Cogn. Sci. 1990, 14, 179–211. [Google Scholar] [CrossRef]
- Bengio, Y.; Simard, P.; Frasconi, P. Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 1994, 5, 157–166. [Google Scholar] [CrossRef]
- Pascanu, R.; Mikolov, T.; Bengio, Y. On the difficulty of training recurrent neural networks. In Proceedings of the International Conference on Machine Learning, Atlanta, GA, USA, 16–21 June 2013; pp. 1310–1318. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; Volume 30. [Google Scholar]
- Radford, A.; Narasimhan, K.; Salimans, T.; Sutskever, I. Improving Language Understanding by Generative Pre-Training; OpenAI: San Francisco, CA, USA, 2018; Available online: https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf (accessed on 1 October 2025).
- Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language models are unsupervised multitask learners. OpenAI Blog 2019, 1, 9. [Google Scholar]
- Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. Adv. Neural Inf. Process. Syst. 2020, 33, 1877–1901. [Google Scholar]
- Kaplan, J.; McCandlish, S.; Henighan, T.; Brown, T.B.; Chess, B.; Child, R.; Gray, S.; Radford, A.; Wu, J.; Amodei, D. Scaling laws for neural language models. arXiv 2020, arXiv:2001.08361. [Google Scholar] [CrossRef]
- Wei, J.; Bosma, M.; Zhao, V.; Guu, K.; Yu, A.W.; Lester, B.; Du, N.; Dai, A.M.; Le, Q.V. Finetuned Language Models are Zero-Shot Learners. In Proceedings of the International Conference on Learning Representations, Online, 25–29 April 2022. [Google Scholar]
- Ouyang, L.; Wu, J.; Jiang, X.; Almeida, D.; Wainwright, C.; Mishkin, P.; Zhang, C.; Agarwal, S.; Slama, K.; Ray, A.; et al. Training language models to follow instructions with human feedback. Adv. Neural Inf. Process. Syst. 2022, 35, 27730–27744. [Google Scholar]
- Ye, X.; Yavuz, S.; Hashimoto, K.; Zhou, Y.; Xiong, C. RNG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Dublin, Ireland, 22–27 May 2022; pp. 6032–6043. [Google Scholar]
- Shu, Y.; Yu, Z.; Li, Y.; Karlsson, B.; Ma, T.; Qu, Y.; Lin, C.Y. TIARA: Multi-grained Retrieval for Robust Question Answering over Large Knowledge Base. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, United Arab Emirates, 7–11 December 2022; pp. 8108–8121. [Google Scholar]
- Wu, L.; Petroni, F.; Josifoski, M.; Riedel, S.; Zettlemoyer, L. Scalable Zero-shot Entity Linking with Dense Entity Retrieval. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, 16–20 November 2020; pp. 6397–6407. [Google Scholar]
- Harris, S.; Seaborne, A.; Prud’hommeaux, E. SPARQL 1.1 Query Language. W3C Recommendation. 2013. Available online: https://www.w3.org/TR/sparql11-query/ (accessed on 1 October 2025).
- Perry, M.; Herring, J.; Musen, P. GeoSPARQL 1.1: A Geographic Query Language for RDF Data. OGC Implementation Standard. Open Geospatial Consortium. 2022. Available online: https://www.ogc.org/standards/geosparql (accessed on 1 October 2025).






| EM | |
|---|---|
| Fine-tuning based methods (Fine-tuned on all training sets–3574, results taken from [17]) | |
| T5-base | 71.65 |
| T5-Large | 79.02 |
| Code-T5+ (770M) | 94.20 |
| Prompting-based methods (Used 20 examples) | |
| Multi-agent System (GPT-4o-mini) | 66.74 |
| Multi-agent System (GPT-4o) | 85.49 |
| EM | |
|---|---|
| Single-agent system (GPT-4o-mini) | 47.10 |
| Single-agent system (GPT-4o) | 55.36 |
| Multi-agent system (GPT-4o-mini) | 66.74 |
| Multi-agent system (GPT-4o) | 85.49 |
| EM | |
|---|---|
| MAS (GPT-4o) | 85.49 |
| w/o Operator | 85.04 |
| w/o Retriever | 59.15 |
| w/o Retriever and Operator | 67.63 |
| Single Agent System (GPT-4o) | 55.36 |
| Item | Description |
|---|---|
| Input | Which Church Is the Farthest from Perling? [{“Id”: “Q13548361”, “Label”: “Perling”, “Mention”: “Perling”}] |
| Ground-Truth | SELECT DISTINCT ?class WHERE { ?region1 osmkey:wikidata “Q13548361”. ?region1 geo:hasGeometry ?rwkt1. ?class osmkey:building “church”. ?class geo:hasGeometry ?cwkt1. BIND(geof:distance(?cwkt1, ?rwkt1, uom:metre) AS ?distance) } ORDER BY DESC(?distance) LIMIT 1 |
| Single-Agent System Output | SELECT DISTINCT ?class WHERE { ?region1 osmkey:wikidata “Q13548361”. ?region1 geo:hasGeometry ?rwkt1. ?class osmkey:amenity “place_of_worship”. ?class geo:hasGeometry ?cwkt1. BIND(geof:distance(?cwkt1, ?rwkt1, uom:metre) AS ?distance) } ORDER BY DESC(?distance) LIMIT 1 |
| Multi-Agent System Output | SELECT DISTINCT ?class WHERE { ?region1 osmkey:wikidata “Q13548361”. ?region1 geo:hasGeometry ?rwkt1. ?class osmkey:building “church”. ?class geo:hasGeometry ?cwkt1. BIND(geof:distance(?cwkt1, ?rwkt1, uom:metre) AS ?distance) } ORDER BY DESC(?distance) LIMIT 1 |
| Intent Output | { “wh”: “which”, “concept_mention”: [“church”], “ref_entity_mention”: “Perling”, “relation_phrase”: “farthest from”, “question_form”: “selection” } |
| Concept Output | { “concepts”: [ { “mention”: “church”, “chosen”: { “key”: “osmkey:building”, “val”: “church” }, “alternatives”: [] } ] } |
| Geospatial-Relation Output | { “geospatial_relations”: [ { “operator”: “distance”, “arg_mentions”: [“church”, “Perling”], “constraint”: { “cmp”: null, “value”: null, “uom”: “uom:metre” } } ] } |
| Property Output | { “properties”: [] } |
| Operator Output | { “result_format”: { “form”: “SELECT”, “project”: [“?class”], “distinct”: true }, “pattern”: { “basic”: [ { “op”: “E”, “key”: “osmkey:wikidata”, “val”: “Q13548361”, “geom_as”: “?rwkt1” }, { “op”: “C”, “key”: “osmkey:building”, “val”: “church”, “geom_as”: “?cwkt1” } ], “advanced”: [ { “op”: “R”, “relation”: “geof:distance”, “args”: [“?cwkt1”, “?rwkt1”], “uom”: “uom:metre” }, { “op”: “BIND”, “expression”: “geof:distance(?cwkt1, ?rwkt1, uom:metre)”, “as”: “?distance” } ] }, “solution_modifiers”: { “order_by”: [ { “expr”: “?distance”, “dir”: “DESC” } ], “limit”: 1, “offset”: null, “reduced”: false } } |
| Item | Description |
|---|---|
| Input | Can You Tell Me Which River Shares Borders with Teluk Danga? [{“Id”: “Q5215956”, “Label”: “Teluk Danga”, “Mention”: “Teluk Danga”}] |
| Ground-Truth | SELECT DISTINCT ?class WHERE { ?region1 osmkey:wikidata “Q5215956”. ?region1 geo:hasGeometry ?rwkt1. ?class osmkey:waterway “river”. ?class geo:hasGeometry ?cwkt1. FILTER(geof:sfTouches(?cwkt1, ?rwkt1)) } |
| Single-Agent System Output | SELECT DISTINCT ?class WHERE { ?region1 osmkey:wikidata “Q5215956”. ?region1 geo:hasGeometry ?rwkt1. ?class osmkey:waterway “river”. ?class geo:hasGeometry ?cwkt1. FILTER(geof:sfIntersects(?cwkt1, ?rwkt1)) } |
| Multi-Agent System Output | SELECT DISTINCT ?class WHERE { ?region1 osmkey:wikidata “Q5215956”. ?region1 geo:hasGeometry ?rwkt1. ?class osmkey:waterway “river”. ?class geo:hasGeometry ?cwkt1. FILTER(geof:sfTouches(?cwkt1, ?rwkt1)) } |
| Intent Output | { “wh”: “which”, “concept_mention”: [“river”], “ref_entity_mention”: “Teluk Danga”, “relation_phrase”: “shares borders with”, “question_form”: “selection” } |
| Concept Output | { “concepts”: [ { “mention”: “river”, “chosen”: { “key”: “osmkey:waterway”, “val”: “river” }, “alternatives”: [] } ] } |
| Geospatial-Relation Output | { “geospatial_relations”: [ { “operator”: “sfTouches”, “arg_mentions”: [“river”, “Teluk Danga”], “constraint”: { “cmp”: null, “value”: null, “uom”: null } } ] } |
| Property Output | { “properties”: [] } |
| Operator Output | { “result_format”: { “form”: “SELECT”, “project”: [“?class”], “distinct”: true }, “pattern”: { “basic”: [ { “op”: “E”, “key”: “osmkey:wikidata”, “val”: “Q5215956”, “geom_as”: “?rwkt1” }, { “op”: “C”, “key”: “osmkey:waterway”, “val”: “river”, “geom_as”: “?cwkt1” } ], “advanced”: [ { “op”: “R”, “relation”: “geof:sfTouches”, “args”: [“?cwkt1”, “?rwkt1”] }, { “op”: “FILTER”, “condition”: “geof:sfTouches(?cwkt1, ?rwkt1)” } ] }, “solution_modifiers”: { “order_by”: [], “limit”: null, “offset”: null, “reduced”: false } } |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Published by MDPI on behalf of the International Society for Photogrammetry and Remote Sensing. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Yang, J.; Kim, J. Geospatial Knowledge-Base Question Answering Using Multi-Agent Systems. ISPRS Int. J. Geo-Inf. 2026, 15, 35. https://doi.org/10.3390/ijgi15010035
Yang J, Kim J. Geospatial Knowledge-Base Question Answering Using Multi-Agent Systems. ISPRS International Journal of Geo-Information. 2026; 15(1):35. https://doi.org/10.3390/ijgi15010035
Chicago/Turabian StyleYang, Jonghyeon, and Jiyoung Kim. 2026. "Geospatial Knowledge-Base Question Answering Using Multi-Agent Systems" ISPRS International Journal of Geo-Information 15, no. 1: 35. https://doi.org/10.3390/ijgi15010035
APA StyleYang, J., & Kim, J. (2026). Geospatial Knowledge-Base Question Answering Using Multi-Agent Systems. ISPRS International Journal of Geo-Information, 15(1), 35. https://doi.org/10.3390/ijgi15010035

