-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Support to Enable/Disble Share level Rescoring and Update Oversampling Factor #2172
Merged
naveentatikonda
merged 1 commit into
opensearch-project:main
from
Vikasht34:OverSamplingFactor
Oct 1, 2024
Merged
Adding Support to Enable/Disble Share level Rescoring and Update Oversampling Factor #2172
naveentatikonda
merged 1 commit into
opensearch-project:main
from
Vikasht34:OverSamplingFactor
Oct 1, 2024
Conversation
This file contains 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
Vikasht34
requested review from
heemin32,
navneet1v,
VijayanB,
vamshin,
jmazanec15,
naveentatikonda,
junqiu-lei,
martin-gaievski,
ryanbogan and
luyuncheng
as code owners
September 30, 2024 22:36
Vikasht34
force-pushed
the
OverSamplingFactor
branch
from
September 30, 2024 22:40
20e7d01
to
e663383
Compare
jmazanec15
reviewed
Sep 30, 2024
src/main/java/org/opensearch/knn/index/query/nativelib/NativeEngineKnnVectorQuery.java
Outdated
Show resolved
Hide resolved
jmazanec15
reviewed
Sep 30, 2024
src/main/java/org/opensearch/knn/index/query/nativelib/NativeEngineKnnVectorQuery.java
Outdated
Show resolved
Hide resolved
Vikasht34
force-pushed
the
OverSamplingFactor
branch
from
September 30, 2024 22:43
e663383
to
aa80c2d
Compare
navneet1v
reviewed
Sep 30, 2024
src/main/java/org/opensearch/knn/index/query/nativelib/NativeEngineKnnVectorQuery.java
Show resolved
Hide resolved
jmazanec15
previously approved these changes
Sep 30, 2024
navneet1v
reviewed
Sep 30, 2024
…sampling Factor Signed-off-by: VIKASH TIWARI <viktari@amazon.com>
Vikasht34
force-pushed
the
OverSamplingFactor
branch
from
September 30, 2024 22:58
aa80c2d
to
717c7d9
Compare
shatejas
reviewed
Sep 30, 2024
@@ -88,6 +88,7 @@ public class KNNSettings { | |||
public static final String QUANTIZATION_STATE_CACHE_SIZE_LIMIT = "knn.quantization.cache.size.limit"; | |||
public static final String QUANTIZATION_STATE_CACHE_EXPIRY_TIME_MINUTES = "knn.quantization.cache.expiry.minutes"; | |||
public static final String KNN_FAISS_AVX512_DISABLED = "knn.faiss.avx512.disabled"; | |||
public static final String KNN_DISK_VECTOR_SHARD_LEVEL_RESCORING_DISABLED = "index.knn.disk.vector.shard_level_rescoring_disabled"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: A disabled suffix might cause confusion here if we ever expose this to customers. consider index.knn.shard_level_rescoring
and the default can be false
jmazanec15
approved these changes
Oct 1, 2024
naveentatikonda
approved these changes
Oct 1, 2024
jmazanec15
pushed a commit
that referenced
this pull request
Oct 1, 2024
…sampling Factor (#2172) Signed-off-by: VIKASH TIWARI <viktari@amazon.com> Signed-off-by: John Mazanec <jmazane@amazon.com>
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.
Description
Issue:- During rescoring at the shard level in a multi-segment case, the recall of the search results drops to zero.
Fix :- To address the issue of reduced recall during shard-level rescoring in multi-segment cases, we are introducing an index-level setting that allows users to enable or disable shard-level rescoring. This setting gives finer control over whether rescoring should be performed at the shard level or if the system should rely on a more global rescoring process across all segments. By disabling shard-level rescoring, the recall issue is mitigated, as the rescoring process will take into account the complete set of results from all segments, rather than focusing on top k results.
Oversampling Update :- With this change we are updating default oversampling factor as well. For dimensions less than 768, an oversample factor of 3.0x is applied to ensure higher recall for smaller vector spaces. For dimensions between 768 and 1000, the oversampling factor is set to 2.0x to balance recall and performance. For dimensions above 1000, no oversampling (1.0x) is applied.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.