Kevin Hu commited on
Commit
770b18a
·
1 Parent(s): caf7eaa

expand rerank range (#2746)

Browse files

### What problem does this PR solve?


### Type of change

- [x] Performance Improvement

Files changed (1) hide show
  1. rag/nlp/search.py +1 -1
rag/nlp/search.py CHANGED
@@ -364,7 +364,7 @@ class Dealer:
364
  if not question:
365
  return ranks
366
  RERANK_PAGE_LIMIT = 3
367
- req = {"kb_ids": kb_ids, "doc_ids": doc_ids, "size": page_size*RERANK_PAGE_LIMIT,
368
  "question": question, "vector": True, "topk": top,
369
  "similarity": similarity_threshold,
370
  "available_int": 1}
 
364
  if not question:
365
  return ranks
366
  RERANK_PAGE_LIMIT = 3
367
+ req = {"kb_ids": kb_ids, "doc_ids": doc_ids, "size": max(page_size*RERANK_PAGE_LIMIT, 128),
368
  "question": question, "vector": True, "topk": top,
369
  "similarity": similarity_threshold,
370
  "available_int": 1}