-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
partners[chroma]: add retrieval of embedding vectors #28290
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
56ffe0d
to
06bbe03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside for question on integration test.
"""Test end to end construction and scored search.""" | ||
texts = ["foo", "bar", "baz"] | ||
metadatas = [{"page": str(i)} for i in range(len(texts))] | ||
embeddings = FakeEmbeddings() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this test pass? Do we need ConsistentFakeEmbeddings instead of FakeEmbeddings
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be passing in my local env. Did it fail in yours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a look at this. The FakeEmbeddings
in Chroma is returning a fixed vector for each query. So the test isn't very stringent. Updated it to use ConsistentFakeEmbeddings
, which is different for each query.
This PR adds an additional method to
Chroma
to retrieve the embedding vectors, besides the most relevant Documents. This is sometimes of use when you need to run a postprocessing algorithm on the retrieved results based on the vectors, which has been the case for me lately.Example issue (discussion) requesting this change: #20383