Notes

Milvus

Once a retrieval system holds a few hundred million embedded passages, a search library running inside your application stops being enough. Milvus is the database built for that point: a standalone service whose entire job is finding the nearest vectors to a query vector, quickly, across a cluster.

What it does differently from a library

Faiss and its peers are in-process indexes — you load them, shard them, and handle persistence and updates yourself. Milvus separates storage from compute: writes land in a log and in object storage, query nodes load segments and serve searches, and each role scales independently. That buys live inserts and deletes without rebuilding an index, replication, and a consistency level chosen per query — ordinary database properties that a flat index file does not have.

Using it in a retrieval pipeline
  • Index choice per collection: HNSW for latency, IVF or disk-based variants when the data outgrows memory, with quantization to trade recall for footprint.
  • Filtered search: metadata predicates and sparse-plus-dense hybrid search evaluated inside the engine, so tenant and date filters do not quietly wreck recall.
  • Milvus Lite embeds the same API in a Python process, so a prototype graduates to the cluster without a rewrite.
Why it matters for LLM work

In a RAG system the model is fixed and retrieval decides the answer, so the store's recall, freshness and filtering are not infrastructure trivia — they are the accuracy budget. Milvus is driven from pymilvus and is a first-class store in LangChain and LlamaIndex.

Milvus is an open-source vector database for similarity search at billion-scale, used as the retrieval store behind RAG systems. Unlike an in-process library such as Faiss, it runs as a distributed service with storage separated from compute, live inserts and deletes, replication, and metadata-filtered or hybrid search. Several index types — HNSW, IVF, disk-based — trade recall against memory. It matters because retrieval quality, not the model, sets the ceiling on a grounded answer.

A library's real value is its catalogue. Without one the books are still there, but nobody can find the right page. Milvus is a catalogue for meaning rather than titles. It stores text, images or audio as long lists of numbers that capture what each item is about, and then answers the question — what in here is most like this? — in a fraction of a second, even across billions of items. It is the piece that lets an AI assistant look something up in a company's own documents before it answers, instead of relying only on what it picked up during training.