Reproduce “AdaComp: Extractive Context Compression with Adaptive Predictor for Retrieval-Augmented Large Language Models” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Qianchi Zhang, Hainan Zhang, Liang Pang, Hongwei Zheng, Zhiming Zheng

AdaComp, an extractive context compression method for Retrieval-Augmented Generation (RAG) systems, adaptively determines the optimal number of retrieved documents to include as context. This approach maintains or improves RAG accuracy across multiple QA benchmarks while significantly reducing the average number of input tokens for Large Language Models; for instance, achieving 40.13 Exact Match on Natural Questions with an average of 3.66 documents.

Key insights

  • RAG performance exhibits a 'sweet spot' where performance initially increases with more documents but declines due to noise beyond an optimal point, underscoring the need for adaptive selection.
  • An adaptive predictor, even with an approximate 65% exact accuracy, reliably estimates the required context level, with predictions typically within a margin of two documents from the true optimum.
  • Adaptive context compression enhances robustness, allowing the system to retain more context for complex queries or suboptimal retrievals, thereby preventing failures from over-compression.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.