An NLP filter detects, blocks, or transforms chatbot text that violates safety, topical, factual, or privacy constraints. It acts as a guardrail around generation: useful systems must recognize both harmful outputs and requests designed to elicit them. section 10.1.3
Common filter targets include:
- Bias, violence, bullying, self-harm, and other toxic content. section 10.1.3
- Factually incorrect agreement, unauthorized topics, safeguarding failures, and privacy leaks. section 10.1.3
- Unusual prompts that attempt to trick a system into producing harmful responses. section 10.1.3
Filtering a misspelled medication name
A spaCy Matcher can detect fuzzy variants such as “Tilenol,” identify the matched span, and replace it with “Acetaminophen.”
