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

利用来自知识图谱的高质量指令数据增强LLM工具使用

Enhancing LLM Tool Use with High-quality Instruction Data from Knowledge Graph

Ant Group, China(蚂蚁集团);School of Computer Science and Technology, Xi’an Jiaotong University, China(西安交通大学计算机科学与技术学院);School of Distance Education, Xi’an Jiaotong University, China(西安交通大学继续教育学院)

Jingwei Wang, Zai Zhang, Hao Qian, Chunjing Gan, Binbin Hu, Ziqi Liu, Zhiqiang Zhang, Jun Zhou, Bin Shi, Bo Dong

AI总结:

本文提出利用知识图谱提取查询路径并转化为用户查询,将实体关系转化为可操作工具,生成高质量指令数据,显著提升了LLMs的工具使用和整体能力。

摘要:

教会大型语言模型(LLMs)使用工具对于提升其问题解决能力和扩展应用至关重要。然而,有效地使用工具具有挑战性,因为这需要对工具功能和用户意图有深刻理解。先前的方法主要依赖LLMs生成指令数据,但这些数据的质量往往不足。在本文中,我们提出一种新方法,利用知识图谱为LLMs生成高质量指令数据。知识图谱是人工构建的、富含语义信息的数据集。我们首先从给定知识图谱中提取各种查询路径,并将其转化为广泛的用户查询。然后,我们将实体间的关系转化为可操作的工具,并将每个查询的路径解析为详细的解决步骤,从而创建高质量指令数据。我们的实验表明,仅在这少量合成数据上进行微调,就能显著提升LLMs的工具使用和整体能力。

英文摘要:

Teaching large language models (LLMs) to use tools is crucial for improving their problem-solving abilities and expanding their applications. However, effectively using tools is challenging because it requires a deep understanding of tool functionalities and user intentions. Previous methods relied mainly on LLMs to generate instruction data, but the quality of these data was often insufficient. In this paper, we propose a new method that uses knowledge graphs to generate high-quality instruction data for LLMs. Knowledge graphs are manually curated datasets rich in semantic information. We begin by extracting various query pathways from a given knowledge graph, which are transformed into a broad spectrum of user queries. We then translate the relationships between entities into actionable tools and parse the pathways of each query into detailed solution steps, thereby creating high-quality instruction data. Our experiments show that fine-tuning on just a small sample of this synthetic data can significantly improve the tool utilization and overall capabilities of LLMs.

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

↑