-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
Implement max_marginal_relevance_search
in VectorStore
of Pinecone
#6056
Conversation
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.
Thanks for the contribution! (1) Can you add one of two examples of these to the Pinecone notebook docs/modules/indexes/vectorstores/examples/pinecone.ipynb
? (2) Can the functions be combined given the small difference between them (passing query vs embedding)? May help reduce code duplication.
Thank you for the review!
What do you think about my comments about |
Right, in that case, yes let's keep both. So, you can just add to the notebook :)
You are welcome to add it here or in a follow-up PR. Please add a bit more documentation than Supabase has and a notebook example.
This is a good call out. I will check with Harrison, but let's take it up in a separate PR. |
|
Yes, we should add a |
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.
Nice work!
Will do. How about |
Yes, let's take this up in a new PR since name changes have broader scope. Feel free to put up a PR and I can circulate it with folks. In the meantime, I'm going to merge this one :) |
langchain-ai#6056) This adds implementation of MMR search in pinecone; and I have two semi-related observations about this vector store class: - Maybe we should also have a `similarity_search_by_vector_returning_embeddings` like in supabase, but it's not in the base `VectorStore` class so I didn't implement - Talking about the base class, there's `similarity_search_with_relevance_scores`, but in pinecone it is called `similarity_search_with_score`; maybe we should consider renaming it to align with other `VectorStore` base and sub classes (or add that as an alias for backward compatibility) #### Who can review? Tag maintainers/contributors who might be interested: - VectorStores / Retrievers / Memory - @dev2049
Just so it is consistent with other `VectorStore` classes. This is a follow-up of #6056 which also discussed the potential of adding `similarity_search_by_vector_returning_embeddings` that we will continue the discussion here. potentially related: #6286 #### Who can review? Tag maintainers/contributors who might be interested: @rlancemartin <!-- For a quicker response, figure out the right person to tag with @ @hwchase17 - project lead Tracing / Callbacks - @agola11 Async - @agola11 DataLoaders - @eyurtsev Models - @hwchase17 - @agola11 Agents / Tools / Toolkits - @hwchase17 VectorStores / Retrievers / Memory - @dev2049 -->
This adds implementation of MMR search in pinecone; and I have two semi-related observations about this vector store class:
similarity_search_by_vector_returning_embeddings
like in supabase, but it's not in the baseVectorStore
class so I didn't implementsimilarity_search_with_relevance_scores
, but in pinecone it is calledsimilarity_search_with_score
; maybe we should consider renaming it to align with otherVectorStore
base and sub classes (or add that as an alias for backward compatibility)Who can review?
Tag maintainers/contributors who might be interested: