← Back to article

Equation 5 · From BM25 to Agentic Retrieval: A History of Retrieval-Augmented Generation

What does this equation mean?

(IDF)k=⌈log⁡2n⌉−⌈log⁡2dk⌉+1,(\mathrm{IDF})_k = \lceil \log_2 n \rceil - \lceil \log_2 d_k \rceil + 1,

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 operationslceil log_2 n rceil - lceil log_2 d_k rceil + 1
Result or condition(IDF)_k
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

kk

Symbol k

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

Understand this part →

nn

Symbol n

n is one of the signed contributions combined to compute the quantity on the left.

Understand this part →

dkd_k

Symbol d_k

dkd_k 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 →

subtraction

subtraction

Subtract the following term or group from the preceding one. A leading minus marks a negative quantity.

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

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

What the article says around this equation

Before any of this involved learning, it involved geometry. Salton, Wong, and Yang proposed representing each document as a vector of weighted index terms and ranking documents by the similarity of their vectors to a query vector, arguing that a well-separated document space — one where unrelated documents sit far apart — should correspond to better retrieval performance than a densely packed one [ 1 ] . Their paper is worth reading in the original rather than through summary, because the term-weighting scheme it specifies is exactly the ancestor of what every later retriever, sparse or dense, still does: score a term by how often it occurs locally and how rare it is globally. They define…
Read the full surrounding passage
Before any of this involved learning, it involved geometry. Salton, Wong, and Yang proposed representing each document as a vector of weighted index terms and ranking documents by the similarity of their vectors to a query vector, arguing that a well-separated document space — one where unrelated documents sit far apart — should correspond to better retrieval performance than a densely packed one [ 1 ] . Their paper is worth reading in the original rather than through summary, because the term-weighting scheme it specifies is exactly the ancestor of what every later retriever, sparse or dense, still does: score a term by how often it occurs locally and how rare it is globally. They define the inverse document frequency of a term k , for a collection of n documents in which k appears in dkd_k of them, as (IDF)k=⌈log⁡2n⌉−⌈log⁡2dk⌉+1(\mathrm{IDF})_k = \lceil \log_2 n \rceil - \lceil \log_2 d_k \rceil + 1. and combine it multiplicatively with raw term frequency so that a term scores highest when it occurs often in one document but rarely across the collection. Evaluated on three test collections in aerodynamics, medicine, and world affairs, replacing raw term-frequency weighting with this scheme, together with a term-discrimination-value model for phrase and thesaurus construction, improved average recall-precision by 17 to 50 percent depending on the collection [ 1 ] .

Read the equation in its article →

Sources cited in the surrounding passage

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

Return to From BM25 to Agentic Retrieval: A History of Retrieval-Augmented Generation

See this formula across 1 published context →

Browse the mathematical compendium →