aumentar: limite de resultados KB de 5/10 para 20/25
All checks were successful
BotServer CI/CD / build (push) Successful in 2m50s
All checks were successful
BotServer CI/CD / build (push) Successful in 2m50s
Aumenta a abrangência da busca em KB para capturar mais contexto relevante, especialmente em documentos com múltiplas entidades como listas de ramais. - inject_kb_context: 5 -> 20 resultados - think_kb: 10 -> 25 resultados - search_active_websites: 5 -> 20 resultados
This commit is contained in:
parent
5338ffab12
commit
d1cd7513d7
2 changed files with 4 additions and 4 deletions
|
|
@ -201,8 +201,8 @@ async fn think_kb_search(
|
|||
// ── 3. Search KBs (KbContextManager handles Qdrant calls) ────────────────
|
||||
let context_manager = KbContextManager::new(kb_manager, db_pool);
|
||||
|
||||
let all_kb_contexts = context_manager
|
||||
.search_active_kbs(session_id, bot_id, &bot_name, query, 10, 2000)
|
||||
let all_kb_contexts = context_manager
|
||||
.search_active_kbs(session_id, bot_id, &bot_name, query, 25, 2000)
|
||||
.await
|
||||
.map_err(|e| format!("KB search failed: {e}"))?;
|
||||
|
||||
|
|
|
|||
|
|
@ -493,11 +493,11 @@ pub async fn inject_kb_context(
|
|||
let context_manager = KbContextManager::new(kb_manager.clone(), db_pool.clone());
|
||||
|
||||
let kb_contexts = context_manager
|
||||
.search_active_kbs(context.session_id, context.bot_id, context.bot_name, context.user_query, 5, context.max_context_tokens / 2)
|
||||
.search_active_kbs(context.session_id, context.bot_id, context.bot_name, context.user_query, 20, context.max_context_tokens / 2)
|
||||
.await?;
|
||||
|
||||
let website_contexts = context_manager
|
||||
.search_active_websites(context.session_id, context.user_query, 5, context.max_context_tokens / 2)
|
||||
.search_active_websites(context.session_id, context.user_query, 20, context.max_context_tokens / 2)
|
||||
.await?;
|
||||
|
||||
let mut all_contexts = kb_contexts;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue