Commit 18bedaf
fix(memory): hybrid_recall log 把 passed 数挂在 thresh 字段误导调参 (#1413)
`(>thresh %d)` 看着是阈值,实际填的是 len(bm25_top) / len(cosine_top) —— 过
阈值后剩下的数量。线上看到 `scored bm25=0 (>thresh 0)` 会被读成"阈值就是 0
所以全过",实际语义是"打分后只剩 0 篇,过阈值的也是 0 篇",阈值常量
HYBRID_RECALL_BM25_THRESHOLD=0.1 完全没出现在 log 里。
拆成 `passed` + `thresh` 两段,过阈值数和阈值常量都显式标出来:
scored bm25=72 (passed 5, thresh=0.10) emb=43 (passed 4, thresh=4.00)
Co-authored-by: Hongzhi Wen <cartabio.coder1@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9fe4b2d commit 18bedaf
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
548 | 551 | | |
549 | | - | |
550 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
551 | 555 | | |
552 | 556 | | |
553 | | - | |
554 | | - | |
| 557 | + | |
| 558 | + | |
555 | 559 | | |
556 | 560 | | |
557 | 561 | | |
| |||
0 commit comments