Add optional Milvus vector store - #1345
Open
zc277584121 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Cheney Zhang <chen.zhang@zilliz.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new optional Milvus-backed vector store implementation to PaperQA while keeping the default in-memory vector store behavior unchanged and preserving the existing vector-store contract.
Changes:
- Introduces
MilvusVectorStoreimplemented on top ofpymilvus.MilvusClient, including schema/index validation and a Milvus Lite 3.0 score-normalization guard. - Adds shared vector-store conformance tests plus Milvus-specific tests (schema, copy semantics, dependency error path, and Docs integration).
- Wires up the optional
milvusextra (plus lockfile updates) and documents usage in the README.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Adds Milvus-related dependencies (and lockfile refresh) to support the new optional extra. |
tests/test_vector_stores.py |
Adds provider-style conformance coverage across Numpy/Qdrant/Milvus plus Milvus-specific behavior tests. |
src/paperqa/llms.py |
Implements MilvusVectorStore, including collection/schema/index management and search behavior. |
src/paperqa/__init__.py |
Exposes MilvusVectorStore in the package public API. |
README.md |
Documents how to install and use Milvus (Lite and remote) as a vector store. |
pyproject.toml |
Adds the milvus optional dependency extra and includes it in the dev extra set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MilvusVectorStorebacked bypymilvus.MilvusClientmilvusoptional dependency, lockfile entries, shared provider tests, and README usage examplesCompatibility
The default
NumpyVectorStorebehavior is unchanged. Importing PaperQA without the optional dependency continues to work, while constructingMilvusVectorStorewithout it raises an installation-focused error.Testing