Both sentences are equally correct, but the first sounds more natural. Perhaps the verb "sort" would be more concise.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence