AI/TLDR

Milvus

An open-source vector database for searching billions of embeddings at scale

Overview

Milvus is an open-source vector database for storing and searching the embeddings that represent unstructured data like text, images, and audio. It keeps vectors alongside scalar fields such as integers, strings, and JSON, so you can combine similarity search with metadata filtering or hybrid search.

It is built for teams adding semantic search, recommendations, or retrieval-augmented generation to their applications. You can start small with Milvus Lite (a local file-based database you install with pip), run a single-machine Standalone deployment, or scale out to a distributed, Kubernetes-native cluster that handles billions of vectors.

Within the vector-database category, Milvus separates compute from storage so query and data nodes scale independently. It is written in Go and C++ with CPU/GPU acceleration, and is also offered as a managed service on Zilliz Cloud for those who want zero setup.

What it does

  • Stores vectors together with scalar types (integers, strings, JSON) for metadata filtering and hybrid search
  • Distributed architecture that separates compute and storage, scaling query and data nodes independently
  • Multiple deployment modes: Milvus Lite for local Python use, Standalone for a single machine, and Kubernetes-native clusters
  • CPU/GPU hardware acceleration, with the core written in Go and C++
  • Real-time streaming updates to keep indexed data fresh
  • Python SDK (pymilvus) with a single MilvusClient class for collections, inserts, and search

Getting started

Install the Python SDK, then create a local Milvus Lite database, add a collection, insert data, and run a vector search.

Install the Python SDK

Install pymilvus, the official Python client for Milvus.

bashbash
pip install -U pymilvus

Create a client

Pass a local file name to use Milvus Lite, which persists data to that file. You can also pass a uri and token to connect to a self-hosted Milvus server or Zilliz Cloud.

pythonpython
from pymilvus import MilvusClient

client = MilvusClient("milvus_demo.db")

Create a collection

Define a collection and the dimension of the vectors you plan to store.

pythonpython
client.create_collection(
    collection_name="demo_collection",
    dimension=768,  # The vectors we will use in this demo have 768 dimensions
)

Insert data and search

Insert your vectors, then run a similarity search and choose which fields to return.

pythonpython
res = client.insert(collection_name="demo_collection", data=data)

res = client.search(
    collection_name="demo_collection",  # target collection
    data=query_vectors,  # a list of one or more query vectors, supports batch
    limit=2,  # how many results to return (topK)
    output_fields=["vector", "text", "subject"],  # what fields to return
)

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Power retrieval-augmented generation (RAG) by searching document embeddings for the most relevant context to feed an LLM
  • Build semantic search over text, images, or other unstructured data using nearest-neighbor lookups
  • Serve recommendations by matching user or item embeddings at low latency
  • Run similarity search at very large scale (billions of vectors) on a distributed Kubernetes cluster

How Milvus compares

Milvus alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Supabase★ 105kManaged Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data.
Redis Cloud★ 75kFully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings.
Milvus★ 44.9kAn open-source vector database for searching billions of embeddings at scale
FAISS★ 40.4kA library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes.
Qdrant★ 32.5kA Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems.
Chroma★ 28.5kA developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API.
pgvector★ 21.8kA PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database.
Weaviate★ 16.4kA vector database with built-in hybrid search and LLM-provider integrations for building semantic search and retrieval applications.