Unleashing the Power of Large Language Models in Zero-shot Relation Extraction via Self-Prompting (2024)

Abstract: Recent research in zero-shot Relation Extraction (RE) has focused on using Large Language Models (LLMs) due to their impressive zero-shot capabilities. However, current methods often perform suboptimally, mainly due to a lack of detailed, context-specific prompts needed for understanding various sentences and relations. To address this, we introduce the Self-Prompting framework, a novel method designed to fully harness the embedded RE knowledge within LLMs. Specifically, our framework employs a three-stage diversity approach to prompt LLMs, generating multiple synthetic samples that encapsulate specific relations from scratch. These generated samples act as in-context learning samples, offering explicit and context-specific guidance to efficiently prompt LLMs for RE. Experimental evaluations on benchmark datasets show our approach outperforms existing LLM-based zero-shot RE methods. Additionally, our experiments confirm the effectiveness of our generation pipeline in producing high-quality synthetic data that enhances performance.

## introduction recent advances in large language models (llms) have significantly progressed natural language processing (nlp). leveraging llms' potential in zero-shot learning, there is growing interest in applying their capabilities to zero-shot relation extraction (re) @xcite , which identifies relationships between entities in text without extensive data annotation. specifically, current methods convert the re task into a question answering (qa) task by reformulating sentences as questions and candidate relations as options @xcite . further ad-vancements integrate a self-consistency approach @xcite within qa to reduce uncertainty through majority voting @xcite . however, current methods frequently demonstrate suboptimal performance, mainly because of insufficient guidance for re. the intricate demands of re necessitate more detailed and contextspecific prompts to effectively comprehend the diverse and complex nature of sentences and relations @xcite . inspired by recent studies on self-prompting @xcite -that is, employing the outputs generated by llms themselves as prompts-our research introduces a novel prompting paradigm for re. this paradigm leverages llms' inherent capabilities to create synthetic re data tailored to specific relations. when using llms for re from specific sentences, these synthetic samples, enriched with essential relational knowledge, serve as effective in-context demonstrations. to be specific, for each distinct relation, we initially prompt llms to generate a corresponding sample comprising a sentence and its related relation triple. however, directly prompting llms to generate samples may result in a lack of diversity and coverage @xcite , which are crucial for in-context learning @xcite . consequently, to guarantee the quality and comprehensive coverage of these synthetic samples, we implement a three-stage diversification strategy: 1. relation synonyms: utilizing llms, we generate synonyms for each relation, broadening semantic understanding and data variability. 2. entity filtering: we filter out generated samples containing high-frequency entities to prevent repetitions, thereby ensuring the uniqueness of each data point. 1. the cat is hiding behind the sofa in the living room. ## conclusion in this study, we introduced the self-prompting framework to optimize zero-shot re in llms. our three-stage diversification strategy generates synthetic samples, enhancing llms' accuracy and efficiency in re. experimental results on benchmark datasets demonstrate our method's effectiveness, surpassing existing llm-based zero-shot re techniques. further experiments confirm that our strategy successfully addresses the challenges of diversity and coverage in synthetic sample generation, thereby improving model performance.