Generative AI for Geospatial Analysis: Fine-Tuning ChatGPT to Convert Natural Language into Python-Based Geospatial Computations
| dc.contributor.author | Sherman, Zachary | en |
| dc.contributor.author | Sharma Dulal, Sandesh | en |
| dc.contributor.author | Cho, Jin-Hee | en |
| dc.contributor.author | Zhang, Mengxi | en |
| dc.contributor.author | Kim, Junghwan | en |
| dc.date.accessioned | 2025-08-27T16:45:51Z | en |
| dc.date.available | 2025-08-27T16:45:51Z | en |
| dc.date.issued | 2025-08-18 | en |
| dc.date.updated | 2025-08-27T13:59:29Z | en |
| dc.description.abstract | This 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.version | Published version | en |
| dc.format.mimetype | application/pdf | en |
| dc.identifier.citation | Sherman, 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.doi | https://doi.org/10.3390/ijgi14080314 | en |
| dc.identifier.uri | https://hdl.handle.net/10919/137583 | en |
| dc.language.iso | en | en |
| dc.publisher | MDPI | en |
| dc.rights | Creative Commons Attribution 4.0 International | en |
| dc.rights.uri | http://creativecommons.org/licenses/by/4.0/ | en |
| dc.subject | geospatial data | en |
| dc.subject | dashboard | en |
| dc.subject | fine-tuned | en |
| dc.subject | ChatGPT | en |
| dc.subject | Large Language Model | en |
| dc.title | Generative AI for Geospatial Analysis: Fine-Tuning ChatGPT to Convert Natural Language into Python-Based Geospatial Computations | en |
| dc.title.serial | International Journal of Geo-Information | en |
| dc.type | Article - Refereed | en |
| dc.type.dcmitype | Text | en |