Before working examples, let's map out every cell a curation problem can land in. Each row is a "situation class"; every example below is tagged with the cell it fills.
Recall the symbol-to-word ratio. A document has W words (space-separated chunks of letters) and S symbol characters (things like #, …, @). We defined
rsym=WS,
which measures "how many weird characters per word." Prose keeps this tiny; junk inflates it. Rule from the parent (with our convention): drop iff rsym>0.1; keep if rsym≤0.1.
The symbol-ratio number line: one wall at 0.10 splits keep from drop. The teal keep-zone sits at or left of the wall; the orange drop-zone is strictly right. Doc A (0.04, teal) keeps; Doc B (0.15, orange) drops. Doc C is the empty page: its ratio S/0 is off the chart to the right — we draw a plum arrow running past the right edge with the label "→∞" to show it is not a real point but a runaway limit, always landing deep in the drop-zone.
We represent a document as its set of k-shingles A (overlapping k-word windows). Two docs' overlap is the Jaccard similarityJ(A,B)=∣A∪B∣∣A∩B∣,
"shared shingles over total distinct shingles." Now the MinHash machinery. A hash functionh is a rule that maps each shingle to a random-looking number; minhashh(A)=minx∈Ah(x) is the smallest such number over set A. The subscript h just names which random hash we used — we will use m different independent ones, h1,…,hm. MinHash's magic fact:Pr[minhashh(A)=minhashh(B)]=J(A,B),
so counting matches across m random hashes estimatesJ without comparing full documents. Our dedup threshold is θ=0.8: flag as near-duplicate iff J≥0.8.
Two shingle sets drawn as overlapping circles: the teal crescent is A-only, the orange crescent is B-only, and the plum lens in the middle is A∩B. The Jaccard similarity J is the plum lens measured as a fraction of the whole two-circle union. The picture makes the "magic fact" visible: throw one random hash, look at whichever shingle wins the minimum over the union — it is equally likely to be any shingle, so the chance it lands inside the plum lens (making the two minhashes agree) is exactly that lens-fraction J.
To dodge the O(N2) all-pairs comparison, split m=br hashes into bbands of rrows. Docs matching a whole band become candidate pairs. Let's build the S-curve from scratch, one probability at a time, before quoting it.
The LSH S-curve P(s)=1−(1−sr)b for b=20,r=5, drawn in orange. It starts almost flat near zero, then rises steeply through a "wall" and saturates near one — that flatness-then-cliff shape is exactly what makes LSH cheap. The dotted ink line marks P=0.5; the plum dashed vertical marks the exact wall s0≈0.509 from the derivation. The teal dash-dot line is our target θ=0.8, where the curve is already at P≈0.9997 (true duplicates are almost surely caught). The ink dot at s=0.3 shows P≈0.047 (dissimilar pairs almost never become candidates, saving compute).
Given domains d with token counts Nd and target weights wd (with ∑dwd=1), over a training budget of T tokens each domain is seen for
ed=NdwdT("effective epochs").
Keep ed modest: by our convention, memorization-safe iff ed≤4. See Data Mixture and Domain Weighting for the reweighting theory.
W=0) in the symbol filter — keep or drop, and why?
Drop. S/0 is undefined; as W→0+ the ratio →+∞>0.1, so the limiting decision is "drop" — a text-free page carries no learning signal.
Recall A doc has
rsym=0.10 exactly. Keep or drop under our convention?
Keep. The symbol rule drops iffrsym>0.1, so the wall belongs to the keep side (benefit of the doubt for quality filters).
Recall A pair has
J=θ=0.8 exactly. Duplicate or not, and why is this the opposite convention to the quality filters?
Duplicate — dedup flags iffJ≥θ, so the wall sits on the drop side. Letting borderline leaks through is the costlier error, so we err toward removing.
Recall A doc is too short to form any
k-shingle. What is J with another doc, and what do we do?
A=∅ makes J undefined (0/0 if both empty). We patch it to J=0 (never a duplicate) and drop the too-short doc at the earlier quality stage.
Recall Why is a whole-band match probability
sr and the candidate probability 1−(1−sr)b?
A band is a candidate only if all r rows match (AND ⇒ multiply ⇒ sr). The pair is a candidate if at least one of b bands matches (OR ⇒ 1 minus "all fail" ⇒ 1−(1−sr)b).
Recall For
b=20,r=5, is the exact LSH crossover s0 closer to 0.51 or 0.55?
About 0.51 — the exact (1−2−1/b)1/r≈0.509. The rule-of-thumb (1/b)1/r≈0.549overestimates.
Recall With
m=200 hashes and J=0.8, what is Var(J^)?
J(1−J)/m=0.8×0.2/200=0.0008, so standard error ≈0.028.
Recall In Cell J, which domain crosses the
ed≤4 guardrail, and at what value?
Books, at ebooks=5.0 epochs — a scarce pool (50B) paired with a high weight (0.25).