arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.10710cs.AIcs.CL
收藏

SyntheT2C:为Text2Cypher任务上的大型语言模型微调生成合成数据

SyntheT2C: Generating Synthetic Data for Fine-Tuning Large Language Models on the Text2Cypher Task

Shanghai AI Laboratory(上海人工智能实验室);Beihang University(北京航空航天大学)

Ziije Zhong, Linqing Zhong, Zhaoze Sun, Qingyun Jin, Zengchang Qin, Xiaofan Zhang

AI总结:

提出SyntheT2C方法,通过LLM提示和模板填充生成合成Query-Cypher对数据集MedT2C,用于医学知识图谱,经SFT微调提升LLMs在Text2Cypher任务上的性能。

摘要:

将大型语言模型(LLMs)与现有的知识图谱(KG)数据库集成,为增强LLMs的功效并缓解其“幻觉”问题提供了一条有前景的途径。鉴于大多数知识图谱驻留在仅能通过专用查询语言(如Cypher)访问的图数据库中,通过自动化将自然语言翻译为Cypher查询(称为“Text2Cypher”任务)来连接LLMs与KG数据库至关重要。先前的努力尝试通过监督微调(SFT)来增强LLMs在Cypher生成方面的熟练度。然而,这些探索受到缺乏Query-Cypher对注释数据集的阻碍,因为此类注释具有劳动密集型和领域特定的性质。在本研究中,我们提出SyntheT2C,一种构建合成Query-Cypher对数据集的方法,包含两个不同的流程:(1)基于LLM的提示和(2)模板填充。SyntheT2C应用于两个医学KG数据库,最终创建了合成数据集MedT2C。综合实验表明,MedT2C数据集通过SFT有效提升了骨干LLMs在Text2Cypher任务上的性能。SyntheT2C代码库和MedT2C数据集均在https://github.com/ZGChung/SyntheT2C发布。

英文摘要:

Integrating Large Language Models (LLMs) with existing Knowledge Graph (KG) databases presents a promising avenue for enhancing LLMs' efficacy and mitigating their "hallucinations". Given that most KGs reside in graph databases accessible solely through specialized query languages (e.g., Cypher), it is critical to connect LLMs with KG databases by automating the translation of natural language into Cypher queries (termed as "Text2Cypher" task). Prior efforts tried to bolster LLMs' proficiency in Cypher generation through Supervised Fine-Tuning (SFT). However, these explorations are hindered by the lack of annotated datasets of Query-Cypher pairs, resulting from the labor-intensive and domain-specific nature of such annotation. In this study, we propose SyntheT2C, a methodology for constructing a synthetic Query-Cypher pair dataset, comprising two distinct pipelines: (1) LLM-based prompting and (2) template-filling. SyntheT2C is applied to two medical KG databases, culminating in the creation of a synthetic dataset, MedT2C. Comprehensive experiments demonstrate that the MedT2C dataset effectively enhances the performance of backbone LLMs on Text2Cypher task via SFT. Both the SyntheT2C codebase and the MedT2C dataset are released in https://github.com/ZGChung/SyntheT2C.

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

↑