Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event Extraction
Quanjiang Guo, Sijie Wang, Jinchuan Zhang, Ben Zhang, Zhao Kang, Ling Tian, Ke Yan
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 programminginspired 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 1 .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
Builds on12
- Large Language Models as Analogical ReasonersMichihiro Yasunaga, Xinyun Chen, Yujia Li, Panupong Pasupat et al.ICLR 2024 · 155 citations
- Is a Large Language Model a Good Annotator for Event Extraction?Ruirui Chen, Chengwei Qin, Weifeng Jiang, Dongkyu ChoiAAAI 2024 · 65 citations
- Code4Struct: Code Generation for Few-Shot Event Structure PredictionXingyao Wang, Sha Li, Heng JiACL 2023 · 40 citations
- TriageAgent: Towards Better Multi-Agents Collaborations for Large Language Model-Based Clinical TriageMeng Lu, Brandon Ho, Dennis Ren, Xuan WangEMNLP Findings 2024 · 19 citations
- A Cooperative Multi-Agent Framework for Zero-Shot Named Entity RecognitionZihan Wang, Ziqi Zhao, Yougang Lyu, Zhumin Chen et al.WWW 2025 · 16 citations
Related papers
- Learning to Generate and Extract: A Multi-Agent Collaboration Framework for Zero-Shot Document-Level Event Arguments ExtractionGuangjun Zhang, Hu Zhang, Yazhou Han, Yue Fan et al.AAAI 2026
- CROSSAGENTIE: Cross-Type and Cross-Task Multi-Agent LLM Collaboration for Zero-Shot Information ExtractionMeng Lu, Yuzhang Xie, Zhenyu Bi, Shuxiang Cao et al.ACL Findings 2025 · 2 citations
- Adaptive Schema-aware Event Extraction with Retrieval-Augmented GenerationSheng Liang, Hang Lv, Zhihao Wen, Yaxiong Wu et al.EMNLP Findings 2025 · 5 citations
- KnowCoder: Coding Structured Knowledge into LLMs for Universal Information ExtractionZixuan Li, Yutao Zeng, Yuxin Zuo, Weicheng Ren et al.ACL 2024 · 19 citations
- Debate as Optimization: Adaptive Conformal Prediction and Diverse Retrieval for Event ExtractionSijia Wang, Lifu HuangEMNLP Findings 2024 · 5 citations
