Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG

Bowen Jin, Jinsung Yoon, Jiawei Han, Sercan Ö. Arik

arXiv:2410.05983 · 2026-07-27 공개 · arXiv · PDF

long-context training-free retrieval-augmented-generation rag llm-fine-tuning data-distribution hard-negatives retrieval-reordering

Abstract

Retrieval-augmented generation (RAG) empowers large language models (LLMs) to utilize external knowledge sources. The increasing capacity of LLMs to process longer input sequences opens up avenues for providing more retrieved information, to potentially enhance the quality of generated outputs. It is plausible to assume that a larger retrieval set would contain more relevant information (higher recall), that might result in improved performance. However, our empirical findings demonstrate that for many long-context LLMs, the quality of generated output initially improves first, but then subsequently declines as the number of retrieved passages increases. This paper investigates this phenomenon, identifying the detrimental impact of retrieved"hard negatives"as a key contributor. To mitigate this and enhance the robustness of long-context LLM-based RAG, we propose both training-free and training-based approaches. We first showcase the effectiveness of retrieval reordering as a simple yet powerful training-free optimization. Furthermore, we explore training-based methods, specifically RAG-specific implicit LLM fine-tuning and RAG-oriented fine-tuning with intermediate reasoning, demonstrating their capacity for substantial performance gains. Finally, we conduct a systematic analysis of design choices for these training-based methods, including data distribution, retriever selection, and training context length.

한국어 요약

한 줄 요약

장문 입력을 처리하는 RAG 시스템에서 "hard negatives"의 영향을 줄이기 위한 새로운 접근법을 제안한다.

핵심 기여도

핵심 아이디어

기존 RAG 연구는 일반적으로 10개 미만의 retrieval passage를 사용했으나, 장문 컨텍스트 LLM은 더 많은 정보를 포함할 수 있다. 그러나 본 연구는 retrieval 개수가 늘어날수록 성능이 감소하는 현상을 관찰했으며, 이는 "hard negatives"의 영향 때문임을 밝혔다. 이는 단순히 retrieval 개수를 늘리는 것보다, retrieval 질과 순서, 그리고 LLM의 노이즈 내성을 고려하는 새로운 설계가 필요함을 시사한다. 특히, "lost-in-the-middle" 현상을 해결하기 위해 retrieval 재정렬을 제안하며, 암묵적/명시적 미세조정을 통해 LLM이 노이즈에 강한 성능을 갖도록 유도한다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 장문 컨텍스트 LLM 기반 RAG 설계의 새로운 관점을 제시하며, retrieval 질과 순서, LLM의 노이즈 내성에 대한 중요성을 강조한다. 특히, retrieval 개수 증가가 항상 유리하지 않다는 점은 기존 RAG 설계 전략에 대한 재검토를 촉구한다. 한계로는 특정 데이터셋이나 retriever에 대한 일반화 가능성, 그리고 훈련 없이도 성능 향상이 항상 보장되지 않는 점이 있다.

실용적 활용

본 연구는 지식 기반 질문 응답, 문서 요약, 대규모 데이터 분석 등에서 RAG 시스템의 안정성과 정확도를 향상시키는 데 활용될 수 있다. 특히, LLM이 노이즈에 강한 성능을 유지하면서도 더 많은 정보를 처리할 수 있도록 설계하는 데 기여할 수 있다.