Equation 5 · Measuring What a RAG System Retrieves, Not Just What It Answers
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 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
Symbol q
q occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.
=
The expressions on both sides represent the same quantity under the stated assumptions.
See an illustrated explanation →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 →Denominator: |Q|
The complete quantity below the fraction bar; it must be nonzero for this division.
Starting index or lower bound: q=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.
Ending index or upper bound: |Q|
This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.
Denominator: rank_q
The complete quantity below the fraction bar; it must be nonzero for this division.
How to interpret it
With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.
What the article says around this equation
Recall at k is the simplest of the four: the fraction of relevant documents that appear anywhere in the top k results. It answers one question only — did the evidence make it into the candidate set at all — and says nothing about where within that set it landed. Mean reciprocal rank answers the positional question for the single best hit: . averaged over a query set Q , where is the position of the first relevant result for query q . Mean reciprocal rank was formalised as the primary scoring metric for the TREC-8 Question Answering track, the first large-scale evaluation of domain-independent question answering systems, where it assigned a value of 1/r to a…
Read the full surrounding passage
Recall at k is the simplest of the four: the fraction of relevant documents that appear anywhere in the top k results. It answers one question only — did the evidence make it into the candidate set at all — and says nothing about where within that set it landed. Mean reciprocal rank answers the positional question for the single best hit: . averaged over a query set Q , where is the position of the first relevant result for query q . Mean reciprocal rank was formalised as the primary scoring metric for the TREC-8 Question Answering track, the first large-scale evaluation of domain-independent question answering systems, where it assigned a value of 1/r to a ranked list of candidate answers based on the rank r of the one judged correct [ 3 ] . It rewards getting the single most useful passage near the top and is blind to everything else in the list, which is exactly the property a downstream generator that reads only the first few passages needs measured.
Sources cited in the surrounding passage
These citations give research context. Read each source to check which claims it supports.
Return to Measuring What a RAG System Retrieves, Not Just What It Answers