diff --git a/src/core/bot/kb_context.rs b/src/core/bot/kb_context.rs index 0617b740..07eeea06 100644 --- a/src/core/bot/kb_context.rs +++ b/src/core/bot/kb_context.rs @@ -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> { diff --git a/src/core/bot/mod.rs b/src/core/bot/mod.rs index 7a8ddc93..d666562e 100644 --- a/src/core/bot/mod.rs +++ b/src/core/bot/mod.rs @@ -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(), diff --git a/src/core/kb/kb_indexer.rs b/src/core/kb/kb_indexer.rs index cfe0af65..b96bc33d 100644 --- a/src/core/kb/kb_indexer.rs +++ b/src/core/kb/kb_indexer.rs @@ -744,7 +744,7 @@ impl KbIndexer { vector: search_vector, limit, with_payload: true, - score_threshold: Some(0.3), + score_threshold: None, filter: None, };