langchain icon indicating copy to clipboard operation
langchain copied to clipboard

similarity search by vector chroma

Open claust opened this issue 1 year ago • 2 comments

This is an implementation of the similarity search by vector in Chroma, as referenced in #1450.

claust avatar Mar 05 '23 11:03 claust

can we change similarity_search_with_score to call this method now? to avoid duplicated code

Hmm, the similarity_search_with_score needs the scores, which are not returned by the similarity_search_by_vector, at least not with its current signature. Also, the filter argument of similarity_search_with_score is not present in similarity_search_by_vector so it would have to taken from kwargs? I have instead extracted the mapping of the query result to documents and scores, so this is no longer duplicated. Does this make sense?

claust avatar Mar 07 '23 21:03 claust

huh what happened to the merge conflicts here?

hwchase17 avatar Mar 09 '23 04:03 hwchase17

This PR is replaced by #1568 to fix my mistaken commits resulting in merge commits, sorry.

claust avatar Mar 09 '23 20:03 claust