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

Text2Cypher:搭建自然语言与图数据库之间的桥梁

Text2Cypher: Bridging Natural Language and Graph Databases

Neo4j

Makbule Gulcin Ozsoy, Leila Messallem, Jon Besga, Gianandrea Minneci

AI总结:

针对非专业用户难以使用Cypher查询图数据库的问题,研究提出Text2Cypher方法,通过整合清洗多份公开数据集构建含44387个实例的数据集微调LLM,显著提升了自然语言转Cypher的性能。

摘要:

知识图谱使用节点、关系和属性来表示任意复杂的数据。当存储在图数据库中时,Cypher查询语言可实现对知识图谱的高效建模与查询。然而,使用Cypher需要专业知识,这对非专业用户而言是一项挑战。我们的Text2Cypher工作旨在通过将自然语言查询转换为Cypher查询语言来弥合这一差距,将知识图谱的效用拓展至非技术专业用户。\n 尽管大语言模型(LLM)可用于此任务,但它们往往难以捕捉复杂的细微差别,导致输出不完整或不正确。在领域特定数据集上微调LLM已被证明是一种更具前景的方法,但高质量、公开可用的Text2Cypher数据集的有限可用性使这一工作颇具挑战。在本研究中,我们展示了如何将多个公开可用的数据集进行合并、清洗和整理,最终得到共44387个实例,从而实现有效的微调和评估。在该数据集上微调的模型表现出显著的性能提升,其Google-BLEU分数和精确匹配(Exact Match)分数均优于基线模型,凸显了高质量数据集和微调对提升Text2Cypher性能的重要性。

英文摘要:

Knowledge graphs use nodes, relationships, and properties to represent arbitrarily complex data. When stored in a graph database, the Cypher query language enables efficient modeling and querying of knowledge graphs. However, using Cypher requires specialized knowledge, which can present a challenge for non-expert users. Our work Text2Cypher aims to bridge this gap by translating natural language queries into Cypher query language and extending the utility of knowledge graphs to non-technical expert users. While large language models (LLMs) can be used for this purpose, they often struggle to capture complex nuances, resulting in incomplete or incorrect outputs. Fine-tuning LLMs on domain-specific datasets has proven to be a more promising approach, but the limited availability of high-quality, publicly available Text2Cypher datasets makes this challenging. In this work, we show how we combined, cleaned and organized several publicly available datasets into a total of 44,387 instances, enabling effective fine-tuning and evaluation. Models fine-tuned on this dataset showed significant performance gains, with improvements in Google-BLEU and Exact Match scores over baseline models, highlighting the importance of high-quality datasets and fine-tuning in improving Text2Cypher performance.

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

↑