fix for bug causing tests to use FP vectors in search#645
Open
MarkWolters wants to merge 2 commits intomainfrom
Open
fix for bug causing tests to use FP vectors in search#645MarkWolters wants to merge 2 commits intomainfrom
MarkWolters wants to merge 2 commits intomainfrom
Conversation
Contributor
|
Before you submit for review:
If you did not complete any of these, then please explain below. |
tlwillke
reviewed
Mar 12, 2026
Collaborator
tlwillke
left a comment
There was a problem hiding this comment.
Can you please take a look elsewhere in Grid to see if we are vulnerable to the same failure outside of AutoBenchYAML usage?
jvector-examples/src/main/java/io/github/jbellis/jvector/example/Grid.java
Outdated
Show resolved
Hide resolved
tlwillke
approved these changes
Mar 19, 2026
Collaborator
tlwillke
left a comment
There was a problem hiding this comment.
LGTM. Thanks for being thorough.
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.
Investigation Complete: Root Cause Found and Fixed
Key Findings
1. The "Recall Degradation" Was Actually a Test Harness Bug
Test results showed:
The anomaly was that AutoBenchYAML with fusedGraph:No produced artificially high recall (0.77), not that FusedPQ was producing low recall. All configurations using FusedPQ correctly produced consistent recall of 0.65.
2. Root Cause: Missing Vector Encoding in
runAllAndCollectResultsLocation:
jvector-examples/src/main/java/io/github/jbellis/jvector/example/Grid.java, line 833The Bug:
This line attempted to cast a
VectorCompressor(ProductQuantization) toCompressedVectors, which always failed, resulting incvArg = null. WhencvArgis null and fusedGraph is disabled, theConfiguredSystem.scoreProviderFormethod falls back to exact scoring using uncompressed vectors (line 1084 / 1094), which artificially inflates recall.The Fix:
This fix properly encodes the vectors using the compressor, matching the behavior of
runOneGraph(the correct implementation used by BenchYAML).Impact
Verification
After applying this fix:
Additional Notes
The investigation also examined the FusedPQ implementation thoroughly and confirmed that: