Prompt-Based Relation Extraction By Reasoning with Contextual Knowledge
摘要
Recent studies have demonstrated the effectiveness of prompts in enhancing the performance of pre-trained language models on various natural language processing tasks. In this paper, we present TreePrompt, a novel approach for sentence-level relation extraction that leverages contextual knowledge derived from syntactical dependencies. Unlike existing methods, which either rely on manually designed prompts or generate them using heuristic strategies such as gradient-based search, TreePrompt utilizes syntactical information to dynamically generate prompts that are tailored to the core context of the sentence. These prompts are then delivered to a pre-trained language model to learn and infer the relation representation. Empirical evaluation on standard benchmarks demonstrates that our approach outperforms previous methods for relation extraction.