GeoColab: an LLM-based multi-agent collaborative framework for geospatial code generation
Automated geospatial code generation using large language models (LLMs) faces challenges in requirement parsing, syntax adaptation, path retrieval, code validation, and spatial recognition, often leading to ‘code hallucinations.’ To address these, we introduce GeoColab, the first multi-agent framework for geospatial code generation. It defines three roles—product manager, algorithm engineer, and programmer—operating under standardized procedures. GeoColab integrates a knowledge support mechanism and retrieval-augmented generation (RAG), utilizing 8,729 function syntax documents, 2,732 datasets, 115 external APIs, 94 projection methods, and 3,837 CRS transformation entries, all stored and accessed via a document management system. We also present the GeoCodes benchmark, with 25 explicit, 15 incomplete, and 10 open-ended tasks. Applied to seven mainstream LLMs, including GPT-4.5 and DeepSeek-V3-0324, GeoColab improves code executability, accuracy, and readability by 7.59%–26.09%, surpassing baselines like CodeCoT and ChatDev by up to 31.03%. Ablation studies show a 4.39%–9.30% performance drop without knowledge modules, highlighting their importance. GeoColab is open-sourced and supports local deployment, reducing technical barriers to geospatial programming and broadening LLMs' use in GIS.
Authors
- Huayi Wu (ORCID: https://orcid.org/0000-0003-3971-0512)
- Jianyuan Liang (ORCID: https://orcid.org/0009-0004-7280-5788)
- Anqi Zhao (ORCID: https://orcid.org/0009-0006-9278-7323)
- Fengying Jin (ORCID: https://orcid.org/0000-0002-9740-927X)
- Xuefeng Guan (ORCID: https://orcid.org/0000-0003-0865-3850)
- Zhipeng Gui (ORCID: https://orcid.org/0000-0001-9467-9680)
- Zhangxiao Shen
- Shuyang Hou (ORCID: https://orcid.org/0009-0000-6984-9959)
- Yaxian Qing (ORCID: https://orcid.org/0009-0000-4461-3421)
- Haoyue Jiao (ORCID: https://orcid.org/0009-0000-5699-3919)
Institutions
- Wuhan University (CN)
- Institute of Soil and Water Conservation (CN)
- Center For Remote Sensing (United States) (US)
- State Key Laboratory of Information Engineering in Surveying Mapping and Remote Sensing (CN)
- Yellow River Institute of Hydraulic Research (CN)
Publication Details
- Journal
- International Journal of Digital Earth
- Published
- 2025-11-06
- DOI
- https://doi.org/10.1080/17538947.2025.2569405
- Citations
- 2
- Primary Topic
- Geographic Information Systems Studies
- Type
- article
- Field-Weighted Citation Impact
- 13.44