Auto-Cypher: 通过 LLM 监督的生成-验证框架改进 LLM 的 Cypher 生成
计算与语言
2025-01-27 v2 人工智能
信息检索
机器学习
摘要
在建模和查询关系方面,Neo4j 等图数据库在处理复杂互联数据时正日益比传统关系数据库受到青睐。虽然将自然语言翻译为 SQL 查询已被广泛研究,但为 Neo4j 生成 Cypher 查询仍相对缺乏探索。在本工作中,我们提出了一种自动化的、LLM 监督的流水线,用于为 Text2Cypher 生成高质量合成数据。我们的 Cypher 数据生成流水线引入了 LLM-As-Database-Filler,这是一种确保 Cypher 查询正确性的新策略,从而产生高质量的生成结果。使用我们的流水线,我们生成了高质量的 Text2Cypher 数据——SynthCypher,其中包含跨不同领域和具有不同复杂度查询的 29.8k 个实例。在 SynthCypher 上训练 LLaMa-3.1-8B、Mistral-7B 和 QWEN-7B 等开源 LLM,在 Text2Cypher 测试集上带来了高达 40% 的性能提升,在适配图数据库的 SPIDER 基准上带来了 30% 的性能提升。
引用
@article{arxiv.2412.12612,
title = {Auto-Cypher: Improving LLMs on Cypher generation via LLM-supervised generation-verification framework},
author = {Aman Tiwari and Shiva Krishna Reddy Malay and Vikas Yadav and Masoud Hashemi and Sathwik Tejaswi Madhusudhan},
journal= {arXiv preprint arXiv:2412.12612},
year = {2025}
}
备注
Accepted at NAACL 2025 main conference