Skip to content

Commit

Permalink
expand rerank range (#2746)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
  • Loading branch information
KevinHuSh authored Oct 8, 2024
1 parent 5cc9981 commit 04ff9cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rag/nlp/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 04ff9cd

Please sign in to comment.