A developer preparing web data for a large language model (LLM) might remove material identified as hateful or explicit. This is content filtering: screening and removing content according to safety or policy criteria. The aim is to reduce the chance that the model generates inappropriate responses. section 3.2 section 3.20
Filtering can happen before training. A classifier—a system trained to sort content into categories—screens pretraining data for potentially toxic or unsafe material. Developers can then remove the identified data. This differs from conditional pretraining, which keeps data but labels it so the model can be directed toward safer examples when generating responses. section 3.7
Filtering a training source
If Reddit is one source of pretraining data, developers might identify subreddits containing substantial toxic speech and exclude them. Alternatively, conditional pretraining could label those subreddits unsafe and other texts safe, rather than removing them. section 3.7
Filtering has trade-offs. Classifying enormous datasets is expensive, and a small, efficient classifier may be less accurate than a large model. Filters can also suppress the voices of LGBTQ+ people and other marginalized groups when removing harmful content. More sophisticated methods seek to preserve diverse voices, but remain imperfect and are often proprietary. section 3.7 section 3.2
Filtering can also screen inputs to AI agents. Alongside safeguards such as logging, permission boundaries, and human oversight, it can help address risks from malicious instructions or sensitive information. No single defense is fully effective, especially against adversarial pressure. section 8.19 section 8.22

































