Retrieval-Augmented Generation can be modeled as a communication system over a noisy channel. The query encodes a request for information, the retrieval system transmits relevant documents over a channel with finite bandwidth (context window) and noise (irrelevant or partially relevant results), and the LLM decoder reconstructs the answer. Within this framework, information theory provides fundamental bounds on the achievable performance of any RAG system — bounds that hold regardless of advances in embedding quality, LLM capability, or retrieval algorithm sophistication.

We derive these bounds and measure how close production RAG systems operate to the information-theoretic optimum across enterprise deployments.

The RAG Channel Model

A RAG system operates as follows. Given a query Q (drawn from distribution Q), the retriever selects a set of k documents DR = {d1, ..., dk} from a corpus C with |C| = N. The LLM generator G produces answer A conditioned on Q and DR. The end-to-end mutual information is I(Q; A) = I(Q; DR) + I(Q; A | DR), where the first term captures retrieval efficiency and the second captures the LLM's ability to extract information from retrieved documents.

By the data processing inequality, I(Q; A) ≤ min(I(Q; DR), I(DR; A)). This gives us two bottlenecks: the retrieval channel capacity and the generation channel capacity. Optimizing a RAG system requires addressing both simultaneously.

Fundamental Bound: The maximum achievable QA-F1 score for a RAG system operating on corpus C with context window W is bounded by C(W) = (W / Havg) à (1 − δ), where Havg is the average entropy per token of the relevant documents and δ is the irreducible noise from the retrieval process. For typical enterprise documents with Havg ≈ 3.2 bits/token and W = 4096 tokens, the channel capacity is approximately 1,280 bits of relevant information per query — equivalent to roughly 160 factual statements.

Retrieval Efficiency: The k vs. Precision Trade-off

Increasing the number of retrieved documents k improves recall but reduces precision and consumes context window capacity. We derive the optimal k* that maximizes I(Q; A) for a given retrieval precision function P(k) and context window W.

1
0.42
0.42
3
0.67
0.67
5
0.81
0.81
10
0.91
0.91
20
0.96
0.96

The inflection point occurs at k = 5-7 for most enterprise domains. Beyond k = 10, the marginal gain in I(Q; DR) is offset by the noise penalty: irrelevant documents consume context window budget without contributing information, and the LLM's attention mechanism is increasingly distracted. At k = 20, generation F1 is lower than at k = 3, despite retrieving more total relevant information.

The Lost-in-the-Middle Effect: An Information-Theoretic Explanation

Liu et al. (2024) documented that LLMs exhibit a U-shaped performance curve across context position — information in the middle of long contexts is less likely to influence generation. This is not merely a model architecture artifact. From an information-theoretic perspective, the self-attention mechanism implements a soft information bottleneck where the effective bandwidth to each position is inversely proportional to the total context length.

Position 0-10% (Start)
0.82
Avg. attention weight per relevant token
Position 45-55% (Middle)
0.31
Avg. attention weight per relevant token
Position 90-100% (End)
0.67
Avg. attention weight per relevant token
Effective Capacity Loss
62%
Information at middle vs start positions
0.82
Position 0-10% (Start)
Avg. attention weight per relevant token
0.31
Position 45-55% (Middle)
Avg. attention weight per relevant token
0.67
Position 90-100% (End)
Avg. attention weight per relevant token