Reproduce “LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs -- No Silver Bullet for LC or RAG Routing” 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

Kuan Li, Liwen Zhang, Yong Jiang, Pengjun Xie, Fei Huang, Shuai Wang, Minhao Cheng

This research introduces LaRA, a new benchmark designed to systematically compare Retrieval-Augmented Generation (RAG) and Long-Context (LC) Large Language Models (LLMs) in realistic long-context scenarios. The study concludes that neither RAG nor LC is universally superior, with optimal performance depending on factors like model strength, context length, and task type, and demonstrates RAG's utility for weaker models and hallucination detection.

Key insights

  • The optimal choice between RAG and LC is highly contingent on factors such as model strength, context length, and task type, indicating "no silver bullet" solution.
  • RAG significantly improves the performance of weaker open-source models, especially at 128k context lengths, effectively mitigating the impact of increased context length on their capabilities.
  • RAG demonstrates a clear advantage in hallucination detection and exhibits greater robustness against the "lost in the middle" phenomenon compared to LC LLMs.

Summary by alphaXiv.

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