arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.11745cs.AI
收藏

Text2GQL-Bench: 一个文本到图查询语言基准 [实验、分析与基准]

Text2GraphQuery-Bench: A Text to Graph Query Benchmark

Ant Group(蚂蚁集团);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));The Hong Kong University of Science and Technology (Guangzhou)(香港科学与技术大学(广州));Xi'an Polytechnic University(西安理工大学)
Songlin Lyu, Lujie Ban, Zihang Wu, Tianqi Luo, Jirong Liu, Ayoub Moussaid, Oskar van Rest, Heng Lin, Chenhao Ma, Nan Tang, Shipeng Qi, Yongchao Liu, Zhan Qiu, J… 展开作者

Songlin Lyu, Lujie Ban, Zihang Wu, Tianqi Luo, Jirong Liu, Ayoub Moussaid, Oskar van Rest, Heng Lin, Chenhao Ma, Nan Tang, Shipeng Qi, Yongchao Liu, Zhan Qiu, Juelu Zhang, Jiajun Zheng

AI总结:

Text2GQL-Bench是一个统一的文本到图查询语言基准,通过多领域数据集和评估方法,揭示了ISO-GQL生成中的方言差距,并展示了通过充足示例提升模型性能的潜力。

摘要:

图模型是复杂关系丰富的领域中数据分析的基础。文本到图查询语言(Text-to-GQL)系统充当翻译器,将自然语言转换为可执行的图查询。这种能力使大语言模型(LLMs)能够直接分析和操作图数据,使其成为图数据库管理系统(GDBMS)的强大代理基础设施。尽管近年来取得了进展,但现有数据集往往在领域覆盖、支持的图查询语言或评估范围上有限。Text-to-GQL系统的进步受到高质量基准数据集和评估方法缺乏的阻碍,这些方法无法系统地比较不同图查询语言和领域的模型能力。在本文中,我们提出了Text2GQL-Bench,一个统一的Text-to-GQL基准,旨在解决这些限制。Text2GQL-Bench结合了一个多GQL数据集,该数据集包含178,184个(问题,查询)对,覆盖13个领域,并结合一个可扩展的构建框架,可以生成不同领域的数据集、问题抽象层次和GQLs,具有异质资源。为了支持全面评估,我们引入了一种评估方法,超越单一端到端指标,通过联合报告语法有效性、相似性、语义对齐和执行准确性。我们的评估揭示了ISO-GQL生成中存在明显的方言差距:即使强大的LLMs在零样本设置下也仅能达到最多4%的执行准确性(EX),尽管固定3个样本提示可将准确性提高到约50%,但语法有效性仍低于70%。此外,一个微调的8B开放权重模型达到了45.1%的EX和90.8%的语法有效性,表明大部分性能提升是通过接触足够的ISO-GQL示例实现的。

英文摘要:

Graph models are fundamental to data analysis in domains rich with complex relationships. Unlike SQL, which benefits from a rel- atively unified standard and widespread familiarity, graph query languages are diverse (e.g., Cypher, GQL, SQL/PGQ) and far less fa- miliar to most users, making them significantly harder to learn and use. Text-to-Graph-Query systems address this barrier by trans- lating natural language into executable graph queries, enabling LLMs to serve as interfaces for Graph Database Management Systems (GDBMS). Existing benchmarks are limited in language coverage, rely on rigid synthesis, and lack comprehensive evaluation. We present Text2GraphQuery-Bench, the first benchmark covering all mainstream declarative property graph query languages (Cypher, GQL, and SQL/PGQ). It contains 267,276 (Question, Graph Query) pairs across 34 databases and 13 domains. Its construction supports adaptation from heterogeneous resources and domain-aware synthesis, while its Graph-IR-based design enables rapid extension to new languages. The evaluation protocol reports Grammar, GLEU, Similarity, and EX under graph-native difficulty, question abstraction, and schema aliasing. Experiments on 8 LLMs reveal: (i) a significant language gap exists - zero-shot GQL and SQL/PGQ Grammar is far below Cypher, yet few-shot prompting largely recovers it; (ii) fine-tuning an 8B model reaches or exceeds zero-shot large models, indicating unfamiliarity - rather than model capacity - is the primary barrier; (iii) as supervision increases, syntax errors recede, shifting bottlenecks to aggregation logic in GQL and schema linking in SQL/PGQ; (iv) higher question abstraction degrades EX due to intent-to-schema grounding issues, while schema aliasing has minimal impact; (v) EX consistently degrades from Easy to Extra Hard, with Extra Hard remaining a persistent bottleneck. *(Due to arXiv constraints, this abstract is shortened. See PDF for the full version.)*

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑