Fix KB search: remove score threshold to improve results
All checks were successful
BotServer CI/CD / build (push) Successful in 2m54s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-15 14:04:11 -03:00
parent dd699db19e
commit 148ad0cc7c
3 changed files with 4 additions and 4 deletions

View file

@ -456,8 +456,8 @@ impl KbContextManager {
context_parts.push("\n--- End Knowledge Base Context ---\n".to_string());
let full_context = context_parts.join("\n");
// Truncate KB context to fit within token limits (max 400 tokens for KB context)
crate::core::shared::utils::truncate_text_for_model(&full_context, "local", 400)
// Truncate KB context to fit within token limits (max 8000 tokens for KB context)
crate::core::shared::utils::truncate_text_for_model(&full_context, "local", 8000)
}
pub fn get_active_tools(&self, session_id: Uuid) -> Result<Vec<String>> {

View file

@ -809,7 +809,7 @@ impl BotOrchestrator {
bot_name: &bot_name_for_context,
user_query: &message_content,
messages: &mut messages,
max_context_tokens: 8000,
max_context_tokens: 16000,
};
if let Err(e) = inject_kb_context(
kb_manager.clone(),

View file

@ -744,7 +744,7 @@ impl KbIndexer {
vector: search_vector,
limit,
with_payload: true,
score_threshold: Some(0.3),
score_threshold: None,
filter: None,
};