← Back to article

Equation 36 · Naive, Graph, and Agentic: A Systems Comparison of RAG Architectures

What does this equation mean?

Ltotal=Lenc+∑i=1k(Lretrieve(i)+LLLM(i)).L_{\text{total}} = L_{\text{enc}} + \sum_{i=1}^{k} \left( L_{\text{retrieve}}^{(i)} + L_{\text{LLM}}^{(i)} \right).

Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.

Inputs and operationsL_enc + sum_i=1^k ( L_retrieve^(i) + L_LLM^(i) )
Result or conditionL_total
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.

Read it piece by piece

LtotalL_{\text{total}}

Symbol L_total

LtL_total is part of the quantity the equation computes from the expression on the right.

Understand this part →

LencL_{\text{enc}}

Symbol L_enc

the writing.

Understand this part →

ii

Symbol i

i appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.

Understand this part →

kk

Symbol k

k appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.

Understand this part →

Lretrieve(i)L_{\text{retrieve}}^{(i)}

Symbol L_retrieve^(i)

LrL_retrieve^(i) is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

LLLM(i)L_{\text{LLM}}^{(i)}

Symbol L_LLM^(i)

LLL_LLM^(i) is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
addition

addition

Add the term after the plus sign to the term or group before it.

Understand this part →

subscript

subscript

The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.

Understand this part →

superscript

superscript

A raised number can be a power. When it is a label or bound, it selects a case or the upper limit of a sum; the formula’s structure distinguishes these uses.

Understand this part →

See an illustrated explanation →
i=1i=1

Starting index or lower bound: i=1

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Understand this part →

kk

Ending index or upper bound: k

This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.

Understand this part →

How to interpret it

Read it with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

A single latency model makes the difference between the first three rows and the last two concrete. Writing LencL_{\text{enc}} for query encoding, and Lretrieve(i)L_{\text{retrieve}}^{(i)} and LLLM(i)L_{\text{LLM}}^{(i)} for the retrieval and generation cost of round i , Ltotal=Lenc+∑i=1k(Lretrieve(i)+LLLM(i))L_{\text{total}} = L_{\text{enc}} + \sum_{i=1}^{k} \left( L_{\text{retrieve}}^{(i)} + L_{\text{LLM}}^{(i)} \right). For naive and hybrid RAG, k = 1 by construction — the sum has exactly one term, and total latency is boundable in advance for any query. For iterative RAG, k is a small integer set by a heuristic or a step cap chosen by the system builder, so the worst case is known even though the typical case varies with question difficulty. For agentic RAG, k is a random variable generated by the policy itself at run time, and its…
Read the full surrounding passage
A single latency model makes the difference between the first three rows and the last two concrete. Writing LencL_{\text{enc}} for query encoding, and Lretrieve(i)L_{\text{retrieve}}^{(i)} and LLLM(i)L_{\text{LLM}}^{(i)} for the retrieval and generation cost of round i , Ltotal=Lenc+∑i=1k(Lretrieve(i)+LLLM(i))L_{\text{total}} = L_{\text{enc}} + \sum_{i=1}^{k} \left( L_{\text{retrieve}}^{(i)} + L_{\text{LLM}}^{(i)} \right). For naive and hybrid RAG, k = 1 by construction — the sum has exactly one term, and total latency is boundable in advance for any query. For iterative RAG, k is a small integer set by a heuristic or a step cap chosen by the system builder, so the worst case is known even though the typical case varies with question difficulty. For agentic RAG, k is a random variable generated by the policy itself at run time, and its distribution is exactly what the operator does not control without adding an external cap. The same formula describes all five families; what changes is only where k comes from, and that difference is the whole of the engineering distinction between “a pipeline with a loop in it” and “a policy that decides how much to loop.”

Read the equation in its article →

Sources cited in the article section

These citations give research context. Read each source to check which claims it supports.

Return to Naive, Graph, and Agentic: A Systems Comparison of RAG Architectures

See this formula across 1 published context →

Browse the mathematical compendium →