---
title: "More Documents, Same Length: Isolating the Challenge of Multiple Documents in RAG"
canonical_url: "https://www.modelscope.cn/papers/123851"
md_url: "https://www.modelscope.cn/papers/123851.md"
arxiv_id: 2503.04388
published: 2025-03-06
last_updated: 2025-03-06
authors:
  - "Shahar Levy"
  - "Nir Mazor"
  - "Lihi Shalmon"
  - "Michael Hassid"
  - "Gabriel Stanovsky"
model_developer: "希伯来大学耶路撒冷分校工程与计算机科学学院"
domain:
  - "自然语言处理"
  - "深度学习"
type:
  - "自然语言处理"
  - "深度学习"
  - "Computation and Language (cs.CL)"
arxiv_url: "https://arxiv.org/abs/2503.04388"
pdf_url: "https://arxiv.org/pdf/2503.04388.pdf"
code_link: "https://github.com/shaharl6000/MoreDocsSameLen"
---

# More Documents, Same Length: Isolating the Challenge of Multiple Documents in RAG

> Retrieval-augmented generation (RAG) provides LLMs with relevant documents. Although previous studies noted that retrieving many documents can degrade performance, they did not isolate how the quantity of documents affects performance while controlling for…

「More Documents, Same Length: Isolating the Challenge of Multiple Documents in RAG」是 ModelScope 魔搭社区收录的论文，arXiv 2503.04388，作者为 Shahar Levy, Nir Mazor, Lihi Shalmon et al.，发表于 2025-03-06，属于 自然语言处理、深度学习 领域。

- **ArXiv**: 2503.04388
- **Published**: 2025-03-06
- **Authors**: Shahar Levy, Nir Mazor, Lihi Shalmon, Michael Hassid, Gabriel Stanovsky
- **Developer**: 希伯来大学耶路撒冷分校工程与计算机科学学院
- **Domain**: 自然语言处理, 深度学习
- **ArXiv URL**: https://arxiv.org/abs/2503.04388
- **PDF**: https://arxiv.org/pdf/2503.04388.pdf
- **Code**: https://github.com/shaharl6000/MoreDocsSameLen

Source: https://www.modelscope.cn/papers/123851

---

> 固定上下文长度下，多文档检索对大型语言模型性能的影响

## 摘要

本文探讨了检索增强生成（RAG）系统中，当保持上下文长度不变时，增加检索文档数量对大型语言模型（LLM）性能的影响。以往研究表明，检索大量文档可能会降低RAG系统的性能，但这些研究并未严格控制上下文长度。作者通过构建自定义数据集，从多跳问答任务中衍生而来，在保持上下文长度和相关信息位置不变的情况下，改变文档数量，评估了不同语言模型的表现。实验结果表明，增加文档数量确实会对LLM的性能产生负面影响，即使在固定上下文长度下也是如此。此外，处理多个文档与处理长上下文是两个不同的挑战，前者涉及冗余信息、冲突信息及文档间隐含关系的处理。实验结果显示，减少文档数量可以显著提高模型性能，特别是在某些模型如Llama-3.1和Gemma-2上表现尤为明显。然而，Qwen-2模型则未受此影响，可能表明其在处理多文档集合方面具有优势。本研究为未来优化RAG系统提供了重要参考，强调了在设计RAG系统时应考虑检索文档的数量，并探索新的多文档处理方法。

## Abstract

Retrieval-augmented generation (RAG) provides LLMs with relevant documents. Although previous studies noted that retrieving many documents can degrade performance, they did not isolate how the quantity of documents affects performance while controlling for context length. We evaluate various language models on custom datasets derived from a multi-hop QA task. We keep the context length and position of relevant information constant while varying the number of documents, and find that increasing the document count in RAG settings poses significant challenges for LLMs. Additionally, our results indicate that processing multiple documents is a separate challenge from handling long contexts. We also make the datasets and code available: this https URL .
