Document collections are full of near-duplicates : the same policy exported twice, a page with a new footer, version 1 and version 2 of a contract. Indexed for RAG, they fill the top-k results with copies of one passage and crowd out everything else. MinHash finds them efficiently: split each document into overlapping word shingles , and compare documents by Jaccard similarity (shared shingles ÷ all shingles). MinHash compresses each document into a short signature whose matching positions estimate Jaccard, and LSH banding finds candidate pairs without comparing every document to every other. One warning from my test: two versions of a policy with different numbers are 66% similar . Deduplicate copies; never deduplicate versions.
Shingles and Jaccard similarity
A shingle is a run of k consecutive words.…