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.


翻译:零样本事件提取(ZSEE)对于大语言模型(LLMs)而言仍然是一个重大挑战,因为它需要复杂的推理和领域特定的理解。直接提示通常会产生不完整或结构无效的输出——例如错误分类的触发词、缺失的论元以及模式违规。为了解决这些局限性,我们提出了Agent-Event-Coder(AEC),这是一种新颖的多智能体框架,将事件提取视为软件工程:一个结构化、迭代的代码生成过程。AEC将ZSEE分解为专门的子任务——检索、规划、编码和验证——每个任务由一个专用的LLM智能体处理。事件模式被表示为可执行的类定义,从而通过验证智能体实现确定性验证和精确反馈。这种受编程启发的方法允许通过迭代优化进行系统性消歧和模式强制执行。通过利用协作式智能体工作流,AEC使LLMs能够在零样本设置中生成精确、完整且模式一致的提取结果。在五个不同领域和六种LLMs上的实验表明,AEC始终优于先前的零样本基线,展示了将事件提取视为代码生成的力量。代码和数据发布于https://github.com/UESTC-GQJ/Agent-Event-Coder。

1
下载
关闭预览

相关内容

事件抽取指的是从非结构化文本中抽取事件信息,并将其以结构化形式呈现出来的任务。例如从“毛泽东1893 年出生于湖南湘潭”这句话中抽取事件{类型:出生,人物:毛泽东,时间:1893 年,出生地:湖南湘潭}。 事件抽取任务通常包含事件类型识别和事件元素填充两个子任务。
Top
微信扫码咨询专知VIP会员