#vector-search
-
How to Tune the HNSW M Parameter: Pick the Smallest Graph That Hits Your Recall SLO
M is the one HNSW build parameter you cannot change without a rebuild. What it does, what it is called in hnswlib, Faiss, pgvector, Qdrant, Weaviate, Milvus, Elasticsearch and OpenSearch, the memory formula, and a Python sweep that logs recall@10, p99 and bytes per vector.
-
Cosine Similarity vs Dot Product Explained: When They Rank the Same and When They Don't
Cosine similarity and dot product are the same function only on unit-length vectors. The math, the one norm check that tells you which you are actually running, and the FAISS, pgvector, Qdrant and hnswlib configs where the difference bites.
-
HNSW ef_search Parameter Explained: The Knob That Trades Recall for p99
ef_search is the beam width of an HNSW query. What it controls, what it is called in hnswlib, Faiss, pgvector, Qdrant, Weaviate, Milvus and Elasticsearch, the recall@k metric that tells you if it is set right, and a Python sweep that exports it to Prometheus.