Joye Personal Blog

Back

🔬 Research ✅ Ready · aillmragretrievalvector databasefaisschromamilvusqdrantweaviatepgvectorann

Faiss vs Chroma: Vector Store Selection Tradeoffs

Notes on how Faiss, Chroma, and adjacent vector stores position themselves for RAG / vector retrieval, plus the tradeoffs across ANN index algorithms.

Updated May 20, 2026

Core idea#

This note is about how Faiss, Chroma, and neighboring vector stores position themselves within a RAG / vector retrieval system.

If I had to keep just one sentence:

Faiss is more like a low-level, high-performance vector index engine; Chroma is more like a developer-friendly, lightweight vector database. Once you’re actually choosing for production, you also have to weigh Milvus, pgvector, Qdrant, Weaviate, and the ANN index algorithms underneath them.

So this note isn’t really “Faiss vs Chroma” — it uses those two as entry points to map out the tradeoff logic of the whole vector store / index layer.

Key points#

1. Faiss’s core role isn’t “a full database” — it’s a high-performance index engine#

The first thing worth nailing down from this discussion:

  • Faiss is not a database in the full sense
  • It’s more like a high-performance library for vector similarity search and clustering
  • Higher-level frameworks often use it as a VectorStore, but a lot of the “database capabilities” you have to build yourself

Its strengths cluster around:

  • Large-scale vector retrieval
  • CPU + GPU acceleration
  • A variety of index algorithms
  • Fine-grained tuning of speed / memory / recall

But the cost is equally direct:

  • You manage persistence yourself
  • Metadata filtering needs an external system
  • Service-ization, distribution, and ops aren’t given to you by default

So Faiss is more like:

a component experts use to build a low-level retrieval engine — not an out-of-the-box, productized vector database.

2. Chroma’s core role is “RAG developer friendliness”#

Chroma is almost the opposite of Faiss:

  • It’s a lightweight, developer-friendly vector database
  • It can store vectors, raw documents, and metadata all together
  • It natively supports metadata filtering
  • It supports embedded mode as well as server mode

That means Chroma’s core value isn’t peak performance, it’s:

  • Rapid prototyping
  • Local development
  • Small-to-medium RAG
  • Painless integration with frameworks like LangChain / LlamaIndex

So it’s more like:

a piece of engineering tooling that gets your RAG running in a few lines of code.

3. Faiss vs Chroma is, at its core, a tradeoff between “peak performance” and “out-of-the-box”#

Compressed to the shortest comparison:

  • Faiss: a low-level index library, extremely strong performance, but you fill in the database features yourself
  • Chroma: a complete, lightweight vector database, very easy to use, but its scale and flexibility fall short of building on Faiss directly

Of the comparison dimensions this discussion laid out, the ones most worth keeping:

  • Type: Faiss is an index library; Chroma is closer to a full DB
  • Ease of use: Faiss is steep; Chroma gets you going in a few lines of code
  • Performance: Faiss is stronger at large scale and on GPU
  • Persistence: Faiss is manual; Chroma is built in (DuckDB + Parquet)
  • Metadata: Faiss needs an external pairing; Chroma supports it natively + SQL-like filtering
  • Typical usage: Faiss leans toward low-level high-performance search; Chroma leans toward fast LLM / RAG development

One-line summary:

  • Faiss is the performance beast
  • Chroma is the developer’s power tool

After Chroma was rewritten in Rust in 2025, its benchmarks improved 4x, but it’s still fundamentally positioned for small-to-medium scale (<10M vectors) — not a contender for production-grade IoT scenarios. Chroma’s cloud offering does support SPANN (a disk-friendly HNSW variant), which counts as a patch for larger scale.

4. When you’re actually choosing for production, you can’t look at only Faiss and Chroma#

The second half of the discussion really pulls the question into a more realistic range — i.e., looking at these systems alongside the others:

  • Milvus: a distributed, full vector database, suited to large-scale production
  • pgvector: if your business already runs on Postgres, this has the lowest integration cost
  • Qdrant: very strong filtering, standout real-time updates and payload filtering
  • Weaviate: leans harder into hybrid search, semantic modules, and graph-structure capabilities

This comparison matters because the real problem many teams face isn’t “Faiss or Chroma,” it’s:

  • Do I just need to spin up a quick RAG demo?
  • Do I already have Postgres?
  • Do I need strong filtering?
  • Am I at million-, ten-million-, or billion-scale vectors?
  • Can I accept operating a separate vector system?

5. Six-database panorama: a table of each database’s core differences#

If you want to do one complete selection comparison, here’s how the 6 mainstream options differ on the key dimensions:

Faiss: low-level index library (not a full DB), BSD license. Used embedded in your code; you have to wrap persistence yourself. Suited to millions through tens of billions and beyond (extreme GPU acceleration). Default indexes support HNSW and all IVF variants. Performance: fastest raw speed; extremely high QPS at hundred-million scale on GPU. Metadata filtering needs an external implementation. Persistence: you manage the index manually. Ease of use: steep. Best for: research, custom hundred-million-scale search.

Chroma: lightweight embedded vector database, Apache 2.0. Supports embedded mode or server mode. Suited to small-to-medium scale (<10M vectors). Default index HNSW (SPANN in the cloud). 4x faster after the 2025 Rust rewrite, but not production-peak. Native SQL-like metadata filtering. Built-in DuckDB + Parquet persistence. Highest ease of use. Best for: RAG prototypes, local development.

Milvus: distributed, full vector database, Apache 2.0. Self-hosted / Zilliz Cloud deployment. Suited to hundred-million through tens of billions and beyond. Supports HNSW and the full IVF family. Low latency (<30ms p95), stable at hundred-million scale. Powerful metadata filtering (dynamic schema). Built-in + distributed persistence. Ease of use: full-featured but heavier to operate. Best for: production-grade large-scale AI.

pgvector: PostgreSQL extension, PostgreSQL license. Just install it inside Postgres. Suited to medium scale (<100M vectors). Supports HNSW + IVFFlat (partial DiskANN). 471 QPS@50M (99% recall, with the pgvectorscale extension). Strongest metadata filtering (fully fused with SQL). Native Postgres persistence. Highest ease of use (zero cost if you already have Postgres). Best for: teams already on Postgres.

Qdrant: full vector database written in Rust, Apache 2.0. Self-hosted / Qdrant Cloud. Suited to medium scale (efficient up to 50M). Default HNSW (heavily optimized). 1ms p99 at small scale, extremely strong filtering. Extremely strong payload filtering. Built-in persistence + on-disk support. Good ease of use (Rust performance + simple API). Best for: medium projects that need strong filtering.

Weaviate: full vector database written in Go, BSD license. Self-hosted / Weaviate Cloud. Suited to medium scale (efficient up to 50M). Default HNSW. Hybrid search ~50ms@768 dims. Supports GraphQL + hybrid search. Built-in persistence + Kubernetes-native. Excellent documentation. Best for: knowledge graphs + hybrid search.

Data source: 2025-2026 benchmarks show Milvus and Faiss leading at hundred-million scale; Chroma and pgvector are good for getting to production fast; Qdrant/Weaviate have unique advantages in filtering and hybrid search.

One-line positioning:

  • Want extreme speed + large scale → Faiss (low-level) or Milvus
  • Want the fastest start → Chroma or pgvector
  • Want filtering / hybrid search → Qdrant or Weaviate
  • Already have Postgres → pgvector at zero cost

6. A very practical mental model for selection#

This material compresses down to the following decision framework:

Want the fastest start#

  • Chroma
  • Or, if you already have Postgres, pgvector directly

Want peak performance / large scale#

  • Faiss (low-level)
  • Or Milvus (a more complete production solution)

Want strong filtering / payload retrieval#

  • Qdrant

Want hybrid search / graph-structured semantic retrieval#

  • Weaviate

So the real-world question isn’t “which is best,” it’s:

which one fits your current data scale, filtering needs, deployment model, and team stack best.

7. The real core of a vector store isn’t “storing vectors” — it’s the ANN index algorithm#

The single biggest chunk worth keeping from this discussion is that it lands the emphasis on Approximate Nearest Neighbor, ANN.

Exact search (Flat / brute-force) becomes O(N) once the data grows, so production almost always goes through ANN: you sacrifice a tiny bit of accuracy (Recall is usually 95%+) in exchange for a 10–1000x speedup. The mainstream algorithms fall into three big categories:

Flat (exact / Brute Force)#

  • Store all vectors as an array, compute cosine / Euclidean distance dimension by dimension, then sort and take Top-k
  • 100% recall, but O(N) — grows linearly with the data
  • Only suitable for <100K vectors, or as a submodule of IVF / HNSW
  • The IVF_FLAT in Faiss/Milvus is Flat underneath; Chroma/Qdrant automatically fall back to Flat on small collections (<10K)

IVF (Inverted File index)#

Core idea: cluster first, then invert.

Build phase: use K-means to split all vectors into nlist clusters (each cluster has one centroid), and each vector is recorded only in the inverted list of the cluster it belongs to.

Query phase:

  1. Compute the distance from the query vector to all nlist centroids, and pick the nearest nprobe clusters
  2. Do exact (or compressed) search only within those nprobe clusters

Key parameters:

  • nlist: number of clusters — larger is finer-grained but makes the index bigger
  • nprobe: number of clusters checked at query time — can be tuned dynamically at runtime; larger means higher Recall

Variants (compression / quantization):

  • IVF_FLAT: no compression — most accurate but most memory-hungry
  • IVF_PQ (Product Quantization): split the vector into subspaces, encode each subspace with a codebook; compression up to 64:1, Recall 70–90%
  • IVF_SQ8: scalar quantization (8-bit per dimension), 4:1 compression, Recall 90%+

Pros and cons: fast to build, low memory, stable under filtering (filter clusters first, then search); but Recall is slightly below HNSW, and at large scale you have to tune nprobe carefully.

Who uses it: Milvus natively supports the full IVF family (most flexible); pgvector’s IVFFlat; Faiss is the inventor of IVF.

HNSW (Hierarchical Navigable Small World graph)#

The most mainstream ANN algorithm in 2026.

Core idea: build the vector space into a layered graph, like “highways + country roads.”

Build phase: every vector is a node in the graph:

  • The top layer has only a few nodes with very “broad” connections (the small-world property: any two points are a few hops apart)
  • Going down layer by layer, the node count grows and connections get “denser”
  • Each node has at most m edges (typically 8–64)

Query phase: start from the entry point at the top layer, greedily hop toward the nearest neighbor, walk down layer by layer, and finally find the exact Top-k at the bottom layer. Search complexity ≈ O(log N).

Key parameters (tunable in Qdrant/Chroma/Milvus):

  • m: max connections per node (larger means higher Recall, but memory ↑)
  • ef_construct: candidate count during graph building (larger means higher graph quality, slower build)
  • hnsw_ef (or ef_search): candidate count at query time (larger means higher Recall, slower query)

Pros and cons: highest Recall (98%+), extremely fast queries, friendly to real-time inserts; but higher memory, and it can degrade under filtering (once too many nodes are filtered out, it becomes a near-full scan).

Who uses it: Qdrant (Rust, heavily optimized HNSW + on-disk); Weaviate (default); Chroma (default HNSW, with SPANN being its cloud variant); Milvus (optional); pgvector (HNSW); Faiss (also supports it).

Other advanced techniques (general)#

  • Quantization: PQ (product quantization), SQ (scalar quantization), Binary Quantization — compress float32 vectors down to int8/int4/bit, exploding memory/speed gains with a slight Recall drop
  • DiskANN / SPANN: disk-friendly versions of HNSW (Chroma cloud, pgvector extension), solving the memory bottleneck
  • Hybrid indexing: many databases support “vector + scalar filter,” coarse-filtering first and then doing a refined search

Algorithm selection cheat sheet (2026 field experience)#

  • Data <100K → Flat is enough
  • Want lowest memory + heavy filtering → IVF (Milvus/pgvector)
  • Want highest Recall + speed → HNSW (Qdrant/Weaviate/Chroma)
  • Largest scale + GPU → low-level Faiss

8. The algorithm choice actually drives the stylistic differences between databases#

If I press down one more layer, what this discussion really demonstrates is:

  • Faiss / Milvus are more of an “index systems engineering” viewpoint
  • Chroma / Qdrant / Weaviate are more of a “productized vector database” viewpoint
  • pgvector is more about “folding vector retrieval into the existing OLTP / SQL world”

And the differences underneath are, much of the time, not marketing but:

  • HNSW vs IVF
  • Whether there’s PQ / SQ quantization capability
  • Whether it supports on-disk / DiskANN / SPANN-style approaches
  • How metadata filtering and ANN retrieval are coupled
  • Whether persistence, distribution, and service-ization are built in

Current understanding / conclusions#

Recording this from an engineering-deployment viewpoint, the conclusions most worth keeping:

  1. Faiss is not a complete vector database — it’s a high-performance index engine
  2. Chroma is better suited to local development, prototype validation, and small-to-medium RAG
  3. Milvus is more like a large-scale, production-grade vector database
  4. pgvector fits teams who have already built their business on Postgres
  5. Qdrant / Weaviate’s value shows up mainly in filtering, hybrid search, and semantic-system capabilities
  6. What really determines a system’s character is often not the database name but the ANN index path underneath
  7. HNSW is the most mainstream ANN algorithm in 2026, but IVF still has the edge in memory-constrained or filtering-heavy scenarios
  8. Quantization (PQ/SQ/Binary) is an important lever for cutting memory and speeding things up, and it requires trading off recall against compression ratio
  9. DiskANN / SPANN are a new direction for solving the memory bottleneck, suited to disk-friendly large-scale deployments
  10. A rule-of-thumb selection formula: <100K use Flat, small-to-medium pick HNSW or Chroma, hundred-million-scale use Milvus or Faiss, already on Postgres go straight to pgvector

So the more accurate question usually isn’t:

“Faiss vs Chroma — which is stronger?”

but rather:

“What do I need right now — low-level index capability, development efficiency, filtering capability, or large-scale production-system capability?”

To be filled in#

  1. Migration paths for Faiss, Milvus, Qdrant, Weaviate, and pgvector in real production RAG
  2. The performance boundaries of HNSW vs IVF under different filter conditions (e.g., HNSW’s degradation curve after filtering out 90% of nodes)
  3. Actual compression-ratio and speed numbers for PQ / SQ / Binary Quantization at different recall thresholds
  4. How to design the system when combining hybrid search, rerankers, and metadata filtering
  5. A GPU-acceleration comparison across the databases (Faiss GPU vs Milvus GPU vs Qdrant on-disk)

Notes#

  • After re-fetching this time, the browser successfully read the share page’s body text; the earlier failures look more like a hydration / dynamic-rendering timing issue, not an invalid link.
  • The current content leans toward system selection and understanding index structures; if I keep adding to it later, it’s best to split out a more dedicated ANN / vector index note.
  • 2026-05-20 addendum: fully captured the detailed content from the same Grok link, adding the six-database panorama, a deep dive on the key IVF/HNSW parameters, quantization/compression techniques, and the data-scale selection formula.

🗂️ A research from the knowledge base.

← Back