Librarian Agents: Training LLMs to Curate Long-Context Workspaces that Anticipate Future Queries

📄 arXiv: 2610.22273v1 📥 PDF

作者: Anikait Singh, Teresa Zhang, Yoonho Lee, Roshen Sanjay Nair, Aviral Kumar, Chelsea Finn

分类: cs.LG, cs.AI, cs.CL

发布日期: 2026-10-15


💡 一句话要点

提出图书管理员代理以解决长文档上下文推理问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长文档推理 大型语言模型 主动重组 强化学习 信息检索 智能问答 文档管理

📋 核心要点

  1. 现有方法在处理长文档上下文时存在推理瓶颈,无法有效支持复杂的跨文档查询。
  2. 论文提出图书管理员代理,通过构建层次化的文件系统和参考链接,主动整理文档以服务未来查询。
  3. 实验结果显示,图书管理员代理在多个基准测试中显著提高了回答准确率,展现出良好的泛化能力。

📝 摘要(中文)

长文档上下文的推理仍然是大型语言模型(LLMs)面临的挑战。标准的检索方法往往是反应式的,导致在推理时面临复杂的跨文档推理瓶颈,而预计算结构如知识图谱则因依赖于僵化的启发式方法而效果不佳。本文提出图书管理员代理,允许代理在推理前主动重组非结构化文档,以高效服务未来多样化的查询。通过将工作空间构建形式化为马尔可夫决策过程,并通过强化学习优化构建策略,实验结果表明图书管理员代理在BrowseComp-Plus上比最强的检索和预计算基线提高了33个百分点,并在BRIGHT上实现了31点的平均准确率提升。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在长文档上下文推理中的局限性,现有方法在推理时往往面临复杂的跨文档推理瓶颈,且预计算结构的灵活性不足。

核心思路:提出图书管理员代理,允许代理在推理前主动重组非结构化文档,形成一个为下游回答代理量身定制的工作空间,从而提升推理效率和准确性。

技术框架:整体架构包括一个构建代理和一个回答代理。构建代理负责将原始文档转化为层次化的文件系统,而回答代理则利用这些结构化信息进行高效回答。

关键创新:最重要的技术创新在于将工作空间构建形式化为马尔可夫决策过程,并通过强化学习直接优化构建策略,以最大化下游回答的准确性。

关键设计:在构建过程中,设计了特定的损失函数以引导构建代理优化工作空间的质量,同时采用了强化学习算法来提升策略的有效性。具体参数设置和网络结构细节在实验部分进行了详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,图书管理员代理在BrowseComp-Plus基准测试中比最强的检索和预计算基线提高了33个百分点,并在BRIGHT上实现了31点的平均准确率提升,展现出良好的泛化能力和高效性。

🎯 应用场景

该研究的潜在应用领域包括信息检索、智能问答系统和文档管理等。通过提升长文档的处理能力,图书管理员代理能够在教育、法律、医疗等行业中提供更高效的信息服务,具有广泛的实际价值和影响力。

📄 摘要(原文)

Reasoning over long document contexts remains a challenge for large language models (LLMs). Standard retrieval methods are inherently reactive, bottlenecking agents with complex, cross-document reasoning at inference time, while precomputed structures like knowledge graphs often fall short because they rely on rigid heuristics. Instead, can we allow agents to perform anticipatory directed curation: learning to proactively reorganize unstructured corpora prior to inference to efficiently serve diverse future queries. We build on a key asymmetry in modern agentic harnesses (e.g., Claude Code): while LLM agents are adept at navigating existing filesystems to solve an immediate task, they are rarely trained to construct reusable workspaces for future use. To instantiate this capability, we introduce Librarian Agents, a framework in which a builder agent transforms raw documents into a hierarchical filesystem of synthetic files and reference links, which forms a workspace tailored for a downstream answering agent. We formulate workspace construction as a Markov decision process and optimize the builder policy via reinforcement learning to directly maximize downstream answering accuracy. Empirically, Librarian Agents outperforms the strongest retrieval and precomputation baselines by 33 percentage points on BrowseComp-Plus, amortizes upfront construction costs across repeated queries, and generalizes zero-shot to unseen domains on BRIGHT with a 31-point average accuracy improvement.