← Back to article

Equation 5 · Measuring What a RAG System Retrieves, Not Just What It Answers

What does this equation mean?

MRR=1∣Q∣∑q=1∣Q∣1rankq\mathrm{MRR} = \frac{1}{|Q|}\sum_{q=1}^{|Q|} \frac{1}{\mathrm{rank}_q}

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.

Start with1
Divide by|Q|
This relates toMRR
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

QQ

Symbol Q

the averaged over a query set.

Understand this part →

qq

Symbol q

q occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Understand this part →

=

=

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

Understand this part →

See an illustrated explanation →
fraction

fraction

Divide the expression above the line by the one below it.

Understand this part →

See an illustrated explanation →
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 →
11

Numerator: 1

The complete quantity above the fraction bar.

Understand this part →

∣Q∣|Q|

Denominator: |Q|

The complete quantity below the fraction bar; it must be nonzero for this division.

Understand this part →

q=1q=1

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.

Understand this part →

∣Q∣|Q|

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.

Understand this part →

11

Numerator: 1

The complete quantity above the fraction bar.

Understand this part →

rankq\mathrm{rank}_q

Denominator: rank_q

The complete quantity below the fraction bar; it must be nonzero for this division.

Understand this part →

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: MRR=1∣Q∣∑q=1∣Q∣1rankq\mathrm{MRR} = \frac{1}{|Q|}\sum_{q=1}^{|Q|} \frac{1}{\mathrm{rank}_q}. averaged over a query set Q , where rankq\mathrm{rank}_q 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: MRR=1∣Q∣∑q=1∣Q∣1rankq\mathrm{MRR} = \frac{1}{|Q|}\sum_{q=1}^{|Q|} \frac{1}{\mathrm{rank}_q}. averaged over a query set Q , where rankq\mathrm{rank}_q 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.

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 Measuring What a RAG System Retrieves, Not Just What It Answers

See this formula across 1 published context →

Browse the mathematical compendium →