J-Ha_Hasegawa reported an issue with Discourse AI spam detection: a clearly spammy post was not blocked despite the scan log flagging it as SPAM. The AI test feature incorrectly returned “Not spam” — a bug later confirmed by Roman, who identified that the Spam Detector persona’s system prompt was confusing Claude models. A fix was submitted via GitHub PR #34442 to clarify response formatting, resolving the test output discrepancy J-Ha_Hasegawa. However, the post still wasn’t blocked during live posting. After investigation, Roman explained that AI spam detection skips posts from users with Trust Level 2+, staff, bots, or those with >3 regular posts. J-Ha_Hasegawa realized they had posted as an admin (TL4), which bypasses spam checks. Switching to a TL0 test user resolved the issue — the spam post was correctly flagged and unlisted by the discourse_ai_spam user. The thread concludes with gratitude for the prompt, helpful support and confirmation that the system works as intended when used with appropriate user permissions.
I’ve enabled the Discourse AI spam handling on our forum. I’ve set up Claude Sonnet 4 with an API key and selected the Spam detector persona.
I did a test post that is clearly spam. Nothing subtle about it.
It was not blocked and was posted immediately.
When I gave the post URL to the spam bot using the test feature, the result says Not spam, but in the Scan log it says: SPAM - This is a clear promotional advertisement…
My expectation would be that the result would be SPAM, matching the Scan log declaration of SPAM. And that this would then queue up the post for review by admins and moderators, for example.
Might anyone be able to share what I’m missing? I’m no expert – so am open to any guidance!
Ah, fantastic! The test feature is working as expected.
I am wondering if you might be able to help with why the AI Spam feature is still not blocking a spammy post from being immediately posted? I sent the post to the AI Spam test and it is flagging it as spam - but it was posted.
Am I missing a connecting piece perhaps? Thank you so much for your help with this!