From 04ff9cda7c10734fb46659c3091dffd949b108bf Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 8 Oct 2024 16:34:33 +0800 Subject: [PATCH] expand rerank range (#2746) ### What problem does this PR solve? ### Type of change - [x] Performance Improvement --- rag/nlp/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/nlp/search.py b/rag/nlp/search.py index 914b49c20..89a2592ec 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}