Overview
FAISS, pgvector, and Qdrant do the same core job differently — here's the cheat-sheet for picking one.
Why it matters
Searching for the k-nearest vectors by brute force means comparing your query against every stored vector — fine for 10,000 chunks, unusable at 50 million. A vector store solves this with an approximate nearest-neighbour (ANN) index (commonly HNSW, a navigable small-world graph) that finds almost the true nearest neighbours in a fraction of the time, trading a small amount of recall for a large amount of speed.
The three tools you'll meet constantly differ in where they live, not in the core algorithm:
- FAISS is a library, not a database — it runs in-process, has no persistence or server of its own, and is the fastest option for research or a single-machine prototype.
- pgvector is a Postgres extension: you get ANN search inside your existing relational database, so a single SQL query can filter by
WHERE customer_id = 42and rank by vector distance in one shot — ideal when your metadata already lives in Postgres. - Qdrant (like Pinecone, Weaviate, Milvus) is a purpose-built vector database with its own server, rich metadata filtering, and horizontal scaling — the right choice once you outgrow a single Postgres instance or need production features like replication.
The decision that's hard to reverse is metadata filtering: if you need 'find similar chunks, but only from documents tagged region=EU and updated after 2024', pick a store that filters before the ANN search, not after — filtering after ranking can return zero results even when good matches exist.
