  Document-level relation extraction aims at inferring structured human
knowledge from textual documents. State-of-the-art methods for this task use
pre-trained language models (LMs) via fine-tuning, yet fine-tuning is
computationally expensive and cannot adapt to new relation types or new LMs. As
a remedy, we leverage the generalization capabilities of pre-trained LMs and
present a novel framework for document-level in-context few-shot relation
extraction. Our framework has three strengths: it eliminates the need (1) for
named entity recognition and (2) for human annotations of documents, and (3) it
can be updated to new LMs without re-training. We evaluate our framework using
DocRED, the largest publicly available dataset for document-level relation
extraction, and demonstrate that our framework achieves state-of-the-art
performance. We further show that our framework actually performs much better
than the original labels from the development set of DocRED. Finally, we
demonstrate that our complete framework yields consistent performance gains
across diverse datasets and across different pre-trained LMs. To the best of
our knowledge, we are the first to reformulate the document-level relation
extraction task as a tailored in-context few-shot learning paradigm.
