Generative AI for Geospatial Analysis: Fine-Tuning ChatGPT to Convert Natural Language into Python-Based Geospatial Computations

dc.contributor.authorSherman, Zacharyen
dc.contributor.authorSharma Dulal, Sandeshen
dc.contributor.authorCho, Jin-Heeen
dc.contributor.authorZhang, Mengxien
dc.contributor.authorKim, Junghwanen
dc.date.accessioned2025-08-27T16:45:51Zen
dc.date.available2025-08-27T16:45:51Zen
dc.date.issued2025-08-18en
dc.date.updated2025-08-27T13:59:29Zen
dc.description.abstractThis study investigates the potential of fine-tuned large language models (LLMs) to enhance geospatial intelligence by translating natural language queries into executable Python code. Traditional GIS workflows, while effective, often lack usability and scalability for non-technical users. LLMs offer a new approach by enabling conversational interaction with spatial data. We evaluate OpenAI’s GPT-4o-mini model in two forms: an “As-Is” baseline and a fine-tuned version trained on 600+ prompt–response pairs related to geospatial Python scripting in Virginia. Using U.S. Census shapefiles and hospital data, we tested both models across six types of spatial queries. The fine-tuned model achieved 89.7%, a 49.2 percentage point improvement over the baseline’s 40.5%. It also demonstrated substantial reductions in execution errors and token usage. Key innovations include the integration of spatial reasoning, modular external function calls, and fuzzy geographic input correction. These findings suggest that fine-tuned LLMs can improve the accuracy, efficiency, and usability of geospatial dashboards when they are powered by LLMs. Our results further imply a scalable and replicable approach for future domain-specific AI applications in geospatial science and smart cities studies.en
dc.description.versionPublished versionen
dc.format.mimetypeapplication/pdfen
dc.identifier.citationSherman, Z.; Sharma Dulal, S.; Cho, J.-H.; Zhang, M.; Kim, J. Generative AI for Geospatial Analysis: Fine-Tuning ChatGPT to Convert Natural Language into Python-Based Geospatial Computations. ISPRS Int. J. Geo-Inf. 2025, 14, 314.en
dc.identifier.doihttps://doi.org/10.3390/ijgi14080314en
dc.identifier.urihttps://hdl.handle.net/10919/137583en
dc.language.isoenen
dc.publisherMDPIen
dc.rightsCreative Commons Attribution 4.0 Internationalen
dc.rights.urihttp://creativecommons.org/licenses/by/4.0/en
dc.subjectgeospatial dataen
dc.subjectdashboarden
dc.subjectfine-tuneden
dc.subjectChatGPTen
dc.subjectLarge Language Modelen
dc.titleGenerative AI for Geospatial Analysis: Fine-Tuning ChatGPT to Convert Natural Language into Python-Based Geospatial Computationsen
dc.title.serialInternational Journal of Geo-Informationen
dc.typeArticle - Refereeden
dc.type.dcmitypeTexten

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
ijgi-14-00314.pdf
Size:
1.31 MB
Format:
Adobe Portable Document Format
Description:
Published version
License bundle
Now showing 1 - 1 of 1
Name:
license.txt
Size:
1.5 KB
Format:
Item-specific license agreed upon to submission
Description: