FA-99481 / Vector retrieval ranking / Open access
Vector retrieval: Vector coordinates are compared lexicographically · case 01
Vector coordinates are compared lexicographically.
ROOT CAUSE
The candidate vector tuple itself is used as a ranking key.
THE FAILURE
The candidate vector tuple itself is used as a ranking key.
Unsuccessful approach: Manhattan distance changes the metric and ranks a different geometry.
Case contract
Rows [id,vector] rank by exact squared Euclidean distance to query, then ID.
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(rows, query):
return [r[0] for r in sorted(rows,key=lambda r:tuple(r[1]))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
q=[N,0]
check('large first coordinate',solve([['a',[N+1,0]],['b',[N,2]]],q),['a','b'])
check('negative coordinate',solve([['a',[N-2,0]],['b',[N,1]]],q),['b','a'])
check('squared beats manhattan',solve([['a',[3,0]],['b',[2,2]]],[0,0]),['b','a'])
check('tie lexical',solve([['z',[N,1]],['a',[N,-1]]],q),['a','z'])
check('exact match',solve([['x',q],['y',[N+1,0]]],q),['x','y'])
check('empty',solve([],q),[])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| large first coordinate | ['b', 'a'] | ['a', 'b'] | Failed |
| negative coordinate | ['a', 'b'] | ['b', 'a'] | Failed |
| squared beats manhattan | ['b', 'a'] | ['b', 'a'] | Passed |
| tie lexical | ['a', 'z'] | ['a', 'z'] | Passed |
| exact match | ['x', 'y'] | ['x', 'y'] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 431b145190cbca38aa32ae41f12162e6cda044aafc8478b59c9a6e2493a91e00
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, query):
return [r[0] for r in sorted(rows,key=lambda r:sum(abs(a-b) for a,b in zip(r[1],query)))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
q=[N,0]
check('large first coordinate',solve([['a',[N+1,0]],['b',[N,2]]],q),['a','b'])
check('negative coordinate',solve([['a',[N-2,0]],['b',[N,1]]],q),['b','a'])
check('squared beats manhattan',solve([['a',[3,0]],['b',[2,2]]],[0,0]),['b','a'])
check('tie lexical',solve([['z',[N,1]],['a',[N,-1]]],q),['a','z'])
check('exact match',solve([['x',q],['y',[N+1,0]]],q),['x','y'])
check('empty',solve([],q),[])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| large first coordinate | ['a', 'b'] | ['a', 'b'] | Passed |
| negative coordinate | ['b', 'a'] | ['b', 'a'] | Passed |
| squared beats manhattan | ['a', 'b'] | ['b', 'a'] | Failed |
| tie lexical | ['z', 'a'] | ['a', 'z'] | Failed |
| exact match | ['x', 'y'] | ['x', 'y'] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 268ea1b6b7fcf41f4d410d0b3fa9b283bfafda8eb0450ac6adf8ceca20155d9e
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.913108+00:00.
Case digest / 7fc72efe1ac9fad59e519d8a41be636e925a738cc12e0b1afcca71c05c8030eb