arXiv:2605.21850cs.CLcs.AI2026-05

用智能体轨迹生成长上下文问答数据,提升大模型推理能力

ACC: Compiling Agent Trajectories for Long-Context Training

论文配图:ACC: Compiling Agent Trajectories for Long-Context Training
图 1 · 摘自论文原文
  • 将智能体多轮交互轨迹转化为跨回合问答对,显式建模远距离依赖
  • 在MRCR和GraphWalks上分别提升18.1和7.6分,接近更大模型表现
  • 无需额外标注,可与现有训练方法结合,适合长文本推理研究者

近期智能体的发展重新激发了大语言模型对长上下文推理能力的需求。然而,训练此类能力通常需要昂贵的长文档整理或启发式上下文合成。我们观察到,智能体在解决问题时会产生大量多轮轨迹,包含工具调用和环境反馈。原始问题的答案证据分散在这些多轮交互中,需整合远距离上下文片段。但标准的智能体监督微调仅掩码工具响应,只训练单轮工具选择,导致这些分散信号未被利用。为此,我们提出智能体上下文编译(ACC),将搜索、软件工程和数据库查询智能体的轨迹转化为包含原始问题及跨多轮收集的工具响应与环境观测的长上下文问答对,使模型能直接回答而无需调用工具。这显式揭示问题与证据间的依赖关系,实现对远距离上下文推理的直接监督,无需额外标注。ACC是一种简单有效的方法,可与任意现有长上下文扩展或训练方法结合,提供可扩展的有监督微调数据。我们在MRCR和GraphWalks等挑战性基准上验证了其效果,这两项任务要求跨轮指代消解和长上下文图遍历。使用ACC训练Qwen3-30B-A3B,在MRCR上达到68.3分(+18.1),在GraphWalks上达到77.5分(+7.6),性能媲美更大规模的Qwen3-235B-A22B,同时在GPQA、MMLU-Pro、AIME和IFEval上保持通用能力。进一步机制分析显示,ACC训练的模型展现出任务自适应注意力重构和专家专业化特征。

原文摘要 · Abstract (English)

Recent development of agents has renewed demand for long-context reasoning capacity of LLMs. However, training LLMs for this capacity requires costly long-document curation or heuristic context synthesis. We observe that agents produce massive trajectories when solving problems, invoking tools and receiving environment observations across many turns. The evidence needed to answer the original question is thus scattered throughout these turns, requiring integration of distant context segments. Nevertheless, standard agent SFT masks tool responses and only trains turn-level tool selection, creating a supervision blind spot where these scattered signals go unused. We propose Agent Context Compilation (ACC), which converts trajectories from search, software engineering, and database querying agents into long-context QA pairs that combine the original question with tool responses and environment observations gathered across multiple turns, training the model to answer directly without tool use. This makes the dependencies between the question and the evidence explicit, enabling direct supervision of long-context reasoning over distant segments without additional annotation. ACC is a simple but effective approach that can be combined with any existing long-context extension or training method, providing scalable supervised fine-tuning data. We validate ACC on long-range dependency modeling tasks through MRCR and GraphWalks, challenging benchmarks requiring cross-turn coreference resolution and graph traversal over extended contexts. Training Qwen3-30B-A3B with ACC achieves 68.3 on MRCR (+18.1) and 77.5 on GraphWalks (+7.6), results comparable to Qwen3-235B-A22B, while preserving general capabilities on GPQA, MMLU-Pro, AIME, and IFEval. Further mechanism analysis reveals that the ACC-trained model exhibits task-adaptive attention restructuring and expert specialization.

长上下文智能体训练数据推理增强

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。