用多智能体协作解决长文本处理中的延迟和信息丢失问题
Long Context Scaling: Divide and Conquer via Multi-Agent Question-driven Collaboration
- 动态分块+问答驱动更新共享知识,减少信息损耗
- 在1k到100万字符文本上提升20%效果,推理速度加快1.5倍
- 适合需要处理超长文档的AI系统,如法律、科研场景
长文本处理已成为现代大语言模型的关键能力。现有基于智能体的分解方法存在累积延迟高、调用过多导致信息丢失、过度切分破坏文本依赖关系等缺陷。本文提出新型多智能体框架XpandA,结合问答驱动工作流与动态分块机制,实现鲁棒的长文本处理:1)动态调整上下文窗口填充率,适应不同长度输入;2)通过问答协议更新集中共享内存中的信息集合,构建跨分区一致的知识;3)基于问题-信息对状态追踪,选择性重播特定分块,解决跨分区倒叙结构(如闪回)问题。我们在多个长文本基准上评估XpandA,覆盖1k至100万字符长度,结果表明该方法可有效处理超长序列,在各类大模型上相较全上下文、RAG及先前智能体方法实现20%性能提升和1.5倍推理加速。
原文摘要 · Abstract (English)
Processing long contexts has become a critical capability for modern large language models (LLMs). Existing works leverage agent-based divide-and-conquer methods for processing long contexts. But these methods face crucial limitations, including prohibitive accumulated latency and amplified information loss from excessive agent invocations, and the disruption of inherent textual dependencies by immoderate partitioning. In this paper, we propose a novel multi-agent framework XpandA (Expand-Agent) coupled with question-driven workflow and dynamic partitioning for robust long-context processing. XpandA overcomes these limitations through: 1) dynamic partitioning of long texts, which adaptively modulates the filling rate of context windows for input sequences of vastly varying lengths; 2) question-guided protocol to update flat information ensembles within centralized shared memory, constructing consistent inter-agent knowledge across partitions; and 3) selectively replaying specific partitions based on the state-tracking of question-information couples to promote the resolution of inverted-order structures across partitions (e.g., flashbacks). We perform a comprehensive evaluation of XpandA on multiple long-context benchmarks with length varying from 1k to 1M, demonstrating XpandA's feasibility for processing ultra-long sequences and its significant effectiveness in enhancing the long-context capabilities of various LLMs by achieving 20\% improvements and 1.5x inference speedup over baselines of full-context, RAG and previous agent-based methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。