← Back to article

Equation 11 · Building Production RAG: An Advanced Technical Guide

What does this equation mean?

Ltotal≈Lretrieve+k⋅ℓrerank+Lgenerate,L_{\mathrm{total}} \approx L_{\mathrm{retrieve}} + k \cdot \ell_{\mathrm{rerank}} + L_{\mathrm{generate}},

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.

This equation gives an approximation: it relates the quantities while allowing an approximation. 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_{\mathrm{total}}

Symbol L_total

LtL_total is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.

Understand this part →

LretrieveL_{\mathrm{retrieve}}

Symbol L_retrieve

LrL_retrieve is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.

Understand this part →

kk

Symbol k

the number of candidates handed to the reranker.

Understand this part →

LgenerateL_{\mathrm{generate}}

Symbol L_generate

LgL_generate is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.

Understand this part →

≈

≈

Approximately equal to; the equality is not exact.

Understand this part →

multiplication

multiplication

Multiply the quantities on either side.

Understand this part →

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 →

How to interpret it

Its accuracy depends on the assumptions and range of use described in the article.

What the article says around this equation

The latency consequence follows from where the reranker sits in the request path. A simplified but useful model of end-to-end latency is Ltotal≈Lretrieve+k⋅ℓrerank+LgenerateL_{\mathrm{total}} \approx L_{\mathrm{retrieve}} + k \cdot \ell_{\mathrm{rerank}} + L_{\mathrm{generate}}. where k is the number of candidates handed to the reranker and ℓrerank\ell_{\mathrm{rerank}} is the marginal latency per candidate scored. Recall generally improves as k grows, because a larger candidate set is more likely to contain the passage that actually answers the query — but k multiplies the one latency term a team most directly controls, so it is not a value to leave at a copied default. It is a dial to be set from a measured recall-versus- k curve against an explicit latency budget, the same way the hybrid weight α\alpha is set from a…
Read the full surrounding passage
The latency consequence follows from where the reranker sits in the request path. A simplified but useful model of end-to-end latency is Ltotal≈Lretrieve+k⋅ℓrerank+LgenerateL_{\mathrm{total}} \approx L_{\mathrm{retrieve}} + k \cdot \ell_{\mathrm{rerank}} + L_{\mathrm{generate}}. where k is the number of candidates handed to the reranker and ℓrerank\ell_{\mathrm{rerank}} is the marginal latency per candidate scored. Recall generally improves as k grows, because a larger candidate set is more likely to contain the passage that actually answers the query — but k multiplies the one latency term a team most directly controls, so it is not a value to leave at a copied default. It is a dial to be set from a measured recall-versus- k curve against an explicit latency budget, the same way the hybrid weight α\alpha is set from a measured recall curve rather than assumed.

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 Building Production RAG: An Advanced Technical Guide

See this formula across 1 published context →

Browse the mathematical compendium →