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 @@ def retrieval(self, question, embd_mdl, tenant_id, kb_ids, page, page_size, simi 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}