OsmT: 通过开源标签感知语言模型连接OpenStreetMap查询与自然语言
OsmT: Bridging OpenStreetMap Queries and Natural Language with Open-source Tag-aware Language Models
AI总结:
OsmT通过开源标签感知语言模型连接自然语言与OpenStreetMap查询,提升查询生成和解释的准确性与可访问性。
摘要:
将自然语言与结构化查询语言连接是数据库领域长期存在的挑战。尽管近年来语言模型的进步在这一方向上展现出潜力,但现有解决方案往往依赖大规模闭源模型,导致推理成本高、透明性差且难以适应轻量级部署。在本文中,我们提出了OsmT,一个专门设计用于连接自然语言和Overpass查询语言(OverpassQL)的开源标签感知语言模型,后者是访问大规模OpenStreetMap(OSM)数据的结构化查询语言。为了提高生成查询的准确性和结构有效性,我们引入了标签检索增强(TRA)机制,该机制将上下文相关的标签知识融入生成过程中。该机制旨在捕捉OSM数据库中的层次和关系依赖性,解决地理空间查询制定中固有的拓扑复杂性。此外,我们定义了一个反向任务,即OverpassQL到文本,将结构化查询转换为自然语言解释,以支持查询解释并提高用户可访问性。我们在公共基准上评估了OsmT,与强大的基线模型进行比较,并观察到查询生成和解释方面的一致改进。尽管使用显著较少的参数,我们的模型仍能实现竞争性的准确性,证明了开源预训练语言模型在连接自然语言和结构化查询语言方面在具有丰富模式的地理空间环境中的有效性。
英文摘要:
Bridging natural language and structured query languages is a long-standing challenge in the database community. While recent advances in language models have shown promise in this direction, existing solutions often rely on large-scale closed-source models that suffer from high inference costs, limited transparency, and lack of adaptability for lightweight deployment. In this paper, we present OsmT, an open-source tag-aware language model specifically designed to bridge natural language and Overpass Query Language (OverpassQL), a structured query language for accessing large-scale OpenStreetMap (OSM) data. To enhance the accuracy and structural validity of generated queries, we introduce a Tag Retrieval Augmentation (TRA) mechanism that incorporates contextually relevant tag knowledge into the generation process. This mechanism is designed to capture the hierarchical and relational dependencies present in the OSM database, addressing the topological complexity inherent in geospatial query formulation. In addition, we define a reverse task, OverpassQL-to-Text, which translates structured queries into natural language explanations to support query interpretation and improve user accessibility. We evaluate OsmT on a public benchmark against strong baselines and observe consistent improvements in both query generation and interpretation. Despite using significantly fewer parameters, our model achieves competitive accuracy, demonstrating the effectiveness of open-source pre-trained language models in bridging natural language and structured query languages within schema-rich geospatial environments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。