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

ChromaDB Vectorstore: Customize distance calculations #2595

Closed
rkeshwani opened this issue Apr 8, 2023 · 3 comments
Closed

ChromaDB Vectorstore: Customize distance calculations #2595

rkeshwani opened this issue Apr 8, 2023 · 3 comments

Comments

@rkeshwani
Copy link
Contributor

Right now the langchain chroma vectorstore doesn't allow you to adjust the metadata attribute on the create collection method of the ChromaDB client so you can't adjust the formula for distance calculations.

Chroma DB introduced the ability to add metadata to collections to tell the index which distance calculation is used in release https://github.com/chroma-core/chroma/releases/tag/0.3.15

Specifically in this pull request: chroma-core/chroma#245

Langchain doesn't provide a way to adjust this vectorstore's distance calculation formula.
Referenced here: https://github.com/hwchase17/langchain/blob/2f49c96532725fdb48ea11417270245e694574d1/langchain/vectorstores/chroma.py#L84

@rkeshwani
Copy link
Contributor Author

Created Pull request to add this ability. Tests appeared to pass but I didn't see a test specific for ChromaDB to fully test this functionality.

hwchase17 pushed a commit that referenced this issue Apr 8, 2023
…ing co… (#2597)

Referencing #2595
Added optional default parameter to adjust index metadata upon
collection creation per chroma code

https://github.com/chroma-core/chroma/blob/ce0bc897776f9bcdd5df4397e6ce5e7bd695f986/chromadb/api/local.py#L74

Allowing for user to have the ability to adjust distance calculation
functions.
@jasonslyvia
Copy link

ping, would love to use different distance methods other than the defaulted 'l2'

@dosubot
Copy link

dosubot bot commented Sep 19, 2023

Hi, @rkeshwani! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, the issue is about the inability to customize distance calculations in the ChromaDB Vectorstore of the Langchain project. You have created a pull request to add this ability, but there is a need for a specific test for ChromaDB to fully test this functionality. Another user has also expressed interest in using different distance methods and has received positive reactions from other users.

Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.

Thank you for your contribution to the LangChain project!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 19, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 26, 2023
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