feat: Add Milvus vector store backend support for RAG Engine#2026
feat: Add Milvus vector store backend support for RAG Engine#2026bangqipropel wants to merge 5 commits into
Conversation
TitleAdd Milvus vector store backend support for RAG Engine Description
Changes walkthrough 📝
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
0823a12 to
a99de62
Compare
PR Code Suggestions ✨Explore these optional code suggestions:
|
a99de62 to
0d7dc23
Compare
0d7dc23 to
e3b61bc
Compare
| nodeSelector: | ||
| workload: qdrant | ||
| containers: | ||
| - name: etcd |
There was a problem hiding this comment.
is this and minio needed here? if so might not want the qdrant nodeSelector
| storage_context = StorageContext.from_defaults(vector_store=vector_store) | ||
|
|
||
| # Query all entities from Milvus to rebuild the docstore | ||
| llama_docs = self._query_collection_to_docs(collection_name) |
There was a problem hiding this comment.
im curious what kind of latency this will add on startup? we might want to have some telemetry on this
|
|
||
| milvus_offset += len(entities) | ||
|
|
||
| # Total unique doc count (approximate — use count of unique doc_ids seen) |
There was a problem hiding this comment.
is the total count actually an approximate? seems like count(*) will take care of this?
|
|
||
| clusterIP := service.Spec.ClusterIP | ||
|
|
||
| ragengineObj := createLocalEmbeddingKaitoVLLMRAGEngineWithQdrant(clusterIP, "v1/completions") |
There was a problem hiding this comment.
looks like this is pointing to qdrant
| See [examples/RAG/kaito_ragengine_milvus.yaml](https://github.com/kaito-project/kaito/blob/main/examples/RAG/kaito_ragengine_milvus.yaml) for the full example. | ||
|
|
||
| :::tip | ||
| Milvus persists data via its own storage layer (etcd + MinIO or local disk). On pod restart, RAGEngine automatically rediscovers existing Milvus collections and restores them as indexes. |
There was a problem hiding this comment.
Ahh I see that the etcd + minio is used by milvus in the deployment example, so just remove the nodeSelectors from the example deployment
- Remove buggy duplicate Milvus E2E test that incorrectly called Qdrant helper - Remove qdrant nodeSelector from etcd/minio/milvus in milvus-deployment.yaml - Add note about demo MinIO credentials, recommend Secret refs for production - Clarify Milvus _list_documents total_items semantics (exact chunk count) - Add restore latency logging for _restore_single_index startup observability - Document pagination over-fetch trade-off
- Pin milvus-lite==2.5.1 to match the version locally validated; newer releases have regressed on preserving dynamic metadata fields and ref_doc_id when used with pymilvus 2.6.7 in CI environments. - Pin setuptools<81 so milvus-lite's pkg_resources import keeps working. - Make _entity_to_doc_dict fall back to _node_content JSON for both metadata and doc_id, so user fields like filename/branch survive even when the Milvus dynamic schema doesn't promote them to top-level columns. Fixes test_list_documents_with_filter_index KeyError.
Reason for Change:
Requirements
Issue Fixed:
Notes for Reviewers: