From 352ff8b45c941eb8e9ea74008aacf61d93a730fa Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Wed, 15 Apr 2026 16:28:41 -0300 Subject: [PATCH] Lower score threshold to 0.20 and add KB result logging --- src/core/bot/kb_context.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/bot/kb_context.rs b/src/core/bot/kb_context.rs index 8f9d21ed..a059442a 100644 --- a/src/core/bot/kb_context.rs +++ b/src/core/bot/kb_context.rs @@ -407,6 +407,9 @@ impl KbContextManager { for result in results { let tokens = estimate_tokens(&result.content); + + info!("KB result - score: {:.3}, tokens: {}, content_len: {}, path: {}", + result.score, tokens, result.content.len(), result.document_path); if total_tokens + tokens > max_tokens { debug!( @@ -416,7 +419,7 @@ impl KbContextManager { break; } - if result.score < 0.25 { + if result.score < 0.20 { debug!("Skipping low-relevance result (score: {})", result.score); continue; }