Knowledge extraction serves as a critical technique for constructing domain-specific knowledge graphs and enabling intelligent text parsing. In the vertical agricultural domain, wheat variety approval texts contain abundant agronomic trait entities and their relational associations. Nevertheless, they are characterized by dense domain-specific terminology, the co-occurrence of multiple relations, long entity spans, and mixed numerical and textual expressions, which pose considerable challenges to the accurate extraction of entity-relation triples. Existing in-context learning paradigms mostly retrieve demonstrations based on general-purpose semantic embeddings. The retrieved demonstrations rarely achieve relation-structure matching with query instances; furthermore, LLMs are susceptible to format hallucinations, which limit entity and relation extraction performance. Accordingly, we propose Relation-aware Demonstration Retrieval and Progressive Knowledge Calibration for In-Context Learning (ReCal-ICL), a relation-aware in-context learning framework for joint entity and relation extraction. ReCal-ICL employs RADS, a relation-aware demonstration selector based on hierarchical contrastive learning. Through hierarchical quadruples, in-batch dynamic negative sampling, and a hybrid loss, RADS reshapes the representation space to enhance relational-structure matching between retrieved demonstrations and query instances. In addition, a two-layer output constraint strategy is developed, which integrates prompt-template prior constraints and post hoc result verification mechanisms to jointly guarantee the format compliance of extraction outputs. We conduct comparative and ablation experiments on WVAD as well as public NYT and CoNLL04 datasets. Experimental results show that ReCal-ICL achieves competitive joint extraction performance across multiple datasets. Further experiments show that incorporating demonstrations benefits downstream extraction, while the retrieval relevance evaluation indicates that RADS improves the relational relevance of retrieved demonstrations.
No takes yet. Share an insight, caveat, or question.
Xiong et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: