Retrieval-augmented language models can better adapt to changes in world state and incorporate long-tail knowledge. However, most existing methods retrieve only short contiguous chunks from a retrieval corpus, limiting holistic understanding of the overall document context. We introduce the novel approach of recursively embedding, clustering, and summarizing chunks of text, constructing a tree with differing levels of summarization from the bottom up. At inference time, our RAPTOR model retrieves from this tree, integrating information across lengthy documents at different levels of abstraction. Controlled experiments show that retrieval with recursive summaries offers significant improvements over traditional retrieval-augmented LMs on several tasks. On question-answering tasks that involve complex, multi-step reasoning, we show state-of-the-art results; for example, by coupling RAPTOR retrieval with the use of GPT-4, we can improve the best performance on the QuALITY benchmark by 20% in absolute accuracy.
翻译:检索增强型语言模型能够更好地适应世界状态的变化并融入长尾知识。然而,现有方法通常仅从检索语料库中提取短连续片段,限制了模型对整体文档语境的全面理解。我们提出了一种创新方法:通过递归嵌入、聚类和摘要处理文本块,自底向上构建具有不同摘要层级的树结构。在推理阶段,RAPTOR模型从该树中检索信息,在多个抽象层级上整合长篇文档的内容。控制实验表明,与传统的检索增强型语言模型相比,采用递归摘要的检索方法在多项任务上实现了显著性能提升。在涉及复杂多步推理的问答任务中,我们取得了最先进成果;例如,将RAPTOR检索与GPT-4结合使用时,在QuALITY基准测试中的绝对准确率较此前最佳结果提升了20%。