Context Embeddings for Efficient Answer Generation in RAG

David Rau, Shuai Wang, Hervé Déjean, Stéphane Clinchant
7/12/2024
cs.CLcs.IR

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Retrieval-Augmented Generation (RAG) allows overcoming the limited knowledge of LLMs by extending the input with external information. As a consequence, the contextual inputs to the model become much longer which slows down decoding time directly translating to the time a user has to wait for an answer. We address this challenge by presenting COCOM, an effective context compression method, reducing long contexts to only a handful of Context Embeddings speeding up the generation time by a large margin. Our method allows for different compression rates trading off decoding time for answer quality. Compared to earlier methods, COCOM allows for handling multiple contexts more effectively, significantly reducing decoding time for long inputs. Our method demonstrates a speed-up of up to 5.69 $\times$ while achieving higher performance compared to existing efficient context compression methods.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{rau2024context,
  title  = {Context Embeddings for Efficient Answer Generation in RAG},
  author = {David Rau and Shuai Wang and Hervé Déjean and Stéphane Clinchant},
  year   = {2024},
  eprint = {2407.09252},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.09252v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.09252.svg)](https://codeofpaper.com/paper/2407.09252)

Discussion