EasyDeepLearn

Vector search / approximate nearest neighbors — main algorithms.

medium

Answer

  • (1) HNSW (Hierarchical Navigable Small World): graph-based, dominant in industry (Qdrant, Weaviate, pgvector).
  • (2) IVF-PQ (inverted file + product quantization): FAISS default for very large indexes.
  • (3) ScaNN (Google): partition + reranking.
  • (4) LSH (locality-sensitive hashing): older, still used for near-duplicate detection.
  • Trade-off: recall vs latency vs memory.
  • HNSW default for < 10M vectors; IVF-PQ for > 100M.
Check yourself — multiple choice
  • Just brute force
  • HNSW (graph, default < 10M) / IVF-PQ (FAISS large-scale > 100M) / ScaNN (Google) / LSH (near-duplicate); recall vs latency vs memory tradeoff
  • Random
  • Only tree

ANN: HNSW / IVF-PQ / ScaNN / LSH; HNSW default, IVF-PQ at scale.

#nlp#applications

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions