Equation 6 · What Actually Happens Inside a Very Long Claude Context Window
What does this equation mean?
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 mathematical expression combines the displayed quantities; its precise role follows from the surrounding article text. 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
Symbol C_LC
C is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol O
O is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol d
d is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol C_RAG
AG is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
Symbol k
k is a part of this expression. Its role is fixed by the surrounding article and by the operations shown in the formula.
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.
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.
See an illustrated explanation →How to interpret it
Read this expression with the definitions, units, and assumptions supplied by the article.
What the article says around this equation
It is worth being precise about what “just use a longer context” actually replaces, because the alternative is not vague. Retrieval-augmented generation, as originally formalised by Patrick Lewis and colleagues, pairs a parametric model with a separate non-parametric retrieval step: a retriever selects a small number of passages likely to be relevant to a query from a much larger corpus, and only those selected passages, not the whole corpus, are placed in the model’s context for generation [ 14 ] . This publication’s own reporting on retrieval-augmented systems covers that mechanism, its indexing choices, and its failure modes at length elsewhere; the point relevant here is narrower and…
Read the full surrounding passage
It is worth being precise about what “just use a longer context” actually replaces, because the alternative is not vague. Retrieval-augmented generation, as originally formalised by Patrick Lewis and colleagues, pairs a parametric model with a separate non-parametric retrieval step: a retriever selects a small number of passages likely to be relevant to a query from a much larger corpus, and only those selected passages, not the whole corpus, are placed in the model’s context for generation [ 14 ] . This publication’s own reporting on retrieval-augmented systems covers that mechanism, its indexing choices, and its failure modes at length elsewhere; the point relevant here is narrower and purely architectural. Long-context use skips the selection step entirely: the entire candidate material goes into the window, and the burden of finding what matters is placed on attention at inference time rather than on an index built in advance. Writing n for the number of tokens placed directly in context and k for the number of tokens a retriever would instead have selected, the quadratic cost derived above means the two approaches sit in different complexity regimes for handling the same underlying material: . That gap is not an incidental efficiency detail. It is the reason retrieval-augmented systems existed as a technique before million-token windows did, and it is why the comparison between the two approaches remains a live, actively contested research question rather than a settled one, even after context windows grew by orders of magnitude.
Sources cited in the surrounding passage
These citations give research context. Read each source to check which claims it supports.
Return to What Actually Happens Inside a Very Long Claude Context Window