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

@langchain/core version 0.1.63 removes similaritySearchWithScore ? #5363

Closed
5 tasks done
ElectricCodeGuy opened this issue May 14, 2024 · 1 comment
Closed
5 tasks done
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@ElectricCodeGuy
Copy link

ElectricCodeGuy commented May 14, 2024

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

Just updated to the newest @langchain/core version 0.1.63 and the similaritySearchWithScore is removed from the @langchain/pinecone package. It seems that there are now only similaritySearchVectorWithScore and MMR left to pick from.
Not sure if this is intentional, I cannot find any information about this on the website or here.

Error Message and Stack Trace (if applicable)

No response

Description

See above

System Info

@langchain/core version 0.1.63

Copy link

dosubot bot commented May 14, 2024

It seems that the removal of similaritySearchWithScore from @langchain/pinecone in version 0.1.63 is intentional, and the method has been replaced or refactored to similaritySearchVectorWithScore. This function is designed to perform similarity searches using a query vector, returning results along with their scores. It indicates a shift towards vector-based searches, which might be why the original function was deprecated or removed.

The new similaritySearchVectorWithScore function requires a query vector, a number indicating the top results to return, and an optional filter. It's used in scenarios where the query is initially provided as text, but then converted into a vector representation for the search. This change suggests a more direct approach to handling vector-based queries within the Pinecone integration.

Unfortunately, there's no specific documentation or migration guide provided regarding this change. If you're looking to adapt to the new version, you might consider converting your queries into vectors before using the similaritySearchVectorWithScore function. This approach aligns with the examples found in the codebase, where text queries are first converted into vectors.

If you need further assistance or have more questions, feel free to ask.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant