Training a Knowledge Base: Supervised Structure Learning for Agent-Curated Document Stores
Organizations: University of Nebraska–Lincoln
Abstract
Retrieval-augmented generation treats the document store as a frozen input, and the offline pipelines that do build structure over it build it unsupervised -- a whole corpus indexed at uniform effort, with no signal about which structure a question will need. We instead treat the knowledge base as a non-parametric model trained on (question, answer) pairs: a curator agent answers a supervised question against the current store, is shown the gold answer, then edits the store. The store carries forward, and we evaluate the curated store with a test set, on two contamination-free benchmarks: KBGym, a fictional-universe generator we release, and PhantomWiki. Generalization is probed with four question groups of decreasing overlap with the training set: the trained questions themselves, and unseen questions sharing both of their keys with training, one key, or neither. The curated store's advantage grows with overlap -- from parity where no key was shared, through +0.176 F1 where both keys were, to 25% fewer actions at +0.294 F1 on the trained questions, the one cell significant on both benchmarks -- while matching HippoRAG's gains with 1,913 links against its 196,112: per point of corpus covered, 1.5x the action saving and 2.1x the accuracy gain. Accuracy rises steadily with the share of the corpus the indexes cover, so training on more questions widens coverage, and with it the generalization.
Figures & tables
| Action | Effect | R | C |
| search(q, page) | five most similar documents; one page per action | ✓ | ✓ |
| read(id) | the document and the full text of everything it links to, one level | ✓ | ✓ |
| answer(text) | submit and end the pass | ✓ | |
| add(text) | new document; a near-duplicate is merged instead | ✓ | |
| edit(id, text) | replace a document’s text | ✓ | |
| delete(id) | remove a document | ✓ |
| KBGym (main) | PhantomWiki (official) | |
|---|---|---|
| documents | 5,864 sentences | 3,403 sentences from 405 articles |
| source | our generator | their generator |
| questions | 330 (150/100/50/30) | 330, same scheme |
| question author | us | PhantomWiki |
| supports | exact | unavailable |
| contamination | none | none |
| Store | coverage | actions / pt | F1 / pt |
|---|---|---|---|
| B1 flat | 0% | — | — |
| B2 GraphRAG | 100% | ||
| B3 HippoRAG2 | 100% | ||
| Ours (trained) | 27.6% |
| Store | trained on | both keys | one key | neither |
|---|---|---|---|---|
| : actions relative to B1 | ||||
| B1 flat | 1.000 | 1.000 | 1.000 | 1.000 |
| B2 GraphRAG | 0.918 | 1.154 | 0.972 | 1.047 |
| Ours (trained) | 0.747 ∗ | 0.879 | 0.977 | 1.016 |
| F1 | ||||
| B1 flat | 0.618 | 0.765 | 0.647 | 0.794 |
| Key the index is built on | deg. | prec. | recall | |
|---|---|---|---|---|
| attribute: city | 8 | 26.4 | 98% | 95% |
| “Residents of Dorringham” | ||||
| attribute: hobby / job | 54 | 12.7 | 98% | 96% |
| “People whose hobby is astronomy” | ||||
| single-entity hub | 91 | 8.0 | 95% | 90% |
| “Bennett Coldwater” | ||||
Agentic RAG
Agentic retrieval-augmented generation lets language models plan searches, use tools, and refine evidence before producing grounded answers.
See all 246 papers