Skip to content
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

feat: add similarity_search_by_vector_with_relevance_scores to Pineco… #6286

Closed
wants to merge 2 commits into from

Conversation

JCourt1
Copy link
Contributor

@JCourt1 JCourt1 commented Jun 16, 2023

Following on from #6056, the underlying langchain VectorStore class doesn't have a method called
similarity_search_by_vector_with_relevance_scores to allow getting a handle on the relevance scores when querying by vector, similarly to how it is done with similarity_search and similarity_search_with_relevance_scores.

Since adding such an abstract method to the base VectorStore class would require implementing it for all VectorStores, I haven't done that here. As a baby step towards the larger task, I have just added similarity_search_by_vector_with_relevance_scores to the Pinecone vector store.

Who can review?

Tag maintainers/contributors who might be interested:

VectorStores / Retrievers / Memory

@vercel
Copy link

vercel bot commented Jun 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ❌ Failed (Inspect) Jun 16, 2023 1:26pm

@vercel vercel bot temporarily deployed to Preview June 16, 2023 13:26 Inactive
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt the similarity_search_with_relevance_scores method call this one?

@vercel
Copy link

vercel bot commented Jun 19, 2023

@JCourt1 is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@JCourt1
Copy link
Contributor Author

JCourt1 commented Jun 19, 2023

shouldnt the similarity_search_with_relevance_scores method call this one?

Yes, sounds good, just pushed that!

@JCourt1 JCourt1 requested a review from hwchase17 June 19, 2023 10:31
hwchase17 pushed a commit that referenced this pull request Jun 20, 2023
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

 -->
@dosubot dosubot bot added Ɑ: vector store Related to vector store module 🤖:improvement Medium size change to existing code to handle new use-cases labels Jul 14, 2023
@baskaryan
Copy link
Collaborator

landed in #9087, thanks @JCourt1!

@baskaryan baskaryan closed this Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants