arXiv:2412.05587cs.SEcs.AI2024-12被引 18

构建地理空间代码知识库,让大模型生成地球引擎代码更准确。

GEE-OPs: An Operator Knowledge Base for Geospatial Code Generation on the Google Earth Engine Platform Powered by Large Language Models

  • 从18.5万份真实代码中提取操作符语法与关系模式。
  • 知识库使大模型代码生成准确率提升20%-30%。
  • 适合地理信息、遥感等领域的研究者和开发者使用。

随着时空数据规模与复杂度持续增长,谷歌地球引擎(GEE)平台上的地理空间建模面临双重挑战:提升领域专家的编码效率,增强跨学科用户的编程能力。为应对这些挑战并提升大语言模型(LLM)在地理空间代码生成任务中的表现,我们提出一个针对GEE JavaScript API的地理空间操作符知识库构建框架。该框架包含操作符语法知识表、操作符关系频率表、操作符频繁模式表和操作符关系链表,通过抽象语法树(AST)技术和频繁项集挖掘,系统性地从185,236个真实GEE脚本及语法文档中提取操作符知识,形成结构化知识库。实验表明,该框架在操作符知识提取上达到超过90%的准确率、召回率和F1分数。当与基于检索增强生成(RAG)的LLM代码生成任务结合时,性能提升20%-30%。消融实验证明了各知识表在知识库构建中的必要性。本工作为地理空间代码建模技术的发展提供了有力支持,提出了一种创新的领域专用知识库构建方法,推动生成式AI在地理信息科学中的深度融合。

原文摘要 · Abstract (English)

As the scale and complexity of spatiotemporal data continue to grow rapidly, the use of geospatial modeling on the Google Earth Engine (GEE) platform presents dual challenges: improving the coding efficiency of domain experts and enhancing the coding capabilities of interdisciplinary users. To address these challenges and improve the performance of large language models (LLMs) in geospatial code generation tasks, we propose a framework for building a geospatial operator knowledge base tailored to the GEE JavaScript API. This framework consists of an operator syntax knowledge table, an operator relationship frequency table, an operator frequent pattern knowledge table, and an operator relationship chain knowledge table. By leveraging Abstract Syntax Tree (AST) techniques and frequent itemset mining, we systematically extract operator knowledge from 185,236 real GEE scripts and syntax documentation, forming a structured knowledge base. Experimental results demonstrate that the framework achieves over 90% accuracy, recall, and F1 score in operator knowledge extraction. When integrated with the Retrieval-Augmented Generation (RAG) strategy for LLM-based geospatial code generation tasks, the knowledge base improves performance by 20-30%. Ablation studies further quantify the necessity of each knowledge table in the knowledge base construction. This work provides robust support for the advancement and application of geospatial code modeling techniques, offering an innovative approach to constructing domain-specific knowledge bases that enhance the code generation capabilities of LLMs, and fostering the deeper integration of generative AI technologies within the field of geoinformatics.

地理信息代码生成大模型知识库

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。