A false positive costs a customer. Tune for that.
Spam filters are usually judged by how much junk they catch. For a contact form the metric that matters is the opposite one.
Ask someone how good a spam filter is and they will tell you what percentage of spam it catches. That is recall, and for an inbox it is a fine headline. For a contact form it is the wrong number to lead with.
The asymmetry
A spam email that gets through costs you the three seconds it takes to delete it. A legitimate inquiry that gets flagged costs you the inquiry. The visitor does not know it happened. They filled in a form, saw “thanks, we will be in touch”, and never heard back. They assume you are unresponsive, and they call the next business in the search results. You never learn any of this.
So the loss function is lopsided. A filter that catches 99 % of spam and flags 2 % of real messages is worse, for most small businesses, than one that catches 90 % of spam and flags 0.2 %.
What “precision” means here
In classifier terms: of the messages we call spam, what share actually are? That is the precision of the spam class, and it is the number that guards against lost customers. spamex is tuned so that it only decides alone when it can hold at least 99 % precision, and reports the result on the home page. Where it cannot reach that bar, it does not decide alone; the message gets a second opinion with more context.
We also report the mirror number, precision inside the ham zone, because a filter that quietly delivers everything to stay “safe” is not doing its job either.
Practical consequences for your handler
- Never silently drop a model or LLM verdict. Drop silently only on hard bot signals (
HONEYPOT_FILLED,FAST_SUBMIT,DUP_KNOWN_SPAM). ForML_SPAMandLLM_SPAM, route to a review folder you actually look at once a week. - Give the visitor a way out. After a spam verdict, show a message with a plain email address. Real people will use it; bots will not.
- Fail open. If the API is down or your quota is exhausted, deliver. A day of spam is cheaper than a day of lost leads.
- Send feedback. When you find a real message in the review folder, one call to
/v1/feedbackfixes it for you and improves the counters for everyone.
What this costs in recall
Less than you would think. Tuning for precision first leaves spam recall in the high nineties on our held-out data; the small share of ambiguous messages gets a second opinion rather than a coin flip. The trade is cheap because the expensive step only sees the residue.
The general lesson is older than spam filters: decide what an error costs before you decide what accuracy means.