AgentRE: An Agent-Based Framework for Navigating Complex Information Landscapes in Relation Extraction

Yuchen Shi, Guochao Jiang, Tian Qiu, Deqing Yang · DOI

Introduction

Relation Extraction (RE)—the task of identifying structured triples like (Subject, Relation, Object) from unstructured text—is foundational for building knowledge graphs. However, standard Large Language Models (LLMs) often struggle in "complex landscapes" characterized by ambiguous entity relations, context constraints, and data scarcity in specialized domains. Traditional "text-in, text-out" approaches often fail to capture the nuance required for high-accuracy extraction in these scenarios.

Comparison between standard LLM extraction and the AgentRE framework.

To address these challenges, the authors propose AgentRE, a framework that reimagines the LLM as an autonomous agent equipped with external tools, long-term memory, and iterative reasoning capabilities. By moving beyond single-pass inference, AgentRE can navigate complex information environments to outperform traditional models, particularly in low-resource settings.

The AgentRE Framework

The AgentRE system is built around three specialized modules that support the central LLM "brain," allowing it to interact with its environment and learn from its own performance.

The AgentRE architecture featuring Retrieval, Memory, and Extraction modules.

1. Retrieval Module

Unlike standard Retrieval-Augmented Generation (RAG), AgentRE performs dual-path retrieval. It fetches similar labeled samples to provide few-shot context and pulls relevant external information, such as annotation guidelines and Knowledge Graph (KG) triples, to resolve ambiguities and provide "expert" context.

2. Memory Module

AgentRE utilizes a two-tier memory system mimicking human cognition:

  • Shallow Memory: A log of recent correct and incorrect extractions to serve as immediate reference.
  • Deep Memory: The agent "reflects" on its errors to generate high-level rules (e.g., "Do not extract incomplete entities like 'Museum'"). These reflections update a long-term knowledge base, ensuring the model avoids repeating past mistakes.

3. Extraction Module

The agent employs a ReAct (Reason + Act) strategy, alternating between Thought (planning), Action (calling a tool like SearchKG), and Observation (reading the result). Crucially, the system is flexible; it can choose simpler extraction paths (Direct or Staged) for straightforward sentences while reserving complex multi-round reasoning for difficult cases.

Evaluation and Key Results

The researchers evaluated AgentRE on two major benchmarks: DuIE (a large Chinese RE dataset) and SciERC (an English dataset focused on scientific abstracts).

  • State-of-the-Art Performance: On the DuIE dataset, AgentRE-SFT (using a Llama-2-7b backbone) achieved an 82.43 F1 score, vastly outperforming previous SOTA models like InstructUIE (54.32).
  • Low-Resource Dominance: In zero-shot settings, AgentRE achieved a 37.21 F1 on DuIE, while standard In-Context Learning only managed 22.62.
  • Quality Trumps Quantity in Distillation: The authors found that fine-tuning a small model on just 1,000 samples enriched with reasoning "rationales" outperformed fine-tuning on 10,000 simple labeled samples. This suggests that teaching a model how to reason is more effective than simply showing it the final answer.

Conclusion and Future Work

AgentRE demonstrates that transforming RE into an agentic process—where memory and retrieval act as teachers—drastically improves performance and data efficiency. While multi-round reasoning is inherently slower than single-pass inference, the ability to distill this logic into smaller models provides a viable path for high-performance extraction in real-world environments. Future work will focus on expanding AgentRE to other Information Extraction (IE) tasks such as Named Entity Recognition and Event Extraction.

Summary updated

BibTeX
@inproceedings{shi2024agentre,
  author = {Yuchen Shi and Guochao Jiang and Tian Qiu and Deqing Yang},
  title = {{AgentRE: An Agent-Based Framework for Navigating Complex Information Landscapes in Relation Extraction}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
  doi = {10.1145/3627673.3679791},
}
Figure