AI-built document folders helped another AI answer hard research questions

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

TL;DR With folders built by a trained AI, a small answering AI got 75% of hard research tasks right, versus 44% using a standard search tool. The results suggest AI helpers could organize a pile of documents once, then reuse that work across many questions.

Words to know

index
A prebuilt guide that points to where information sits in a set of documents.
reinforcement learning
A way of training an AI by rewarding the actions that lead to good outcomes.
tokens
Small chunks of text, often pieces of words, that an AI reads and writes; a common measure of AI work.

The problem

Picture a company’s design notes, bug reports and customer reports about one product. An AI helper asked about them usually searches the raw pile for each new question. It rediscovers the same links between documents every time. Other systems build a fixed index first, such as a map of names and how they relate. That index works best when questions fit its fixed shape. It fits less well when questions need a new view.

The idea

The team organizes the documents once, before any question arrives. Picture the builder AI as a librarian who sorts a box of papers before visitors come. She writes summary sheets, files them in labeled folders and notes each sheet’s sources. Her only grade is how many questions the visitors, a second answering AI, then get right. In practice, the builder is a small Qwen model that decides what to write. A larger, fixed AI drafts the text. The team trained the builder with reinforcement learning, rewarding it when hidden practice questions got answered right. The answering AIs stayed unchanged: a small Qwen model and Google’s Gemini. The authors say AIs already use folders well, so grading the builder on answers teaches it which folders help.

What they showed

  1. A large gain on the main test. On research tasks kept out of training, the small Qwen model answered 75% correctly with the builder’s folders. A standard search tool reached 44%. With Gemini answering, the gap was similar.
  2. New subjects, no extra training. On subjects from the BRIGHT question bank (math contests, biology and programming), the builder’s folders gave 52% correct answers on one try. The best other method averaged about 21%.
  3. More reading, less waste. The trained builder’s folders made the answering AI read more per question than folders from the builder before training. Still, with ten questions per document pile, it used about a third fewer tokens for each correct answer. The size of the saving is uncertain.

Why it matters

Teams that run AI helpers over fixed document collections are the clearest audience, though the paper tested public research sets. If the result holds, they could spend effort organizing a collection once, then reuse it for many questions. No code is public yet. For you, it points toward a work assistant that sorts your documents before you ask.

The catch

The main test is small: 50 tasks, with another AI, Gemini, judging which answers were right. On BRIGHT, the programming subject drove much of the average, and the math lead sat inside the margin of error. The token savings compare against the untrained builder, not search tools. All tests also used documents that never change, so keeping the folders current is untested.

Who wrote it

Anikait Singh, Teresa Zhang and Yoonho Lee share first authorship, with Roshen Sanjay Nair, Aviral Kumar and Chelsea Finn. The six authors are from Stanford University and Carnegie Mellon University. Kumar co-authored “Conservative Q-Learning for Offline Reinforcement Learning” (2020).