TL;DR
This paper introduces CORPUS2SKILL, a novel framework that transforms a document corpus into a navigable hierarchy of "skills" for LLM agents. Instead of passively retrieving documents, agents actively explore this hierarchy, leading to improved answer quality and grounding on enterprise knowledge bases, especially for well-structured domains.
What Problem Does This Paper Address?
Current Retrieval-Augmented Generation (RAG) systems, while effective at grounding LLM responses in external data, treat LLMs as passive consumers of search results. This means LLMs lack a holistic understanding of the corpus's organization, making it difficult to perform complex searches or identify when crucial information might be missing from the retrieved set. Agentic RAG approaches allow for multiple queries, but these are often "shots in the dark" without a view of the corpus structure. Existing hierarchical RAG methods still rely on embedding-based search at query time, and the LLM doesn't directly interact with the corpus's organizational structure. This paper addresses the challenge of providing LLM agents with a navigable map of an enterprise knowledge base, enabling more intelligent and efficient information retrieval.
Methods
CORPUS2SKILL employs a two-phase approach:
- Offline Compilation: The entire document corpus is processed offline.
- Documents are first summarized into "summary cards" (title, one-line description, key phrases).
- These cards and document texts are embedded.
- A hierarchical clustering algorithm (K-Means) is used to group documents based on their embeddings.
- LLMs are used to generate summaries for each cluster at various levels, creating a multi-level hierarchy.
- This hierarchy is materialized as a forest of navigable "skill" directories, structured like a filesystem. Each directory contains
SKILL.mdandINDEX.mdfiles, providing progressive disclosure of information. - Named entities and document types are extracted to build an
entity_index.jsonfor cross-branch navigation. - Online Serve Phase: At query time, an LLM agent uses two tools:
code_execution: For navigating the skill directory (browsingSKILL.mdandINDEX.mdfiles).get_document(doc_id): For retrieving the full text of specific documents.
The agent actively explores the skill tree, drilling down through summaries to locate relevant documents, and can backtrack or cross-jump between branches using entity information.
Datasets
- WixQA: A customer-support QA benchmark used for primary evaluation. It consists of 6,221 support articles and 200 expert-written test queries with gold answers and article IDs.
- RAGBench: A benchmark used for generalization studies, comprising ten subsets (CovidQA, DelucionQA, Emanual, ExpertQA, TechQA, FinQA, CUAD, HAGRID, TatQA, ClapNQ). The study uses an expanded retrieval pool for these subsets.
Key Insights and Ideas
- Corpus Navigability as a New Axis: The paper frames corpus navigation as a distinct and underexplored dimension for RAG, complementing traditional retrieval.
- Filesystem as a Navigable Skill Hierarchy: Leveraging filesystem structures for representing knowledge hierarchies allows for progressive disclosure and efficient agent interaction.
- Agent-Driven Exploration: Empowering LLM agents to actively navigate and reason over a corpus structure, rather than just receiving retrieved snippets, leads to more intelligent information seeking.
- Compile-Time vs. Serve-Time Tradeoff: The heavy lifting of organizing the corpus is done offline, making the serve-time component lightweight and LLM-only, which simplifies deployment.
- Scope Matters: Corpus navigation is not a universal solution; its effectiveness is highly dependent on the underlying corpus structure. Well-defined topical taxonomies benefit greatly, while open-domain or highly heterogeneous corpora may still favor flat retrieval.
Key Results
- Improved Quality and Grounding: On the WixQA benchmark, CORPUS2SKILL achieved the highest scores across most answer-quality metrics (Token F1, BERTScore-F1, Factuality, CtxR, CtxP) and significantly reduced hallucination rates compared to agentic baselines. It outperformed even the best single-shot retrievers in quality while maintaining competitive grounding.
- Generalization: CORPUS2SKILL won on 7 out of 11 RAGBench subsets, demonstrating strong performance on single-domain, topically coherent corpora.
- Competitive on Heterogeneous Corpora: On mixed or numerical-table corpora, CORPUS2SKILL performed comparably to other methods.
- Limitations on Certain Corpora: Flat retrieval remained preferable on open-domain factoid corpora (HAGRID) and homogeneous-tabular corpora (TatQA, CUAD) where top-level clustering collapsed.
- Cost: CORPUS2SKILL incurs a moderate cost increase ($0.153/query on WixQA) compared to single-shot methods, but is still more cost-effective than some multi-turn agentic approaches.
- Navigation Efficiency: The hierarchical structure significantly reduces the number of summaries an agent needs to inspect, from O(N) to O(p log N), where p is the branching ratio.
Limitations and Future Work
- Cost: While competitive, the cost of CORPUS2SKILL is higher than single-shot retrieval, making it more suitable for high-value queries.
- Routing Errors: Top-level routing remains a bottleneck, with failures occurring when documents span multiple topics or when broad skill summaries are not distinct enough.
- Compilation: The current compilation process is a one-time, non-incremental operation. Adding new documents requires recompilation.
- Corpus Scope: The paper highlights that navigation is not universally beneficial and suggests hybrid approaches that combine navigation with retrieval for certain corpus types.
- Future Work: The authors suggest exploring hybrid per-query routing between navigation and retrieval, and addressing the limitations of corpus scope. They also note that the navigation LLM doesn't need to be overly sophisticated; the compiled tree drives performance.
Summary updated