chroma
chroma copied to clipboard
Allow filtering for collections
We should allow for get'ing a collection based on a filtering of its metadata. This way you could handle cases like wanting to get all collections belonging to a specific id.
It'd be great to have CRUD capabilities on collections!
Agreed -- for instance, if you have a bunch of text in the collection with "author" stored in the metadata, it would be very nice to be able to filter by author sometimes.
Could not agree more!
@jeffchuber Hey there! I'm one of the co-founders of Sweep AI, an AI junior dev. I tried tackling this issue by prompting Sweep and it generated the PR at https://github.com/kevinlu1248/chroma/pull/3. You can also write a PR reply or comment in the code to suggest changes. Would appreciate any feedback on how well Sweep did!
I also made a PR directly to Chroma's main at https://github.com/chroma-core/chroma/pull/811.
To clarify: I think we don't actually want to implement this onto get_collection
, but list_collection
. Since we don't know how many results the filter will return.
A user had opened this CIP https://github.com/chroma-core/chroma/pull/855
Perhaps this should move forward once we have dealt with the storage of embedding_functions
which should clean up list_collections
more broadly?
keep in backlog until storage of embedding funcs is cleaned up