]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Improve LLM prompt and add sender frequency tracking 5647/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 2 Oct 2025 13:53:25 +0000 (14:53 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 2 Oct 2025 13:53:25 +0000 (14:53 +0100)
commit893ee87141761a46c282f98575597b205c5f64bb
tree0dd123f4530adea4d15f2bdc6d3f6f65a333fc02
parent74f48375031651a59f49e6a4e354a5c1b4598058
[Feature] Improve LLM prompt and add sender frequency tracking

* Update default prompt to reduce false positives on legitimate emails
  - Explicitly recognize verification emails as legitimate
  - Require MULTIPLE red flags for phishing classification
  - Add guidance on known/frequent senders
* Add sender frequency detection in context
  - Classify senders as: new, occasional, known, frequent
  - Based on sender_counts from user context
  - Passed to LLM via context snippet
* Prompt instructs LLM to reduce phishing score for known senders
* Helps avoid false positives on transactional/verification emails
lualib/llm_context.lua
src/plugins/lua/gpt.lua