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.

Level: advancedTopic: RAG vector search

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.