Papers › Schema-aware Reference as Prompt Improves Data-Efficient Knowledge Graph Construction

Schema-aware Reference as Prompt Improves Data-Efficient Knowledge Graph Construction

19 Oct 2022arXiv:2210.10709archive 2025-07-28

Yunzhi Yao, Shengyu Mao, Ningyu Zhang, Xiang Chen, Shumin Deng, Xi Chen, Huajun Chen

With the development of pre-trained language models, many prompt-based approaches to data-efficient knowledge graph construction have been proposed and achieved impressive performance. However, existing prompt-based learning methods for knowledge graph construction are still susceptible to several potential limitations: (i) semantic gap between natural language and output structured knowledge with pre-defined schema, which means model cannot fully exploit semantic knowledge with the constrained templates; (ii) representation learning with locally individual instances limits the performance given the insufficient features, which are unable to unleash the potential analogical capability of pre-trained language models. Motivated by these observations, we propose a retrieval-augmented approach, which retrieves schema-aware Reference As Prompt (RAP), for data-efficient knowledge graph construction. It can dynamically leverage schema and knowledge inherited from human-annotated and weak-supervised data as a prompt for each sample, which is model-agnostic and can be plugged into widespread existing approaches. Experimental results demonstrate that previous methods integrated with RAP can achieve impressive performance gains in low-resource settings on five datasets of relational triple extraction and event extraction for knowledge graph construction. Code is available in https://github.com/zjunlp/RAP.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2210.10709")

Code

Syntology Ran 1 of 11 code samples harvested from 1 repository linked to this paper; 10 have no recorded run. Of those that ran: 1 ran · fixture could not drive it.

By repository: official repository: 11 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

zjunlp/RAP officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

11 samples harvested; 1 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · fixture could not drive it
10unverified

Licence: 0 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from zjunlp/RAP. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

find_sublist_index zjunlp/RAP/BaseModel/RelationPrompt/utils.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · 97a3eca137c3440e · report
find_head_idx zjunlp/RAP/BaseModel/PRGC/dataloader_utils.py official repository unverified MIT (permissive) · 6adefb5e4abb5be2 · report
find_sublist_indices zjunlp/RAP/BaseModel/RelationPrompt/utils.py official repository unverified MIT (permissive) · 489e40f0d2ef6927 · report
get_chunk_type zjunlp/RAP/BaseModel/PRGC/metrics.py official repository unverified MIT (permissive) · 9d4067b23a01fee1 · report
get_chunks zjunlp/RAP/BaseModel/PRGC/metrics.py official repository unverified MIT (permissive) · 68b3cc3a2577fbd6 · report
get_metrics zjunlp/RAP/BaseModel/PRGC/evaluate.py official repository unverified MIT (permissive) · 626bdc34ef9914c2 · report
load_checkpoint zjunlp/RAP/BaseModel/PRGC/utils.py official repository unverified MIT (permissive) · 1d6af4e45a421828 · report
load_wiki_relation_map zjunlp/RAP/BaseModel/RelationPrompt/utils.py official repository unverified MIT (permissive) · 0b33d061e8b7d42d · report
read_examples zjunlp/RAP/BaseModel/PRGC/dataloader_utils.py official repository unverified MIT (permissive) · 7edec986d793594c · report
span2str zjunlp/RAP/BaseModel/PRGC/evaluate.py official repository unverified MIT (permissive) · 94ab66ec54e9046e · report
tag_mapping_nearest zjunlp/RAP/BaseModel/PRGC/metrics.py official repository unverified MIT (permissive) · b38b4069b22679d0 · report

Tasks

Event ExtractionRepresentation LearningRetrievalgraph construction

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections