How to Unleash the Power of Large Language Models for Few-shot Relation Extraction?

Xin Xu, Yuqi Zhu, Xiaohan Wang, Ningyu Zhang
5/2/2023
87 citations
cs.CLcs.AIcs.DB

Official code: zjunlp/DeepKE (4,488 stars, Python, MIT, PyTorch, last commit 2025-07-19).

Abstract

Scaling language models have revolutionized widespread NLP tasks, yet little comprehensively explored few-shot relation extraction with large language models. In this paper, we investigate principal methodologies, in-context learning and data generation, for few-shot relation extraction via GPT-3.5 through exhaustive experiments.

Show full abstract

To enhance few-shot performance, we further propose task-related instructions and schema-constrained data generation. We observe that in-context learning can achieve performance on par with previous prompt learning approaches, and data generation with the large language model can boost previous solutions to obtain new state-of-the-art few-shot results on four widely-studied relation extraction datasets. We hope our work can inspire future research for the capabilities of large language models in few-shot relation extraction. Code is available in https://github.com/zjunlp/DeepKE/tree/main/example/llm.

View on arXivView PDF

Code Implementations(1)

zjunlp/DeepKEOfficial100%
PyTorchMIT

[EMNLP 2022] An Open Toolkit for Knowledge Graph Extraction and Construction

4,488748Python, ShellAug 1, 20181 years agoMIT
attribute-extractionchinesedeep-learningdeepkedocument-level+15 more

Similar Papers

Cite this paper

@article{xu2023unleash,
  title  = {How to Unleash the Power of Large Language Models for Few-shot Relation Extraction?},
  author = {Xin Xu and Yuqi Zhu and Xiaohan Wang and Ningyu Zhang},
  year   = {2023},
  eprint = {2305.01555},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.01555v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.01555.svg)](https://codeofpaper.com/paper/2305.01555)

Discussion