fix: exclude all-zero-vector points from ANN Recall sample - #444
fix: exclude all-zero-vector points from ANN Recall sample#444itsevezhao wants to merge 1 commit into
Conversation
All-zero-vector points (e.g. bookkeeping markers) score 0.0 against every query, skewing the recall average in "Check Index Quality". Over-fetches 2x and filters them out before taking SAMPLE_SIZE.
|
The "Check the source code" failure is unrelated to this diff — |
|
What problem exactly are you trying to solve? |
All-zero-vector points (e.g. bookkeeping/marker points) score 0.0 against every query vector — using one as the query for the per-point recall check produces a degenerate result, which skews the panel's average. We hit this in production: a real collection had marker points with zero vectors, and "Check Index Quality" reported artificially lower recall because of them. Verified Qdrant doesn't exclude these server-side: seeded a test collection with known all-zero-vector points, and they show up in raw |
|
why do you have zero-vectors in the collection in the first place? What are bookkeeping/marker points? I don't think we will include ad-hoc exclusion of arbitrary vectors based on this example. Maybe having low recall in this case is expected and we want to let users know that something is wrong with their collection |
All-zero-vector points (e.g. bookkeeping markers) score
0.0against every query, skewing the recall average in "Check Index Quality".Over-fetches 2x and filters out all-zero vectors before taking
SAMPLE_SIZE.Testing evidence: verified against a live Qdrant cluster (6-shard test collection, 2000 points, 20 seeded all-zero vectors) that all-zero-vector points are returned in raw sample results and not excluded server-side — 10/20 appeared across 20 sample draws, confirming client-side filtering is required.
Added a test asserting a zero-vector point never reaches the recall-checking query.
npm run lint,npm run format:check, andnpm test(190/190) all pass.