基于大语言模型的地理信息查询系统
Geographic Information Query System Based on Large Language Models
摘要: 针对传统地理信息系统(GIS)工具操作复杂、学习成本高的问题,本文提出一种融合规则引擎与大语言模型(LLM)的智能查询系统。通过动态路由算法实现查询任务的分流处理,结合领域知识增强的Prompt工程与PostGIS空间函数深度集成,解决了自然语言到空间SQL的语义转换难题。实验表明,系统使用江苏省生态产品价值实现工程研究中心平台数据,在空间连接查询中的准确率达72%,较通用模型提升25%以上,支持本地化部署保障地理敏感数据安全。
Abstract: To address the issues of complex operation and high learning costs associated with traditional Geographic Information System (GIS) tools, this paper proposes an intelligent query system that integrates a rule engine with a Large Language Model (LLM). The system achieves the shunting processing of query tasks through a dynamic routing algorithm, and combines domain knowledge-enhanced Prompt engineering with in-depth integration of PostGIS spatial functions, thereby solving the problem of semantic conversion from natural language to spatial SQL. The system utilizes platform data from the Jiangsu Engineering Research Center for Ecological Product Value Realization. Experiments show that the system achieves an accuracy rate of 72% in spatial join queries, which is more than 25% higher than that of general models, and supports localized deployment to ensure the security of geographically sensitive data.
文章引用:崔悦慧, 高悦. 基于大语言模型的地理信息查询系统[J]. 计算机科学与应用, 2025, 15(8): 198-206. https://doi.org/10.12677/csa.2025.158210

参考文献

[1] Wang, B., Shin, R., Liu, X., Polozov, O. and Richardson, M. (2020) RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-To-SQL Parsers. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, July 2020, 7567-7578. [Google Scholar] [CrossRef
[2] Guo, J., Zhan, Z., Gao, Y., Xiao, Y., Lou, J., Liu, T., et al. (2019) Towards Complex Text-To-SQL in Cross-Domain Database with Intermediate Representation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, July 2019, 4524-4535. [Google Scholar] [CrossRef
[3] Li, F. and Jagadish, H.V. (2016) NaLIR: An Interactive Natural Language Interface for Querying Relational Databases. Proceedings of the 2014 ACM SIGMOD International Conference on Management of Data, Snowbird, 22-27 June 2014, 709-721.
[4] Zhong, V., Xiong, C.M. and Socher, R. (2017) Seq2SQL: Generating Structured Queries from Natural Language Using Reinforcement Learning. arXiv: 1709.00103.
[5] Achiam, J., et al. (2023) GPT-4 Technical Report. arXiv: 2303.08774.
[6] Strobl, C. (2016) PostGIS. In: Shekhar, S., Xiong, H. and Zhou, X., Eds., Encyclopedia of GIS, Springer, 1-8. [Google Scholar] [CrossRef
[7] Zhang, C., Zhang, L.F. and Du, B. (2021) Deep Learning for Remote Sensing Data: A Technical Tutorial on the State of the Art. IEEE Geoscience and Remote Sensing Magazine, 4, 22-40.
[8] Liu, Y., et al. (2022) Graph Neural Networks for Spatial Networks: A Survey. ACM Computing Surveys, 55, 1-36.
[9] Piplani, T. and Bamman, D. (2018) DeepSeek: Content Based Image Search & Retrieval. arXiv: 1801.03406.