pgvector vs numpy on 100k vectors: exact scan is 5x slower, HNSW is 7x faster
On 100k x 384 vectors, numpy exact search took 7.2 ms, pgvector without an index 37 ms, and pgvector HNSW 1.0 ms at 0.955 recall@10. Measured on 2 vCPUs.
Embedding dimensions: what 256 vs 1024 vs 3072 costs in memory, latency and recall
Truncating a Matryoshka embedding from 1024 to 256 dims cut memory 4x and lost 1.8 points of recall@10 on 705 FastAPI doc queries. int8 lost nothing.
Multi-tenant RAG without data leaks: 5 designs, one test suite
Unfiltered and prompt-only retrieval leaked on 1,800 of 1,800 test queries. Per-tenant partitions leaked on 0. Canary tests, and the falsy-tenant bug they miss.
Metadata filtering in vector search: post-filter loses results, measured
At 1% selectivity, post-filtering top-100 from HNSW recalled 19% of the true results. In-graph filtering kept 100% but took 17 ms. Measured on 100k vectors.
Do you need a vector database? Brute-force search benchmarked from 10k to 1M vectors
Exact numpy search over 100k embeddings takes 3.5 ms on 2 vCPUs. Measured latency, memory and HNSW recall to show when an index actually pays off.