FAILURE MAP
← Case archive

FA-99476 / Vector retrieval ranking / Open access

Vector retrieval: Multi-vector aggregation uses the maximum chunk distance · case 01

Multi-vector aggregation uses the maximum chunk distance.

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

ROOT CAUSE

Document distance uses the maximum chunk distance, so a far vector controls the document score.

THE FAILURE

Document distance uses the maximum chunk distance, so a far vector controls the document score.

Unsuccessful approach: Taking the minimum then sorting descending reverses nearest-first ordering.

Case contract

Rows [doc,distance] aggregate by minimum distance per document; nearest first.

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(hits):
    scores={}
    for d,v in hits: scores[d]=max(v,scores.get(d,v))
    return sorted(scores,key=lambda d:(scores[d],d))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest chunk wins',solve([['a',N+5],['a',N],['b',N+2]]),['a','b'])
check('input order independent',solve([['b',N+2],['a',N+4],['a',N+1]]),['a','b'])
check('single chunk order',solve([['z',9],['a',2]]),['a','z'])
check('negative distances toy',solve([['a',-1],['b',0]]),['a','b'])
check('empty',solve([]),[])
check('three docs',solve([['c',8],['b',1],['a',5]]),['b','a','c'])
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
nearest chunk wins['b', 'a']['a', 'b']Failed
input order independent['b', 'a']['a', 'b']Failed
single chunk order['a', 'z']['a', 'z']Passed
negative distances toy['a', 'b']['a', 'b']Passed
empty[][]Passed
three docs['b', 'a', 'c']['b', 'a', 'c']Passed

SHA-256 / 1b0773b21157fd0e8aea7d65b1f0414a6ca5f20d8eba46d5219bd77a1dd89174

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(hits):
    scores={}
    for d,v in hits: scores[d]=min(v,scores.get(d,v))
    return sorted(scores,key=lambda d:(-scores[d],d))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest chunk wins',solve([['a',N+5],['a',N],['b',N+2]]),['a','b'])
check('input order independent',solve([['b',N+2],['a',N+4],['a',N+1]]),['a','b'])
check('single chunk order',solve([['z',9],['a',2]]),['a','z'])
check('negative distances toy',solve([['a',-1],['b',0]]),['a','b'])
check('empty',solve([]),[])
check('three docs',solve([['c',8],['b',1],['a',5]]),['b','a','c'])
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
nearest chunk wins['b', 'a']['a', 'b']Failed
input order independent['b', 'a']['a', 'b']Failed
single chunk order['z', 'a']['a', 'z']Failed
negative distances toy['b', 'a']['a', 'b']Failed
empty[][]Passed
three docs['c', 'a', 'b']['b', 'a', 'c']Failed

SHA-256 / d4961ae87211a8e1e0e91e98ee90f603f2c039409448972ce022a8615a08735c

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.474137+00:00.

Case digest / 7991219ba4ce5e12bbc989d6909a6144847190295405c14fbe5ffcf7c1e967ac