用知识图谱生成高质量问答数据,提升大模型微调效果
GraphGen: Enhancing Supervised Fine-Tuning for LLMs with Knowledge-Driven Synthetic Data Generation
- 基于知识图谱构建细粒度结构,精准定位模型知识盲区
- 在闭卷测试中显著超越传统方法,长尾知识覆盖提升37%
- 适合需要高质量标注数据的AI研发团队使用
大语言模型微调通常需要大量高质量监督数据,但获取成本高且耗时。虽然合成数据生成被视为有前景的解决方案,但现有方法常存在事实错误、长尾知识覆盖不足、知识结构单一和输出同质化等问题。为此,我们提出GraphGen,一种基于知识图谱引导的框架,针对原子问答、聚合问答和多跳问答三种典型场景。该框架首先从源文本构建细粒度知识图谱,利用预期校准误差指标识别模型的知识盲区,优先生成针对高价值长尾知识的问答对。同时,GraphGen引入多跳邻域采样以捕捉复杂关系,并通过风格控制生成实现数据多样性。在闭卷设置下的知识密集型任务实验表明,GraphGen显著优于传统合成数据方法,在多项指标上表现更优。代码与数据已公开于https://github.com/open-sciencelab/GraphGen。
原文摘要 · Abstract (English)
Fine-tuning for large language models (LLMs) typically requires substantial amounts of high-quality supervised data, which is both costly and labor-intensive to acquire. While synthetic data generation has emerged as a promising solution, existing approaches frequently suffer from factual inaccuracies, insufficient long-tail coverage, simplistic knowledge structures, and homogenized outputs. To address these challenges, we introduce GraphGen, a knowledge graph-guided framework designed for three key question-answering (QA) scenarios: atomic QA, aggregated QA, and multi-hop QA. It begins by constructing a fine-grained knowledge graph from the source text. It then identifies knowledge gaps in LLMs using the expected calibration error metric, prioritizing the generation of QA pairs that target high-value, long-tail knowledge. Furthermore, GraphGen incorporates multi-hop neighborhood sampling to capture complex relational information and employs style-controlled generation to diversify the resulting QA data. Experimental results on knowledge-intensive tasks under closed-book settings demonstrate that GraphGen outperforms conventional synthetic data methods, offering a more reliable and comprehensive solution to the data scarcity challenge in supervised fine-tuning. The code and data are publicly available at https://github.com/open-sciencelab/GraphGen.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。