AI Engineering Playbook
Vector Databases

Vector Databases

Where the vectors live — and everything that gets hard once they do.

Prerequisites

  • Embeddings — what you're storing.
  • ANN Indexes — the data structure a vector DB is mostly a wrapper around. Read that first or this section reads as vendor trivia.

Why this section exists

A vector database is not a new category of database so much as an ANN index plus the boring things an index alone doesn't give you: durability, updates and deletes, metadata filtering, multi-tenancy, backups, replication, and an API that isn't a Python process holding everything in RAM.

That framing is the whole section. A feature comparison is rarely what you need; what matters is understanding what problem the product solves over a raw index, so you can pick one without cargo-culting. Two questions carry most of the weight:

  1. "Do you even need a dedicated vector DB?" — often no. If you already run Postgres and have a few million vectors, pgvector keeps your vectors transactionally consistent with the rows they describe, which is worth more than marginal QPS.
  2. "How do you filter by permissions without destroying recall?" — the question that separates shipped retrieval from demoed retrieval. Filtering and ANN search interact badly, and the failure is silent: you get results, they're just the wrong ones.

What's in here

PageThe question it answers
The Landscapepgvector vs Pinecone vs Qdrant vs Weaviate vs Chroma vs FAISS — a decision framework, not a feature dump
Filtering & MetadataPre- vs post-filtering, why filters break recall, and how to design metadata you can actually query
Scaling & OperationsSharding, index rebuilds, multi-tenancy, backup, and consistency between source of truth and index

Where this connects

  • RAG — retrieval is where all of this gets exercised; entitlement-filtered retrieval in particular is a filtering problem wearing a RAG hat.
  • Production — the index is a cache of your corpus, and every cache has a staleness story.
  • Design: Enterprise RAG — the sizing and sharding maths from here, applied to a full system.
Filtering & Metadata

On this page