BEE-RAG: Balanced Entropy Engineering for Retrieval-Augmented Generation

Yuhao Wang, Ruiyang Ren, Yucheng Wang, Jing Liu, Wayne Xin Zhao +2 more
8/7/2025
cs.CL

No confident code implementation found for this paper.

Abstract

With the rapid advancement of large language models (LLMs), retrieval-augmented generation (RAG) has emerged as a critical approach to supplement the inherent knowledge limitations of LLMs. However, due to the typically large volume of retrieved information, RAG tends to operate with long context lengths. From the perspective of entropy engineering, we identify unconstrained entropy growth and attention dilution due to long retrieval context as significant factors affecting RAG performance. In this paper, we propose the balanced entropy-engineered RAG (BEE-RAG) framework, which improves the adaptability of RAG systems to varying context lengths through the principle of entropy invariance. By leveraging balanced context entropy to reformulate attention dynamics, BEE-RAG separates attention sensitivity from context length, ensuring a stable entropy level. Building upon this, we introduce a zero-shot inference strategy for multi-importance estimation and a parameter-efficient adaptive fine-tuning mechanism to obtain the optimal balancing factor for different settings. Extensive experiments across multiple RAG tasks demonstrate the effectiveness of BEE-RAG.

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. Any repos shown below are weak matches — 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{wang2025beerag,
  title  = {BEE-RAG: Balanced Entropy Engineering for Retrieval-Augmented Generation},
  author = {Yuhao Wang and Ruiyang Ren and Yucheng Wang and Jing Liu and Wayne Xin Zhao and Hua Wu and Haifeng Wang},
  year   = {2025},
  eprint = {2508.05100},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.05100v2}
}

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/2508.05100.svg)](https://codeofpaper.com/paper/2508.05100)

Discussion