FAILURE MAP
← Case archive

FA-99506 / Vector retrieval ranking / Open access

Vector retrieval: Rank fusion starts ranks at zero · case 01

Rank fusion starts ranks at zero.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Enumerating from zero gives the first hit too much reciprocal weight.

THE FAILURE

Enumerating from zero gives the first hit too much reciprocal weight.

Unsuccessful approach: Starting at one but incrementing the denominator again depresses every rank contribution.

Case contract

Lists contain unique IDs; fuse by sum 1/(offset+one-based-rank), then ID ties.

Why this case matters

An offline vector retrieval toy model isolates one ranking contract from embedding generation, storage, and serving.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(lists, offset):
    from fractions import Fraction
    s={}
    for xs in lists:
     for rank,(ident,score) in enumerate(xs): s[ident]=s.get(ident,0)+Fraction(1,offset+rank)
    return sorted(s,key=lambda x:(-s[x],x))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('shared low rank',solve([[['a',1],['b',0]],[['b',1]]],1),['b','a'])
check('offset changes tradeoff',solve([[['a',1],['x',0],['b',0]],[['y',1],['z',0],['b',0]]],1),['a','b','y','x','z'])
check('single list order',solve([[['z',1],['a',9]]],N),['z','a'])
check('empty lists',solve([[],[]],N),[])
check('one item',solve([[['a',0]]],N),['a'])
check('two lists same id',solve([[['a',0]],[['a',0]]],N),['a'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
shared low rank['b', 'a']['b', 'a']Passed
offset changes tradeoff['a', 'y', 'b', 'x', 'z']['a', 'b', 'y', 'x', 'z']Failed
single list order['z', 'a']['z', 'a']Passed
empty lists[][]Passed
one item['a']['a']Passed
two lists same id['a']['a']Passed

SHA-256 / 4c427540c772a638e9f4a77c9ddb517cd66d81cbf224acaec0431793258f895d

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(lists, offset):
    from fractions import Fraction
    s={}
    for xs in lists:
     for rank,(ident,score) in enumerate(xs,1): s[ident]=s.get(ident,0)+Fraction(1,offset+rank+1)
    return sorted(s,key=lambda x:(-s[x],x))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('shared low rank',solve([[['a',1],['b',0]],[['b',1]]],1),['b','a'])
check('offset changes tradeoff',solve([[['a',1],['x',0],['b',0]],[['y',1],['z',0],['b',0]]],1),['a','b','y','x','z'])
check('single list order',solve([[['z',1],['a',9]]],N),['z','a'])
check('empty lists',solve([[],[]],N),[])
check('one item',solve([[['a',0]]],N),['a'])
check('two lists same id',solve([[['a',0]],[['a',0]]],N),['a'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
shared low rank['b', 'a']['b', 'a']Passed
offset changes tradeoff['b', 'a', 'y', 'x', 'z']['a', 'b', 'y', 'x', 'z']Failed
single list order['z', 'a']['z', 'a']Passed
empty lists[][]Passed
one item['a']['a']Passed
two lists same id['a']['a']Passed

SHA-256 / 06447d43b8a0aa30402e1bd38c022a29d5bfb9f55191209fac192ec3018bc989

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Inputs are small exact toy vectors and scores. No production index, ANN recall, embedding quality, or latency claim is implied. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:24.915235+00:00.

Case digest / 055048af7d3ef1cefe1b2901ea617a1828694e0707ef48bca3186230e27009c8