Relation extraction (RE) consistently involves a certain degree of labeled or unlabeled data even if under zero-shot setting. Recent studies have shown that large language models (LLMs) transfer well to new tasks out-of-the-box simply given a natural language prompt, which provides the possibility of extracting relations from text without any data and parameter tuning. This work focuses on the study of exploring LLMs, such as ChatGPT, as zero-shot relation extractors. On the one hand, we analyze the drawbacks of existing RE prompts and attempt to incorporate recent prompt techniques such as chain-of-thought (CoT) to improve zero-shot RE. We propose the summarize-and-ask (\textsc{SumAsk}) prompting, a simple prompt recursively using LLMs to transform RE inputs to the effective question answering (QA) format. On the other hand, we conduct comprehensive experiments on various benchmarks and settings to investigate the capabilities of LLMs on zero-shot RE. Specifically, we have the following findings: (i) \textsc{SumAsk} consistently and significantly improves LLMs performance on different model sizes, benchmarks and settings; (ii) Zero-shot prompting with ChatGPT achieves competitive or superior results compared with zero-shot and fully supervised methods; (iii) LLMs deliver promising performance in extracting overlapping relations; (iv) The performance varies greatly regarding different relations. Different from small language models, LLMs are effective in handling challenge none-of-the-above (NoTA) relation.
翻译:关系抽取(Relation Extraction, RE)即使在零样本设置下也通常涉及一定程度的标注或未标注数据。近期研究表明,大语言模型(Large Language Models, LLMs)仅需给定自然语言提示即可直接迁移至新任务,这为无需任何数据和参数调优从文本中抽取关系提供了可能性。本文聚焦于探索LLMs(如ChatGPT)作为零样本关系抽取器的能力。一方面,我们分析了现有RE提示的缺陷,并尝试引入思维链(Chain-of-Thought, CoT)等最新提示技术改进零样本RE。我们提出"总结与询问"(\textsc{SumAsk})提示法——一种通过递归使用LLMs将RE输入转化为有效问答(Question Answering, QA)格式的简单提示策略。另一方面,我们在多个基准和设置下开展全面实验,探究LLMs在零样本RE中的能力。具体发现如下:(i)\textsc{SumAsk}在不同模型规模、基准和设置下均持续显著提升LLMs性能;(ii)ChatGPT的零样本提示在零样本与全监督方法中达到具有竞争力或更优的结果;(iii)LLMs在重叠关系抽取上表现出色;(iv)不同关系对应的性能差异显著。与小语言模型不同,LLMs在处理复杂的"无以上关系"(None-of-the-Above, NoTA)关系时表现有效。