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

Vectorstore relevance fn fix #13515

Closed

Conversation

dangoldbj
Copy link

Description:

Issue:
#11587
#13437
#7384
#11386
#12697

Twitter handle: dangoldbj

@baskaryan, @eyurtsev, @hwchase17

Copy link

vercel bot commented Nov 17, 2023

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2023 3:53pm

@dosubot dosubot bot added Ɑ: vector store Related to vector store module 🤖:improvement Medium size change to existing code to handle new use-cases 🔌: elasticsearch Primarily related to elastic/elasticsearch integrations labels Nov 17, 2023
@dangoldbj dangoldbj force-pushed the vectorstore-relevance-fn-fix branch from 5e2971e to 54f48fc Compare November 17, 2023 14:17
@younes-io
Copy link

@dangoldbj : is OpenSearch included in this?

@dangoldbj
Copy link
Author

@dangoldbj : is OpenSearch included in this?

@younes-io I think OpenSearch vector store is correctly implemented.
https://opensearch.org/docs/latest/search-plugins/knn/approximate-knn/#spaces does use cosineSimilarity to indicate cosine distance. However in the implementation, https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/opensearch_vector_search.py#L270C5-L270C5 the score is converted back to cosine similarity

@younes-io
Copy link

you're right..
btw, i don't see in OpenSearch vector store implementation a way to do hybrid search (RRF).. I want to do keyword search and use the similarity search and combine them in an Ensemble retriever.. Ofc, I wish there was a way to call search pipelines using OpenSearch vector implementation so that OpenSearch takes care of all of the hybrid search directly since it supports since 2.10 but LangChain doesn't seem to support it for now, right ? Have you done sth like this using OpenSeachVectorSearch ?
thank you

@dangoldbj dangoldbj force-pushed the vectorstore-relevance-fn-fix branch from 54f48fc to 51c3165 Compare November 23, 2023 10:49
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 23, 2023
@hwchase17
Copy link
Contributor

this has a lot of merge conflicts so i am going to close. we will revisitng our vectorstore abstractions in ~1 month and will reference this

@hwchase17 hwchase17 closed this Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: core Related to langchain-core 🔌: elasticsearch Primarily related to elastic/elasticsearch integrations 🤖:improvement Medium size change to existing code to handle new use-cases size:M This PR changes 30-99 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants