Retrieval-Augmented Generation (RAG) grounds LLM responses in external evidence but treats the model as a passive consumer of search results: it never sees how the corpus is organized or what it has not yet retrieved, limiting its ability to backtrack or combine scattered evidence. We present Corpus2Skill, which distills a document corpus into a hierarchical skill directory offline and lets an LLM agent navigate it at serve time. The compilation pipeline iteratively clusters documents, generates LLM-written summaries at each level, and materializes the result as a tree of navigable skill files. At serve time, the agent receives a bird's-eye view of the corpus, drills into topic branches via progressively finer summaries, and retrieves full documents by ID. Because the hierarchy is explicitly visible, the agent can reason about where to look, backtrack from unproductive paths, and combine evidence across branches. On WixQA, an enterprise customer-support benchmark for RAG, Corpus2Skill outperforms dense retrieval, RAPTOR, and agentic RAG baselines across all quality metrics. We further evaluate generalization on nine RAGBench subsets reformulated as retrieval-stress benchmarks: Corpus2Skill attains the highest macro-average F1 across the full 10-dataset suite and characterizes a clear regime -- single-domain, atomic-document corpora -- where corpus navigation is the right primitive, while flat retrieval remains preferable for open-domain or extractive pools.
翻译:检索增强生成(RAG)将大语言模型的响应锚定于外部证据,但本质上将模型视为搜索结果的被动消费者:模型既无法感知语料库的组织结构,也无法知晓尚未检索到的内容,从而限制了其回溯或整合分散证据的能力。我们提出Corpus2Skill框架,该框架离线将文档语料库蒸馏为层次化技能目录,并在服务阶段让大语言模型智能体对其进行导航。编译流水线通过迭代聚类文档、在各层级生成LLM撰写的摘要,并将结果物化为可导航技能文件构成的树状结构。在服务阶段,智能体获得语料库的全局概览,通过逐层细化的摘要深入主题分支,并通过文档ID检索完整文档。由于层次结构清晰可见,智能体能够推理搜索方向、从无效路径中回溯,并跨分支整合证据。在企业级客户支持RAG基准WixQA上,Corpus2Shift在全部质量指标上均优于稠密检索、RAPTOR及智能体RAG基线方法。我们进一步在九个经重构为检索压力测试的RAGBench子集上进行泛化评估:Corpus2Shift在完整的十数据集套件上取得最高宏平均F1值,并明确界定出适用场景——对于单域原子文档语料库,语料导航是优选方法,而平面检索仍更适用于开放域或抽取式数据集。