Hand-written rules only catch obvious junk. So labs train a small, fast model on examples of good and bad text, let it score every page from 0 to 1, and keep only the high scorers. This is the FineWeb-Edu idea — play with all three steps.
A quality grader is just a model you fit to labelled examples — the same 'fit a function to data' idea, aimed at one question: does this read like the good stuff?
Once trained, the grader reads a brand-new page and outputs a single number between 0 and 1 — how much it looks like the good examples.
Now every one of billions of pages has a score. You keep the ones above a cut-off — one slider that decides how big, and how clean, your corpus is.
You can now grade pages for quality. But a high-quality page can still be toxic, unsafe, or full of personal data. Next, safety filtering: the separate pass that strips harmful and private content before a single token reaches the model.