AI spam classification: default to 2 KiB of text and a +2.0 cap on the model's tag, as calibrated for low-end CPU-only instances
The calibration harness (tests/src/system/ai_calibration.rs, ignored) sends what the classifier sends to a real local model and scores its answers with the classifier's parser.
This commit is contained in:
@@ -31,11 +31,11 @@ pub struct AiLimits {
|
||||
impl Default for AiLimits {
|
||||
fn default() -> Self {
|
||||
AiLimits {
|
||||
spam_max_added: 5.0,
|
||||
spam_max_added: 2.0,
|
||||
spam_max_subtracted: 1.0,
|
||||
spam_call_ceiling: Duration::from_millis(20_000),
|
||||
max_concurrent_calls: 4,
|
||||
max_content_bytes: 16_384,
|
||||
max_content_bytes: 2_048,
|
||||
failure_backoff: Duration::from_millis(60_000),
|
||||
user_calls_per_hour: 60,
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ impl SpamFilterAnalyzeScore for Server {
|
||||
// inbuxa: AI-13: the model's tag moves the score only so far, and
|
||||
// never discards or rejects on its own
|
||||
if inbuxa_features::ai::answer::is_llm_tag(tag) {
|
||||
let (max_added, max_subtracted) = ctx.result.llm_bounds.unwrap_or((5.0, 1.0));
|
||||
let (max_added, max_subtracted) = ctx.result.llm_bounds.unwrap_or((2.0, 1.0));
|
||||
let score = match self.core.spam.lists.scores.get(tag) {
|
||||
Some(SpamFilterAction::Allow(score)) => {
|
||||
inbuxa_features::ai::answer::clamp(*score, max_added, max_subtracted)
|
||||
|
||||
Reference in New Issue
Block a user