← All questions
Retrieval & EmbeddingsMedium· LSH· Hashing· Vector Geometry

Why can’t you just put your embeddings in a hash table?

Ordinary hashing is engineered to ensure that near-identical inputs map to unrelated buckets, making it useless for finding nearest neighbors. A suitable hash for embeddings must satisfy the property that the probability of a collision is a function of the distance between vectors, such as the LSH family where the probability of collision is 1 - θ/π.

Code playground (Python)