用知识图谱生成高质量指令数据,提升大模型工具使用能力
Enhancing LLM Tool Use with High-quality Instruction Data from Knowledge Graph
- 基于知识图谱构建用户查询路径与工具操作步骤的映射关系
- 仅用少量合成数据微调,大模型工具调用准确率显著提升
- 适合需要提升推理与工具协同能力的研究者或开发者
让大语言模型(LLMs)学会使用工具对提升其问题解决能力和应用范围至关重要。然而,有效使用工具需要深入理解工具功能和用户意图,以往方法主要依赖LLM生成指令数据,但质量常不足。本文提出一种新方法:利用人工构建的知识图谱生成高质量指令数据。知识图谱富含语义信息,我们从中提取多种查询路径,转化为多样化的用户查询;将实体间关系转化为可执行工具,解析每条查询的完整求解步骤,从而构建高质量指令数据。实验表明,仅用少量该合成数据微调,即可显著提升LLMs的工具使用效率与综合能力。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。