Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: rerank algorithm (#11266)

Billy Baoe27ff8d3d42c
diff --git a/rag/nlp/search.py b/rag/nlp/search.py
index f8b3d513f9..4dbd9945cc 100644
--- a/rag/nlp/search.py
+++ b/rag/nlp/search.py
@@ -347,7 +347,7 @@ class Dealer:
## For rank feature(tag_fea) scores.
rank_fea = self._rank_feature_scores(rank_feature, sres)
- return tkweight * (np.array(tksim)+rank_fea) + vtweight * vtsim, tksim, vtsim
+ return tkweight * np.array(tksim) + vtweight * vtsim + rank_fea, tksim, vtsim
def hybrid_similarity(self, ans_embd, ins_embd, ans, inst):
return self.qryr.hybrid_similarity(ans_embd,