We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Astra returns a similarity score normalized to [0, 1]. cosine_similarity function returns a score in the range [-1, 1].
cosine_similarity
These can be converted:
(x + 1.0) / 2.0
(x / 2.0) - 1.0
This matters when we are sorting elements by score, since the two will not be comparable.
Expected behavior
We should probably have the Astra adapter convert to the values returned from cosine_similarity.
The text was updated successfully, but these errors were encountered:
Also may be worth have the Astra adapter verify the collection is configured to use cosine similarity (instead of other metrics).
Astra
Sorry, something went wrong.
bjchambers
No branches or pull requests
Describe the bug
Astra returns a similarity score normalized to [0, 1].
cosine_similarity
function returns a score in the range [-1, 1].These can be converted:
(x + 1.0) / 2.0
(x / 2.0) - 1.0
This matters when we are sorting elements by score, since the two will not be comparable.
Expected behavior
We should probably have the Astra adapter convert to the values returned from
cosine_similarity
.The text was updated successfully, but these errors were encountered: