FAILURE MAP
← Case archive

FA-99496 / Vector retrieval ranking / Open access

Vector retrieval: The item at rank k is dropped · case 01

The item at rank k is dropped.

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

ROOT CAUSE

The slice omits the last requested row or starts after the leader.

THE FAILURE

The slice omits the last requested row or starts after the leader.

Unsuccessful approach: Starting at one skips the highest scoring result even when page size is correct.

Case contract

Rows [id,score] return the first k IDs after descending score and ID ordering.

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, k):
    return [r[0] for r in sorted(rows,key=lambda r:(-r[1],r[0]))[:max(0,k-1)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
rows=[['a',N+3],['b',N+2],['c',N+1],['d',N]]
check('top one',solve(rows,1),['a'])
check('top two',solve(rows,2),['a','b'])
check('all',solve(rows,4),['a','b','c','d'])
check('zero',solve(rows,0),[])
check('empty',solve([],N),[])
check('tie cutoff',solve([['b',1],['a',1],['c',0]],2),['a','b'])
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
top one[]['a']Failed
top two['a']['a', 'b']Failed
all['a', 'b', 'c']['a', 'b', 'c', 'd']Failed
zero[][]Passed
empty[][]Passed
tie cutoff['a']['a', 'b']Failed

SHA-256 / 99b54bb9c401600112e34966451280d7cb1b3d48750080a94a821e5b0dcb8836

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(rows, k):
    return [r[0] for r in sorted(rows,key=lambda r:(-r[1],r[0]))[1:k+1]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
rows=[['a',N+3],['b',N+2],['c',N+1],['d',N]]
check('top one',solve(rows,1),['a'])
check('top two',solve(rows,2),['a','b'])
check('all',solve(rows,4),['a','b','c','d'])
check('zero',solve(rows,0),[])
check('empty',solve([],N),[])
check('tie cutoff',solve([['b',1],['a',1],['c',0]],2),['a','b'])
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
top one['b']['a']Failed
top two['b', 'c']['a', 'b']Failed
all['b', 'c', 'd']['a', 'b', 'c', 'd']Failed
zero[][]Passed
empty[][]Passed
tie cutoff['b', 'c']['a', 'b']Failed

SHA-256 / b16d4a00dab7d3f79c23e28aa70ad41f6f12060cd4244d16ad3912ea710113b0

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

Case digest / d03020ff8c031622bc5e85a0c9cf28eed26acef8c2e5f76113bd70e1b6887fe4