fix(kb): 增大top_k从5到10,确保OCR噪声查询的正确结果不被截断

问题:查询'草原深险服务器备用号服务器近期的一些公告有哪些?'
正确结果index.md'近期公告'在top_k=5时被截断(排在第6位,score=5.85),
导致所有候选都被多关键词检查拒绝,无结果返回。

修复:将gui.py的top_k从5增至10,确保正确结果在搜索范围内。
阈值仍为0.45,后续相关性检查逻辑不变。

测试:7/7用例通过
This commit is contained in:
youpaishidifu
2026-08-13 21:44:59 +08:00
parent a0ace5ec13
commit 05d23b515a
+1 -1
View File
@@ -951,7 +951,7 @@ class MsgBotApp(ctk.CTk):
if cleaned_msg != msg:
logger.debug(f"[{platform}] KB清理后: cleaned={cleaned_msg!r}")
results = self.kb.search(cleaned_msg, top_k=5)
results = self.kb.search(cleaned_msg, top_k=10)
lines = [f"[{platform.upper()}] {msg}"]
if results: