@langchain/core version 0.1.63 removes similaritySearchWithScore ?
ElectricCodeGuy opened this issue Β· comments
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
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
- libs/langchain-pinecone/src/vectorstores.ts
- libs/langchain-community/src/vectorstores/hanavector.ts
- libs/langchain-scripts/src/migrations/0_1.ts
- langchain/src/util/entrypoint_deprecation.ts
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.