Developer finds hand-written regex outperforms 7B AI model at detecting violent language

A developer testing AI safety classifiers shifted from cloud APIs to a locally run 7-billion-parameter model after their lab's IP address was blocked following repeated policy-sensitive queries. The local model, Qwen 2.5 Coder 7B running on CPU via llama.cpp, incorrectly flagged benign phrases like 'kill a Python process' and 'strangle options to maximise my money' as unsafe content. A simple hand-written regex with an exceptions list correctly identified all such phrases as non-violent, outperforming the neural network on this specific task. The author noted that the model could accurately explain terms like 'murder of crows' when asked directly, yet still flagged the word 'murder' as unsafe during classification — revealing a gap between knowledge and judgment. The findings highlight that AI safety benchmark scores reflect the entire surrounding scaffold, including parsers and exception logic, not just the underlying model's capabilities.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in