4 ms·
For a very immediate example, I can already see a clear path to somebody coming up with an LLM service that will automatically filter out political spam texts a
by crooked-v 3y ago
For a very immediate example, I can already see a clear path to somebody coming up with an LLM service that will automatically filter out political spam texts and emails. (Maybe it already exists and I just haven't seen it yet.)
- kaibee 3y agoI am endlessly frustrated every day that this is not a thing yet. I also don't want to send all of my emails to OpenAI though.
- samus 3y agoI recently did a Kaggle experiment and finetuned a LLM to classify SMS as SPAM or HAM. It was not so difficult; following the text classification example in the Hugginface transformers docs was enough. Without trying hard at all, accuracy was above 90%. Impressive even though even the messages marked as HAM seemed to be quite trash. The model itself was small - few hundred million parameters only. Models of this size run well on CPUs and an even smaller might have workd too. And non-neural classifiers might also do fine. You could do something similar and unleash it on your mailbox. The tricky part are integrations. At work, I don't even bother since interacting with the email system there is way more tricky than with GMail.
- jart 3y agoYou can configure Postfix to filter content based on a shell script. https://www.postfix.org/FILTER_README.html https://www.postfix.org/FILTER_README.html You can turn the email into plain text from your shell script using links and then ask Mistral if it's spam or political: https://justine.lol/oneliners/#url https://justine.lol/oneliners/#url You can use the grammar flag to force Mistral to only provide a YES or NO answer, which is easy to check from your script using an IF statement. Then boom, no more spam or politics.
- chasd00 3y agoseems like that would be very straightforward to the point that i could probably do it but maybe not in the most elegant way. I would be surprised if there wasn't a model on hugging face trained to identify the political leaning of some text. I bet it would be small enough to run locally, then it's a matter of creating a plugin/module or something that you add to your email client that runs on every new mail. Based on the result, move the email to your political spam folder.
- samus 3y agoLLM is just quite compute-intensive. You could send emails to the OpenAI API to classify them as SPAM or HAM, but you'd probably cry at the bill. That should explain why it doesn't exist in free-tier accounts. Worry not, even in the event you belong to the GPU-poor, a beefy CPU should allow you to run a small LLM on your local machine. And if you find a good dataset for it, you can train the model in a Google Collab.
- galdosdi 3y agoOn a related note, in 2002, Paul Graham arguably invented (IIRC) the spam filtering that is now commonly in use. While email spam still exists today, it was way, way, way, way worse before Gmail introduced bayesian spam filtering around that time. Today it's an occasional amusement. In those last days before spam filtering got a lot better it was reaching the point of seriously making it difficult to use email because the majority of your inbox was spam. The crazy part is it's really just this simple bayesian approach that solved like 95% of the problem. Simple math that already existed. Stuff that can be explained to a high schooler. No new crazy ML/AI, none of that. Just someone stepping back and pointing out "hey, I think we can use this tool here...." There was a lot more lower hanging fruit in those days. https://paulgraham.com/spam.html https://paulgraham.com/spam.html
- visarga 3y agoI remember "A plan for spam", I implemented the algo myself, and it's my first contact with ML.
- galdosdi 3y agoYou did? At Google? Cool! :) And thanks! As you can guess I still very pleasantly remember when the feature hit and the spam issue got so much better. I always wonder which pieces of my code from my career I'm proud of are still running somewhere. Unfortunately, it's mostly been proprietary stuff so there's really no telling.