Skip to content
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

Remove explicit K from exact search context #2212

Closed
wants to merge 1 commit into from

Conversation

VijayanB
Copy link
Member

@VijayanB VijayanB commented Oct 16, 2024

Description

K can be extracted from knn query instead of explicitly passing as input to ExactSearch Context. Previously this was
added mainly with assumption that 'k' can be different from Query if rescore context is not null. However, the main reason we have different K from Query is due to quantization. Having larger K is apt for Approx search, for exact search we don't need to collect more than expected top k from query.

Related Issues

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@VijayanB VijayanB changed the title [Refactor] Remove explicit K from exact search context Remove explicit K from exact search context Oct 16, 2024
@VijayanB VijayanB added backport 2.x Refactoring Improve the design, structure, and implementation while preserving its functionality labels Oct 16, 2024
K can be extracted from knn query instead of explicitly passing as
input to ExactSearch Context. Previously this was
added mainly with assumption that 'k' can be different
from Query if rescore context is not null. However,
the main reason we have different K from Query is due to quantization.
Having larger K is apt for Approx search, for exact search we don't
need to collect more than expected top k from query.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
@jmazanec15
Copy link
Member

Having larger K is apt for Approx search, for exact search we don't need to collect more than expected top k from query.

If we are approximating distance with exact search, why not maintain oversample?

@VijayanB
Copy link
Member Author

Closing this PR since this is required for oversampling.

@VijayanB VijayanB closed this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Refactoring Improve the design, structure, and implementation while preserving its functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants