Lower score threshold to 0.20 and add KB result logging
All checks were successful
BotServer CI/CD / build (push) Successful in 3m32s
All checks were successful
BotServer CI/CD / build (push) Successful in 3m32s
This commit is contained in:
parent
2c6ed89319
commit
352ff8b45c
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue