Skip to content

An alternate implementation for RerankVectorQuery #14698

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

vigyasharma
Copy link
Contributor

This PR presents an alternate to #14009 for RerankVectorQuery. It takes an input query, a target vector and a field to use for vector values, and rescores the output of wrapped query with full precision vector values from provided field.

Main differences with #14009 :

  1. While the primary use case would be to rerank results from a quantized KnnFloatVectorQuery against full precision vectors, this implementation has no tight coupling. Users could provide any inner query and rerank against vectors stored in any field.
  2. This can, in future, be extended to support reranking using Late Interaction models stored in a different field. We just need to override add some checks to ensure multi-vectors in provided field are compatible with provided target. This idea has been floated here earlier
  3. Maintains a regular query flow of keeping heavier computation in Weight and Scorer, instead of keeping heavy matching and scoring logic in rewrite.
  4. This should implicitly use any slicing or per leaf parallel execution provided at searchers. We don't need to rewrite logic for per leaf threads.

Pending Tasks:
I plan to get some benchmark results next. Would also like to clean up the test and add a few more, if we chose to go this route. Sharing an early impl. to get feedback on the approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant