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

Change Elasticsearch to dot_product similarity #4186

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

radu-gheorghe
Copy link
Contributor

With our normalized vectors, the score should be exactly the same as "cosine", but we don't force Elasticsearch to normalize vectors at query time. Which is similar to what our prenormalized-angular does: effectively orders by cosine similarity, assuming vectors are normalized.

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

With our normalized vectors, the score should be exactly the same as "cosine", but we don't force Elasticsearch to normalize vectors at query time. Which is similar to what our prenormalized-angular does: effectively orders by cosine similarity, assuming vectors are normalized.
@radu-gheorghe radu-gheorghe requested a review from geirst September 3, 2024 07:54
Copy link
Member

@geirst geirst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@geirst geirst merged commit b05c0c0 into master Sep 3, 2024
2 checks passed
@geirst geirst deleted the radu-gheorghe-patch-1 branch September 3, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants