We present Text-to-OverpassQL, a task designed to facilitate a natural language interface for querying geodata from OpenStreetMap (OSM). The Overpass Query Language (OverpassQL) allows users to formulate complex database queries and is widely adopted in the OSM ecosystem. Generating Overpass queries from natural language input serves multiple use-cases. It enables novice users to utilize OverpassQL without prior knowledge, assists experienced users with crafting advanced queries, and enables tool-augmented large language models to access information stored in the OSM database. In order to assess the performance of current sequence generation models on this task, we propose OverpassNL, a dataset of 8,352 queries with corresponding natural language inputs. We further introduce task specific evaluation metrics and ground the evaluation of the Text-to-OverpassQL task by executing the queries against the OSM database. We establish strong baselines by finetuning sequence-to-sequence models and adapting large language models with in-context examples. The detailed evaluation reveals strengths and weaknesses of the considered learning strategies, laying the foundations for further research into the Text-to-OverpassQL task.
翻译:我们提出Text-to-OverpassQL任务,旨在为查询OpenStreetMap (OSM)地理数据提供自然语言接口。Overpass查询语言 (OverpassQL)允许用户编写复杂的数据库查询,并在OSM生态系统中被广泛采用。从自然语言输入生成Overpass查询可服务于多种应用场景:使新手用户无需先验知识即可使用OverpassQL,协助有经验用户构建高级查询,以及使工具增强型大语言模型能够访问OSM数据库中存储的信息。为评估当前序列生成模型在该任务上的表现,我们提出了OverpassNL数据集,包含8,352条查询及其对应的自然语言输入。我们进一步引入了任务专属评估指标,并通过在OSM数据库上执行查询来夯实Text-to-OverpassQL任务的评估基准。通过微调序列到序列模型并利用上下文示例适配大语言模型,我们建立了强有力的基线模型。详细的评估揭示了所考虑的学习策略的优势与不足,为Text-to-OverpassQL任务的后续研究奠定了基础。