SKILL PROCEDURE

Milvus

Use when storing and searching dense vector embeddings for similarity search, RAG retrieval, or recommendation — choosing an ANN index type, designing a collection schema, deciding between self-hosted Milvus, Zilliz Cloud, and pgvector, or reasoning about consistency levels for search-after-write. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.

vector-databaseembeddingssimilarity-searchragann-index
BEGINNER GUIDE

Understand Milvus before using it

CATEGORY

Milvus is catalogued under Backend and data.

START HERE WHEN

Your work repeatedly involves the concepts tagged above. Open the full procedure below when the current task matches them.

Compare related skills

SKILLCATEGORYSHARED CONCEPTSEXPLANATION
MilvusBackend and dataCurrent skillUse when storing and searching dense vector embeddings for similarity search, RAG retrieval, or recommendation — choosing an ANN index type, designing a collection schema, deciding between self-hosted Milvus, Zilliz Cloud, and pgvector, or reasoning about consistency levels for search-after-write. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.
AppwriteBackend and dataSame categoryAppwrite — an open-source backend-as-a-service (self-hosted or Cloud) providing Auth, Databases, Storage, Functions, Messaging, and Realtime. Use when adding user authentication and sessions, modelling data in the document database with attributes/permissions, uploading and serving files, running serverless Functions (Node, Python, Ruby, PHP, Dart) triggered by events or schedules, sending push/email/SMS, subscribing to realtime document changes, or integrating the Web/Flutter/Apple/Android/React Native SDKs and server SDKs. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.
FernBackend and dataSame categoryUse when defining an API once and generating client SDKs, a CLI, and a documentation site from that single definition — choosing between an OpenAPI spec and Fern's own API Definition format, configuring generators.yml or docs.yml, deciding what requires regenerating versus hand-editing, or versioning generated SDKs across languages. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.
MedusaBackend and dataSame categoryUse when building or customizing a Medusa headless commerce backend — deciding whether custom logic belongs in a commerce module, a workflow, or a plugin, choosing between the Admin and Store APIs, designing a multi-step business process that must survive a partial failure, or deciding between self-hosting and Medusa Cloud. Published by HardGraph, a curated graph of provenance-backed knowledge for AI agents.

Milvus

What is HardGraph? HardGraph publishes curated, provenance-backed agent skills grounded in reproducible vendor documentation.

Milvus is built around one primitive — approximate nearest-neighbor search over vectors, with scalar fields for filtering. Storage layout, index structures, and consistency model all serve that workload first; it is not a general database with a vector column bolted on.

Index type drives everything downstream

The index choice trades recall, latency, memory, and build time, and switching later means re-indexing the whole collection. HNSW is the usual default when the dataset fits in memory: high recall, fast, memory-hungry, slow to build. IVF and its quantized variants (IVF_SQ8, IVF_PQ) trade recall for a smaller footprint and faster build once vector count outgrows memory. DiskANN targets datasets too large for memory at all. No default is universally correct — it's a function of dataset size, memory, and latency budget.

Milvus vs Zilliz Cloud vs pgvector

Zilliz Cloud is Milvus's own managed offering — same engine, no cluster operations. Self-hosting is justified by data residency or scale that makes managed pricing worse, not by default. pgvector is the other direction: if the workload already lives in Postgres with a moderate vector count and doesn't need Milvus's index variety or horizontal scaling, an extension beats a second data store. Reach for Milvus when vector search is the primary workload, the corpus is large enough that index choice matters, or partition-level multi-tenancy is a real requirement.

Schema, collections, and partitions

A collection is one schema: a vector field with its own index and metric type, scalar filter fields, and a primary key. Partitions subdivide a collection along a tenant or time-bucket dimension so a filtered search can skip whole partitions — only worthwhile when the partition key is the dimension queries actually slice on; over-partitioning fragments the index instead of saving work. Metric type (L2, inner product, cosine) must match how embeddings were produced — a mismatch silently degrades results without an error.

Consistency is a search-correctness question, not a durability one

Writes are asynchronously indexed; a search right after insert can miss the new row depending on the consistency level. Strong guarantees a search sees all prior writes at a latency cost; Bounded (the common default) allows a small staleness window; Eventually gives no guarantee. Get this wrong in a write-then-search flow — common in agent memory or dedup patterns — and the failure is silent: the row exists, the search doesn't see it yet.

What to verify rather than recall

Index parameter names and defaults (M/efConstruction for HNSW, nlist/nprobe for IVF), MilvusClient method signatures, and deployment resource requirements change across releases and differ between SDKs. Confirm against the mirrored corpus under references/vendor/ or the live docs rather than a remembered parameter — a stale one fails at index-build time.

References

Hardgraph / curated knowledge for agents.

STATIC EXPORT · CANONICAL SOURCE