chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Allow filtering for collections

Open HammadB opened this issue 1 year ago • 6 comments

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.

HammadB avatar Feb 27 '23 00:02 HammadB

It'd be great to have CRUD capabilities on collections!

prosammer avatar Feb 27 '23 00:02 prosammer

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.

corinwagen avatar Apr 18 '23 14:04 corinwagen

Could not agree more!

l4b4r4b4b4 avatar Jun 07 '23 23:06 l4b4r4b4b4

@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.

kevinlu1248 avatar Jul 15 '23 00:07 kevinlu1248

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?

jeffchuber avatar Aug 29 '23 13:08 jeffchuber

keep in backlog until storage of embedding funcs is cleaned up

jeffchuber avatar Sep 13 '23 21:09 jeffchuber