Skip to content

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

expand rerank range (#2746)

Kevin Hu04ff9cda7c10
diff --git a/rag/nlp/search.py b/rag/nlp/search.py
index 914b49c20c..89a2592ece 100644
--- a/rag/nlp/search.py
+++ b/rag/nlp/search.py
@@ -364,7 +364,7 @@ class Dealer:
if not question:
return ranks
RERANK_PAGE_LIMIT = 3
- req = {"kb_ids": kb_ids, "doc_ids": doc_ids, "size": page_size*RERANK_PAGE_LIMIT,
+ req = {"kb_ids": kb_ids, "doc_ids": doc_ids, "size": max(page_size*RERANK_PAGE_LIMIT, 128),
"question": question, "vector": True, "topk": top,
"similarity": similarity_threshold,
"available_int": 1}