English

Context Embeddings for Efficient Answer Generation in RAG

Computation and Language 2024-10-30 v3 Information Retrieval

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.

Keywords

Cite

@article{arxiv.2407.09252,
  title  = {Context Embeddings for Efficient Answer Generation in RAG},
  author = {David Rau and Shuai Wang and Hervé Déjean and Stéphane Clinchant},
  journal= {arXiv preprint arXiv:2407.09252},
  year   = {2024}
}

Comments

10 pages

R2 v1 2026-06-28T17:38:38.680Z