kb replaces default RRF fusion with weighted hybrid retrieval
The kb project developer says relevant cross-language documents were being retrieved by vector search but then eliminated when BGE-M3 and BM25 results were merged with Reciprocal Rank Fusion. The default hybrid path was changed to weighted_fuse, which normalizes each list and divides by the number of retrieval methods that actually returned a document; relevance thresholds, larger candidate pools, and regression tests were also added. The developer retained RRF for comparisons and explicitly noted that no large-scale benchmark was run.
The report identifies result fusion, rather than model capability, as a possible cause of missing RAG answers and documents a concrete cross-language retrieval fix with test coverage.
先说一个挺扫兴的场景。
你让 AI 记住一句话:「用户最喜欢的音乐是 Poker Face。」过了几天,你问它:「用户最喜欢什么音乐?」它却答不上来。
你去知识库里一看,这句话明明还在。更奇怪的是,单独按「意思相近」来搜,它能排在前面;把另一种搜索方式加进来,它反而从结果里消失了。
我遇到的就是这个问题。一开始我怀疑模型不行,后来才发现:资料找到了,却在合并搜索结果时被淘汰了。
最后我没有换更大的模型,而是改了一个只有几行的排序公式。
一、先不谈技术,知识库到底在干什么
即使没接触过 kb,也可以把它理解成一个放在自己电脑里的资料抽屉。