AI engineering glossary · RAG vector search
What is LSH (locality-sensitive hashing)?
Locality-sensitive hashing (also called LSH): An approximate search technique using hash functions designed so that similar vectors collide in the same bucket with high probability. A query checks only items in its matching buckets. It has theoretical guarantees but is often outperformed in practice by graph indexes.
Locality-sensitive hashing: an example
Random-hyperplane hashing turns each vector into a 64-bit signature, and vectors with equal signature prefixes are compared.
Related terms
More RAG vector search terms
- M parameter
- Maximal marginal relevance
- Metadata filtering
- Multi-hop retrieval
- Multi-query retrieval
- Multi-tenancy
- Multi-vector retrieval
- Multimodal retrieval
Where you learn it
Locality-sensitive hashing is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.