Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event Extraction

Quanjiang Guo, Sijie Wang, Jinchuan Zhang, Ben Zhang, Zhao Kang +2 more
11/17/2025
cs.CLcs.AI

No official code found. Best implementation: UESTC-GQJ/AEC (10 stars, MIT, last commit 2025-11-16).

Abstract

Zero-shot event extraction (ZSEE) remains a significant challenge for large language models (LLMs) due to the need for complex reasoning and domain-specific understanding. Direct prompting often yields incomplete or structurally invalid outputs--such as misclassified triggers, missing arguments, and schema violations. To address these limitations, we present Agent-Event-Coder (AEC), a novel multi-agent framework that treats event extraction like software engineering: as a structured, iterative code-generation process. AEC decomposes ZSEE into specialized subtasks--retrieval, planning, coding, and verification--each handled by a dedicated LLM agent. Event schemas are represented as executable class definitions, enabling deterministic validation and precise feedback via a verification agent. This programming-inspired approach allows for systematic disambiguation and schema enforcement through iterative refinement. By leveraging collaborative agent workflows, AEC enables LLMs to produce precise, complete, and schema-consistent extractions in zero-shot settings. Experiments across five diverse domains and six LLMs demonstrate that AEC consistently outperforms prior zero-shot baselines, showcasing the power of treating event extraction like code generation. The code and data are released on https://github.com/UESTC-GQJ/Agent-Event-Coder.

View on arXivView PDF

Code Implementations(1)

UESTC-GQJ/AECCommunity71%
MIT

This is the source code of AAAI 2026 paper "Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event Extraction".

101PythonNov 16, 202511 months agoMIT

Similar Papers

Cite this paper

@article{guo2025extracting,
  title  = {Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event Extraction},
  author = {Quanjiang Guo and Sijie Wang and Jinchuan Zhang and Ben Zhang and Zhao Kang and Ling Tian and Ke Yan},
  year   = {2025},
  eprint = {2511.13118},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.13118v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.13118.svg)](https://codeofpaper.com/paper/2511.13118)

Discussion