arXiv:2505.23108cs.CL2025-05ACL被引 4

用大模型生成关系抽取数据时,如何让样本更多样且准确?

Generating Diverse Training Samples for Relation Extraction with Large Language Models

  • 通过提示工程和直接偏好优化,提升生成样本的多样性
  • 在多个标准数据集上,生成数据质量显著提升
  • 用生成数据训练普通模型,效果优于直接用大模型做关系抽取

使用大语言模型(LLM)生成训练数据,有望改善零样本或少样本自然语言处理任务。然而,这一方向仍存在诸多问题。针对关系抽取(RE)任务,我们发现直接提示大模型生成的样本往往结构高度相似,表达实体间关系时用语单一。为此,本文研究如何在保持正确性的前提下,有效提升大模型生成训练样本的多样性。首先尝试通过上下文学习(ICL)提示直接引导模型生成差异化的样本;随后提出一种基于直接偏好优化(DPO)的微调方法,专用于生成多样化样本。在常用关系抽取数据集上的实验表明,两种方法均能有效提升生成数据质量。此外,我们还发现,使用生成数据训练非大模型的抽取模型,其性能优于直接用大模型进行关系抽取。

原文摘要 · Abstract (English)

Using Large Language Models (LLMs) to generate training data can potentially be a preferable way to improve zero or few-shot NLP tasks. However, many problems remain to be investigated for this direction. For the task of Relation Extraction (RE), we find that samples generated by directly prompting LLMs may easily have high structural similarities with each other. They tend to use a limited variety of phrasing while expressing the relation between a pair of entities. Therefore, in this paper, we study how to effectively improve the diversity of the training samples generated with LLMs for RE, while also maintaining their correctness. We first try to make the LLMs produce dissimilar samples by directly giving instructions in In-Context Learning (ICL) prompts. Then, we propose an approach to fine-tune LLMs for diversity training sample generation through Direct Preference Optimization (DPO). Our experiments on commonly used RE datasets show that both attempts can improve the quality of the generated training data. We also find that comparing with directly performing RE with an LLM, training a non-LLM RE model with its generated samples may lead to better performance.

关系抽取数据生成大模型多样性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。