-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Why?
Per user bayes DB is very effective at spam qualification: low false positives / negatives and low run overhead.
However is is a supervised learning method and suffer from cold boot: the user needs to manually report ~50 mails in order for the bayesian qualifier to be effective.
In contrast LLMs are way more expensive to run (an order of magnitude) and less relevant than specialized well trained algorithms.
What?
We want that, if the bayes sample is insufficiant for effective qualification, fallback to LLMs prediction and use it to train bayes.
How?
Modify RspamD mailet to add decision symbols into headers (at least the bayes ones).
Write a IsRspamdBayesCalledmatcher that returns true if the bayesian module is sufficiently trained to run.
Write a LLMSpamOracle mailet that calls a generative AI model and ask the question: choose one of these three world to qualify the following email message: SPAM, HAM or NEUTRAL. Store that result into an attibute.
Write a LearnAsHam mailet.
Write a LearnAsSpam mailet.
Write a Sampling matcher that takes a float between 0 and 1 and represent the chance to be matched. Can be usefull to control the workload pushed to the LLM.