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

How to use the search by "cosine similarity"? #216

Closed
guillaumeOfr opened this issue Mar 13, 2023 · 1 comment
Closed

How to use the search by "cosine similarity"? #216

guillaumeOfr opened this issue Mar 13, 2023 · 1 comment

Comments

@guillaumeOfr
Copy link

Hello everyone,

Here are the steps I followed :

  1. I created a Chroma base and a collection
  2. After, following the advice of the issue [Question]What is the algorithm used by Chroma to calculate vector similarity? #213 , I modified the source code by changing "l2" to "cosine" at these lines :
  1. When I do a search with collection.query(...) I get distances < -1 (around -15, for example)

How can I use the search by "cosine similarity" in my collection ?

Thanks in advance,

@jeffchuber
Copy link
Contributor

Hi @guillaumeOfr ! You are totally right. Chroma needs this and we are going to implement it. It is tracked in this previous issue, #157, so will close this one for cleanliness. I will tag you when the other issue is closed!

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

No branches or pull requests

2 participants