Repository navigation
feat(index): add opt-in quantized vector refinement - #8741
Merged
Merged
Conversation
kamronis
force-pushed
the
rabbitq-opensource
branch
from
September 1, 2026 10:51
97e240b to
d2bc41f
Compare
kamronis
force-pushed
the
rabbitq-opensource
branch
from
September 3, 2026 04:26
ccc4223 to
d4785f3
Compare
kamronis
force-pushed
the
rabbitq-opensource
branch
from
October 15, 2026 08:36
ebf4d3c to
763d8d3
Compare
kamronis
force-pushed
the
rabbitq-opensource
branch
from
October 24, 2026 14:42
763d8d3 to
d80c85f
Compare
kamronis
force-pushed
the
rabbitq-opensource
branch
from
October 24, 2026 15:20
d80c85f to
0bb7e82
Compare
kamronis
force-pushed
the
rabbitq-opensource
branch
from
October 28, 2026 04:36
33ffd65 to
94ebf58
Compare
Convert flat fallback bounds and distances to the retained RQ score scale before merging appended or stale rows, without fetching indexed vectors. Account for native RQ cosine distances when bounding exact refinement. Cover RQ4/RQ8 mixed searches across cosine, L2, and dot metrics, bounded ranges, and optional exact refinement with deterministic recall checks.
Use the existing Accurate RQ range search so bounds are applied before top-k candidate truncation. Preserve segment restrictions during bounded candidate discovery and add a deterministic regression for a Fast winner that falls outside the requested upper bound.
Append the Python option after existing positional parameters and cover an old positional call. Clarify the indexed and fallback behavior in the Python and Java API docs, and verify the Java scanner rejects quantized refinement on non-RQ indexes.
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The distance-range fix now applies bounds during Accurate RQ selection, before top-k truncation. Unbounded queries retain index-only Fast-to-Accurate refinement, scoped filtering, common-scale fallback merging, and per-query batch reranking; exact refinement remains separate. The Python signature also restores existing positional argument order.
Xuanwo
approved these changes
Nov 1, 2026
Xuanwo
left a comment
Member
There was a problem hiding this comment.
Approved after review and complete current-head validation. The bounded range path applies Accurate RQ bounds before top-k truncation while preserving segment restrictions, fallback scale handling, batch behavior, exact refinement, and the existing Python positional API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(index): add opt-in quantized vector refinement
Part of #8634.
Problem
Exact vector refinement reads original vectors from the dataset. On remote storage, these reads can dominate query
latency even though multi-bit RQ data is already available in the vector index.
Change
Add an explicit opt-in quantized refinement stage for flat IVF_RQ indexes.
When
quantized_refine_factoris configured:factor * kcandidates using Fast one-bit RQ scoring.kresults without reading original vectors for indexed candidates.For
distance_rangequeries, selected partitions use Accurate RQ search directlyso the range applies before top-k candidate truncation.
Exact refinement remains a separate optional final stage and can be combined with quantized refinement.
The option is exposed through:
Scanner::quantized_refinequantized_refine_factorQuery.Builder.setQuantizedRefineFactorScope
Validation
Added coverage for: