Saved in:
Bibliographic Details
Main Authors: Yu, Tan, Xu, Anbang, Akkiraju, Rama
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.01666
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913490549080064
author Yu, Tan
Xu, Anbang
Akkiraju, Rama
author_facet Yu, Tan
Xu, Anbang
Akkiraju, Rama
contents Overcoming the limited context limitations in early-generation LLMs, retrieval-augmented generation (RAG) has been a reliable solution for context-based answer generation in the past. Recently, the emergence of long-context LLMs allows the models to incorporate much longer text sequences, making RAG less attractive. Recent studies show that long-context LLMs significantly outperform RAG in long-context applications. Unlike the existing works favoring the long-context LLM over RAG, we argue that the extremely long context in LLMs suffers from a diminished focus on relevant information and leads to potential degradation in answer quality. This paper revisits the RAG in long-context answer generation. We propose an order-preserve retrieval-augmented generation (OP-RAG) mechanism, which significantly improves the performance of RAG for long-context question-answer applications. With OP-RAG, as the number of retrieved chunks increases, the answer quality initially rises, and then declines, forming an inverted U-shaped curve. There exist sweet points where OP-RAG could achieve higher answer quality with much less tokens than long-context LLM taking the whole context as input. Extensive experiments on public benchmark demonstrate the superiority of our OP-RAG.
format Preprint
id arxiv_https___arxiv_org_abs_2409_01666
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle In Defense of RAG in the Era of Long-Context Language Models
Yu, Tan
Xu, Anbang
Akkiraju, Rama
Computation and Language
Overcoming the limited context limitations in early-generation LLMs, retrieval-augmented generation (RAG) has been a reliable solution for context-based answer generation in the past. Recently, the emergence of long-context LLMs allows the models to incorporate much longer text sequences, making RAG less attractive. Recent studies show that long-context LLMs significantly outperform RAG in long-context applications. Unlike the existing works favoring the long-context LLM over RAG, we argue that the extremely long context in LLMs suffers from a diminished focus on relevant information and leads to potential degradation in answer quality. This paper revisits the RAG in long-context answer generation. We propose an order-preserve retrieval-augmented generation (OP-RAG) mechanism, which significantly improves the performance of RAG for long-context question-answer applications. With OP-RAG, as the number of retrieved chunks increases, the answer quality initially rises, and then declines, forming an inverted U-shaped curve. There exist sweet points where OP-RAG could achieve higher answer quality with much less tokens than long-context LLM taking the whole context as input. Extensive experiments on public benchmark demonstrate the superiority of our OP-RAG.
title In Defense of RAG in the Era of Long-Context Language Models
topic Computation and Language
url https://arxiv.org/abs/2409.01666