Introduction
Event Extraction (EE) is a fundamental task in information extraction that involves identifying structured information about "what happened" from unstructured text. This process typically requires two primary sub-tasks: identifying the "trigger" (the word or phrase that signifies the event) and extracting the "arguments" (the entities involved, their roles, and associated attributes). While Large Language Models (LLMs) have shown remarkable capabilities in various NLP tasks, Zero-Shot Event Extraction (ZSEE)—extracting events without specific training examples—remains a significant challenge due to the inherent complexity and variety of event types.
The Challenges of Zero-Shot Event Extraction
Current LLM-based approaches to ZSEE face two major hurdles that limit their practical utility: contextual ambiguity and structural fidelity.
Contextual Ambiguity arises because words often have multiple meanings depending on their surroundings. For instance, the word "strike" can refer to a labor protest or a military attack. Without specific guidance, LLMs often fail to attend to the correct contextual cues, leading to misclassification based on a narrow focus on the trigger word itself.
Structural Fidelity refers to the requirement that extracted data must strictly adhere to a predefined schema. LLMs frequently struggle with complex schemas, often hallucinating non-existent fields, violating type constraints, or producing malformed output formats that cannot be easily parsed by downstream systems.
The Agent-Event-Coder (AEC) Framework
To address these challenges, the authors propose Agent-Event-Coder (AEC), a novel framework that reconceptualizes event extraction as a collaborative software engineering task. Instead of treating extraction as a simple text-to-text generation problem, AEC decomposes the process into a multi-agent workflow where agents plan, code, and verify event structures as executable Python objects.
Core Innovation: Events as Code
A central tenet of AEC is representing event schemas as Python classes (e.g., using Pydantic). This shift from "fuzzy" natural language prompting to deterministic code allows the system to leverage the inherent logic and validation capabilities of programming languages. By treating an event as a class to be instantiated, the model is forced to consider the specific types and roles defined in the schema.
The Multi-Agent Workflow
The AEC framework utilizes four specialized agents to manage the extraction pipeline:
- Retrieval Agent: Self-generates "analogical" examples (exemplar sentences) to help the model ground abstract schema definitions in concrete linguistic context.
- Planning Agent: Analyzes the input text to generate and rank multiple "trigger-type" hypotheses, each accompanied by a natural language rationale to ensure the reasoning is sound.
- Coding Agent: Takes the top-ranked hypothesis and converts it into executable Python code, instantiating the schema class with specific spans extracted from the text.
- Verification Agent: Acts as a "compiler," running a three-stage test suite (Semantic, Type, and Format checks) on the generated code.
A key feature of this workflow is the Dual-Loop Refinement Algorithm. If the Verification Agent detects an error, it provides detailed, compiler-like feedback to the Coding Agent for "patching." If patching fails after several attempts, the system backtracks to the next-best hypothesis from the Planning Agent, mimicking the iterative debugging process of a human developer.
Experimental Evaluation
The authors evaluated AEC across five diverse domains to test its generalizability: general news (ACE 2005, FewEvent), biomedical (GENIA), epidemiological (SPEED), and cybersecurity (CASIE). The framework was tested using a variety of LLMs, including the Llama3 and Qwen2.5 families, as well as OpenAI’s GPT-3.5-turbo and GPT-4o.
Key Results
AEC consistently outperformed state-of-the-art zero-shot baselines such as ChatIE and GuidelineEE across all datasets. On the ACE 2005 dataset using Llama3-8B, AEC achieved a +7.8% improvement in Trigger Identification and a +6.0% gain in Trigger Classification over the previous best baseline. The framework also demonstrated strong scaling properties, reaching its peak performance with GPT-4o, achieving an F1 score of 61.8 for Trigger Classification on ACE 2005.
Ablation studies confirmed that every agent is critical to the system's success. Notably, removing the Retrieval Agent caused the largest drop in trigger identification performance, proving that contextual "analogies" are vital for disambiguating complex triggers.
Conclusion
Agent-Event-Coder represents a significant step forward in Zero-Shot Event Extraction. By framing extraction as a programming task and employing a multi-agent system with built-in verification and backtracking, AEC overcomes the traditional pitfalls of contextual ambiguity and structural instability. This approach not only improves accuracy but also ensures that extracted data is robust and ready for integration into structured databases.
Summary updated