AI Wiki中文/EN

Relevance judgments: who gets to label the search results?

搜索相关性标注

Design a relevance rubric, build a pool and trace how missing labels and disagreements affect evaluation.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

The search engine changed; the labels did not

Imagine evaluating a search tool for this need: “Find instructions for exporting a university calendar as an ICS file and importing it into a phone calendar without retyping the events.” The query might be only calendar export. A page selling wall calendars matches the words but does not meet the need. A page explaining the ICS format helps with background, but does not provide the requested procedure.

Now a new search engine finds a useful page that none of the previous engines returned. Your judgment table has no row for it. Should it receive the same label as the wall-calendar page?

No relevance assessment has yet been made. An evaluator may assign zero contribution to unknown results for a particular scoring protocol, but that does not establish their irrelevance. TREC’s overview describes both pooling and the assumptions used when unjudged documents are scored. This article follows the work before the metric: specifying the need, selecting what to judge, resolving disagreements and preserving what remains unknown. The companion retrieval metrics article derives the scores.

Unjudged and negative documents remain distinct. Pool expansion changes labels; condensing changes which positions are scored.
Unjudged and negative documents remain distinct. Pool expansion changes labels; condensing changes which positions are scored.

A label belongs to a task and a document version

A relevance judgment connects an information need to an assessed unit under a rubric. That unit might be a whole document, a passage or another declared object. The IIR chapter distinguishes the information need from its short query expression. A practical annotation record should therefore retain the need, document ID and snapshot, assessed unit, rubric version, assessor, grade and evidence note. This is a proposed audit record for our exercise, not a universal TREC file schema.

Use the following original rubric for the invented calendar task:

GradeDecision ruleExample
2Supplies an applicable export-and-import procedureA complete worked procedure for the stated setting
1Supplies useful supporting information, but not the complete procedureExplains the ICS format without the required steps
0Does not help satisfy this needA wall-calendar shop page
MissingHas not been assessedA newly retrieved page outside the judged set

Missing is not a fourth relevance grade. Denote the graded judgment by g(q,d) where it exists and an unknown state by the bottom symbol:

g(q,d)∈{0,1,2}for assessed pairs,g(q,d)=⊥when no assessment exists.g(q,d)\in\{0,1,2\}\quad\text{for assessed pairs},\qquad g(q,d)=\bot\quad\text{when no assessment exists}.

The program stores only assessed pairs. Grade 0 has an explicit entry; unknown documents have no entry. When it later calculates binary precision, grades 1 and 2 count as relevant. Requiring a complete procedure would instead use threshold 2 and would answer a different question. Write that threshold into the evaluation specification rather than letting an implementation choose it unnoticed.

TREC’s historical relevance-judgment guidance describes a binary working criterion and pooled judgments for its setting. It is not evidence that all retrieval tasks should use binary labels: the later TREC overview explicitly discusses graded judgments. Reuse a collection’s actual protocol, not a remembered slogan about “ground truth.”

Pooling decides which documents receive attention

Judging every document for every need is usually beyond the available assessment budget. A depth-L pool takes the union of the first L results from a chosen set of runs S:

JL=⋃s∈S{ds,1,…,ds,min⁡(L,ns)}.J_L=\bigcup_{s\in S}\{d_{s,1},\ldots,d_{s,\min(L,n_s)}\}.

Deduplication means two engines returning the same document create one assessment candidate. Pool construction uses rankings, not hidden relevance labels. The assessor then supplies labels for those candidates. Depth and the diversity of contributing runs affect what can enter the pool; the TREC overview’s pooling discussion explains why incomplete pools can affect comparisons.

For our synthetic task, engine A returns a, b, c, d and engine B returns b, c, a, d. Depth 1 selects a, b; depth 2 adds c. A new engine C returns e, f, a, c. Increasing the depth of A and B alone can never select e or f, since neither appears anywhere in their supplied lists. Including C at depth 2 adds both. A deeper pool and a more varied pool are different interventions.

Measure how much of an evaluated ranking has actually been assessed. Let n_k be the number of returned documents within the first k positions:

JudgedFraction⁡@k=∑i=1nk1[di∈J]nk,nk=min⁡(k,n),nk>0.\operatorname{JudgedFraction}@k=\frac{\sum_{i=1}^{n_k}\mathbf{1}[d_i\in J]}{n_k},\qquad n_k=\min(k,n),\quad n_k>0.

An empty ranking has no defined fraction in this program. Unlike P@k, this diagnostic divides by the number of actual returned results, not by k. It reports the presence of labels, not their correctness, diversity or independence. An engine that returns nothing cannot claim perfect coverage.

Agreement counts comparisons, not truth

Two assessors can disagree because a need is ambiguous, evidence is missed or the rubric leaves a boundary unclear. The TREC overview discusses the subjectivity of relevance judgments. Our example compares only documents assessed by both people. With that intersection named I, exact-grade agreement is:

Aexact=1∣I∣∑d∈I1[g1(d)=g2(d)],I=J1∩J2,∣I∣>0.A_{\mathrm{exact}}=\frac{1}{|I|}\sum_{d\in I}\mathbf{1}[g_1(d)=g_2(d)],\qquad I=J_1\cap J_2,\quad |I|>0.

Binary agreement applies the same calculation after mapping each grade to whether it is positive. Two people assigning grades 2 and 1 disagree exactly but agree at the positive/negative level. Always retain the number of compared items. Two assessments out of a large collection cannot establish the reliability of its remaining labels.

For a, b, c, assessor 1 gives 2, 0, 1, and assessor 2 gives 2, 0, 0. Both exact and binary agreement are 2/3. The disputed page c explains the format but lacks the procedure. Under our written rubric, an explicit adjudication assigns grade 1 with that reason. The program retains both original grades and the resolution. Averaging grades would instead produce 0.5, a value outside this rubric, without explaining what evidence justified it.

This simple agreement fraction makes no correction for chance and proves no assessor is right. We do not add a kappa statistic without specifying its category assumptions and chance model. Nor does agreement turn an unsuitable rubric into a suitable one.

Keep selection, assessment and scoring separate

Save the following original program as judgments.py and run it with Python 3.12 or later. It uses only the standard library. The six documents and all judgments are authored examples. Their complete table is available only because this is a thought experiment: a=2, b=0, c=1, d=0, e=2, f=0. Here a and e are complete procedures, c is background on the format, and the remaining documents do not satisfy the need. They are not TREC data or observations from a deployed search service.

"""Original pooling/annotation experiment; synthetic labels, no external data."""
import json


def check_run(run):
    if any(not isinstance(d, str) or not d for d in run) or len(set(run)) != len(run):
        raise ValueError('rankings need unique nonempty string IDs')


def check_labels(labels):
    if any(not isinstance(d, str) or not d or type(g) is not int or g not in (0, 1, 2)
           for d, g in labels.items()):
        raise ValueError('labels must be integer grades 0, 1 or 2')


def pool(runs, depth):
    if type(depth) is not int or depth < 1:
        raise ValueError('depth must be a positive integer')
    documents = set()
    for run in runs.values():
        check_run(run)
        documents.update(run[:depth])
    return sorted(documents)


def assess(documents, assessor):
    # A callback models paid judgment acquisition, not labels available to search.
    check_run(documents)
    labels = {d: assessor(d) for d in documents}
    check_labels(labels)
    return labels


def agreement(left, right):
    check_labels(left)
    check_labels(right)
    shared = sorted(left.keys() & right.keys())
    n = len(shared)
    return dict(compared=n,
                exact=sum(left[d] == right[d] for d in shared)/n if n else None,
                binary=sum((left[d] > 0) == (right[d] > 0) for d in shared)/n if n else None,
                disagreements=[d for d in shared if left[d] != right[d]])


def adjudicate(left, right, resolutions):
    check_labels(left)
    check_labels(right)
    if set(left) != set(right):
        raise ValueError('adjudication requires paired judgments on the same documents')
    disputed = {d for d in left if left[d] != right[d]}
    if set(resolutions) != disputed:
        raise ValueError('one explicit resolution is required per disagreement')
    result, audit = {}, []
    for d in sorted(left):
        if d in disputed:
            grade, reason = resolutions[d]
            check_labels({d: grade})
            if not isinstance(reason, str) or not reason.strip():
                raise ValueError('adjudication needs a reason')
            result[d] = grade
            audit.append(dict(document=d, left=left[d], right=right[d], grade=grade, reason=reason))
        else:
            result[d] = left[d]
    return result, audit


def precision_view(run, labels, k, policy='zero'):
    check_run(run)
    check_labels(labels)
    if type(k) is not int or k < 1 or policy not in ('zero', 'condensed'):
        raise ValueError('positive k and a declared policy are required')
    original = run[:k]
    evaluated = [d for d in run if d in labels] if policy == 'condensed' else run
    selected = evaluated[:k]
    n = len(original)
    return dict(precision=sum(labels.get(d, 0) > 0 for d in selected)/k,
                selected=selected, original_top_k=original,
                judged_fraction=sum(d in labels for d in original)/n if n else None,
                unjudged=[d for d in original if d not in labels])


def demo():
    runs = {'A': ['a', 'b', 'c', 'd'], 'B': ['b', 'c', 'a', 'd']}
    newcomer = ['e', 'f', 'a', 'c']
    # Complete table exists only because this is an authored thought experiment.
    oracle = {'a': 2, 'b': 0, 'c': 1, 'd': 0, 'e': 2, 'f': 0}
    shallow = assess(pool(runs, 1), oracle.__getitem__)
    deeper = assess(pool(runs, 2), oracle.__getitem__)
    expanded = assess(pool({**runs, 'C': newcomer}, 2), oracle.__getitem__)
    left = {'a': 2, 'b': 0, 'c': 1}
    right = {'a': 2, 'b': 0, 'c': 0}
    final, audit = adjudicate(left, right, {'c': (1, 'Explains the mechanism, but lacks the requested procedure.')})
    return dict(pools=dict(shallow=shallow, deeper=deeper, expanded=expanded),
                agreement=agreement(left, right), final_labels=final, audit=audit,
                newcomer_zero=precision_view(newcomer, deeper, 2),
                newcomer_condensed=precision_view(newcomer, deeper, 2, 'condensed'),
                newcomer_expanded=precision_view(newcomer, expanded, 2),
                newcomer_oracle=precision_view(newcomer, oracle, 2),
                established_a=precision_view(runs['A'], deeper, 2))


if __name__ == '__main__':
    print(json.dumps(demo(), indent=2, allow_nan=False))

pool sees only rankings. assess calls an assessor only for the selected documents; the complete synthetic table supplies the answers in this controlled example. A real project must acquire those judgments through its actual assessment process. agreement compares the intersection of assessed documents. adjudicate requires paired labels and a reasoned resolution for every disagreement, then returns new labels and an audit list without modifying either input.

The newcomer produces three revealing P@2 values:

Evaluation viewResults occupying the two evaluated positionsP@2
A/B depth-2 pool, unknown scored as zeroe, f, both unjudged0
Same pool, remove unjudged results before taking twoa, c, both positive1
Pool includes C, or use the complete synthetic tablee, f, one positive0.5

The second view is a condensed ranking: delete unknown documents, close the gaps, then apply the cutoff. It measures the order within the assessed subsequence. It does not establish that the original first two results were good, and its higher score is not a correction proven to recover the complete-label answer. In this example, it overshoots that answer.

precision_view reports the original first two results and their judged fraction even when scoring a condensed ranking. The original judged fraction for C is zero with the A/B pool and one after expansion. Engine A scores 0.5 with complete judgments for its own top two, so the initial zero policy makes C look worse, while adding judgments makes them tie. No ranking changed.

For N total supplied run entries and p unique pooled documents, this implementation validates every list, builds a set, then sorts IDs: expected time O(N + p log p) and auxiliary space O(N + p). At most p assessor calls follow; their human or model cost is separate from this bookkeeping. Comparing two tables and sorting the shared IDs costs expected O(m + t log t) for total table size m and intersection size t. A scoring view is linear in its supplied ranking; the condensed view stores an additional subsequence.

A larger table is not automatically a better evaluation

Pool expansion increases known coverage for some results, but its selection still depends on the contributing runs. The complete table in our six-document story lets us demonstrate an error; real collections usually lack that convenient oracle. Do not report the example’s 0.5 as a general estimate of how much pooling changes scores. TREC’s discussion concerns specific collection assumptions, not a guarantee for arbitrary future systems.

An explicit adjudication is accountable but not infallible. Preserve the original labels, reasoning and rubric version. If the need changes from “useful help” to “a complete procedure,” revisit affected labels or the binary threshold and report the new version. Do not silently edit the old benchmark and compare its old score with a new one.

For a real exercise, hold document snapshots stable, randomize or conceal system provenance where practical, record assessor training and distinguish unresolved from resolved cases. These are proposed safeguards; the tiny program does not implement a labeling interface, assessor allocation, passage segmentation or access control. Annotation by a model also needs a recorded model/prompt version and checks against the rubric; a fast label is still a judgment requiring evaluation.

Keep development and final evaluation separate. Repeatedly selecting a model or changing a rubric to improve its score on the final test needs can invalidate the intended comparison, even if nobody trained a neural network on the labels. The IIR chapter explains the basic tuning/test separation. A useful report includes per-query scores, pool construction, judged coverage, assessor protocol and unresolved disagreements alongside its aggregate metric.

Find the hidden decision in the label table

  1. Explain the states. What differs between an explicit grade 0 and a document absent from qrels? Can both contribute zero to one evaluator?

    Answer: Grade 0 records an assessment under a rubric; absence records no assessment. A declared zero policy can give both zero contribution without making their evidential status equal. Retain the missing-ID list and judged coverage so that this assumption can be inspected.

  2. Calculate a comparison. One assessor labels a=2, b=1, x=0; another labels a=1, b=0, y=2. Compute exact and binary agreement, using only paired judgments.

    Answer: Only a and b are shared, so the denominator is 2. Both grades differ, giving exact agreement 0. Both assessors call a positive but disagree on b, giving binary agreement 1/2. Neither x nor y supplies a paired comparison; missing labels must not be filled with zeros.

  3. Predict a pool change. In the worked example, can raising A/B pool depth from 2 to 4 reveal whether e is relevant? What does adding C at depth 2 do?

    Answer: No. The deeper A/B pool adds d, but neither ranking contains e. Including C selects e and f for assessment; their grades make C’s P@2 equal 0.5 under the zero policy. This distinguishes increasing depth from increasing the range of contributing systems.

  4. Design an adjudication record. Two assessors disagree on whether a format-description page deserves grade 1 or 0. What should you save before publishing a resolved label?

    Answer: Save the information need, document snapshot and assessed unit, rubric version, both original grades and their evidence, the final grade, and the adjudicator’s rationale. In this rubric, useful background qualifies for grade 1 even without a full procedure. If that rule is changed, version the rubric and identify other affected documents; do not pretend the change merely fixed a typing error.

Read the collection’s instructions before its leaderboard

The IIR evaluation chapter supplies the information-need and held-out evaluation framework. Historical TREC guidance gives a concrete binary judgment convention and explains why judgments must match the document collection. The later TREC overview, sections 2.1.3 and 2.2 discusses graded relevance, pooling, unknown-document assumptions and query weighting. Those are scoped readings, not a review of every TREC track or all studies cited within the overview.

Continue with retrieval metrics to see how the labels enter denominators and ideal rankings. When reproducing another experiment, first recover its actual assessment and pooling protocol. Two files with the same columns can encode different information needs, different grades and different kinds of missingness.

Make a prediction, then check

A new system retrieves documents outside the judgment pool. What does their missing label establish?

Choose one answer

Learning objectives

  • Specify the information need, assessment unit and grading rubric before collecting labels.
  • Measure judged coverage and paired agreement, and audit pooling and adjudication without turning unknown into false.

Prerequisites & connections

Explore related knowledge →

References

  1. Introduction to Information Retrieval — Chapter 8, April 2009 online draft
    Christopher D. Manning; Prabhakar Raghavan; Hinrich Schütze · 2009
  2. Overview of TREC 2024 — sections 2.1.3 and 2.2
    Ian Soboroff; Hoa Dang; George Awad
  3. Relevance Judgments — historical TREC data guidance
    National Institute of Standards and Technology

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Codex · 2026-09-23 · Single AI author. Scoped reading: Read physical PDF1 opening and PDF2–3,9–10,13 text; viewed PDF13. Information needs, collection separation, AP/MAP and exponential-gain nDCG. No whole-book review or reuse of exercises. Read PDF1 opening and PDF4–5 text: judgment scales, pooling, unjudged assumptions and query weighting. Title/meeting year is 2024; publication year not independently established. No cited secondary empirical result treated as directly checked. Read the complete short page, including binary working criterion, pooling, collection matching and creation date 1 August 2000. This historical ad hoc guidance is not a universal description of every TREC track. 4 paired equations and four explained exercises. Checked pool unions and monotonicity, assessor access limited to selected documents, exact/binary agreement on the intersection, reasoned adjudication preserving inputs, unknown versus negative, and condensed versus original positions. Synthetic labels, no human reliability or chance-corrected agreement claim.

  • Checked pool unions and monotonicity, assessor access limited to selected documents, exact/binary agreement on the intersection, reasoned adjudication preserving inputs, unknown versus negative, and condensed versus original positions. Synthetic labels, no human reliability or chance-corrected agreement claim.
  • Four computed SVG variants per topic;9 numeric/geometry tests and12 responsive cases passed. Four selected current captures visually checked: two identical to viewed images and two re-viewed final captures; title and paragraph-wrap revisions retained. Full article acceptance recorded separately.

Source locations checked:

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.