-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
community: add milvus hybrid search retriever #20375
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi, that looks very good @BuxianChen! As part of a group in IBM Research, we are looking for similar needs: building and using a Milvus vector store with the ability to do hybrid search. We would like to continue to use @efriis can you share what is the intention with this and similar PRs related to hybrid search? We are willing to implement and submit PRs with your guidance. |
@ohadeytan Hi, I think this PR is out of date, maybe as well as My PR was completed before their partner PR, but theirs has been merged. But as you point out, their implement lack of the creation of the collection and similar setting in regular I think you can communicate with langchain's core dev, then integrate the missing part to Best wishes! |
By the way, I think the awkward things are:
I'm also confused about how to deal with that. |
@BuxianChen, yeah, it seems they are moving to the |
Thank you for you contribution. collection = Collection(
...
)
retriever = MilvusCollectionHybridSearchRetriever(
collection=collection,
...
) In the near future, MilvusClient SDK will support hybrid. from pymilvus import MilvusClient
client = MilvusClient("milvus_demo.db")
MilvusHybridSearchRetriever(
client=client,
...
) |
closing because should be in partner package! seems like it might already be there too |
…25284) # Description Milvus (and `pymilvus`) recently added the option to use [sparse vectors](https://milvus.io/docs/sparse_vector.md#Sparse-Vector) with appropriate search methods (e.g., `SPARSE_INVERTED_INDEX`) and embeddings (e.g., `BM25`, `SPLADE`). This PR allow creating a vector store using langchain's `Milvus` class, setting the matching vector field type to `DataType.SPARSE_FLOAT_VECTOR` and the default index type to `SPARSE_INVERTED_INDEX`. It is only extending functionality, and backward compatible. ## Note I also interested in extending the Milvus class further to support multi vector search (aka hybrid search). Will be happy to discuss that. See [here](#19955), [here](#20375), and [here](#22886) similar needs. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
Description:
I add milvus hybrid search retriever. The PR messages remains to complete, and I need some advices for the implementation. The code that I already committed can run successfully, but need to be improved, refactor, lint (I have some problem in format, lint, etc).
Here are my plans, and need some helps:
MilvusHybridSearchRetriever
.Dependencies:
Docs
docs/docs/integrations/retrievers/milvus_hybrid_search.ipynb
.Thank you for contributing to LangChain!
PR title: "package: description"
PR message: Delete this entire checklist and replace with
Add tests and docs: If you're adding a new integration, please include
docs/docs/integrations
directory.Lint and test: Run
make format
,make lint
andmake test
from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/Additional guidelines:
If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17.