Port v5-revert params from Lotus (best score 0.5517 vs our 0.5094)

Score formula: recall×0.8 + ndcg×0.2 → recall 4x more important

index: CHUNK_SIZE 256→384 (sweet spot, not too small, not too large)
search: DENSE 80→50, SPARSE 200→150, RETRIEVE 150→100, RERANK 10→15
  Fewer candidates = less noise = better recall

Lotus experiments confirmed: 80/200/150 limits HURT vs 50/150/100.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
q 2026-04-18 20:28:35 +03:00
parent 57a5229c95
commit 2bb595e452
2 changed files with 5 additions and 5 deletions

View file

@ -74,7 +74,7 @@ class SparseVector(BaseModel):
values: list[float]
CHUNK_SIZE = 256
CHUNK_SIZE = 384
OVERLAP_SIZE = 128
SPARSE_MODEL_NAME = "Qdrant/bm25"
FASTEMBED_CACHE_PATH = "/models/fastembed"

View file

@ -161,10 +161,10 @@ async def lifespan(app: FastAPI):
app = FastAPI(title="Search Service", version="0.1.0", lifespan=lifespan)
DENSE_PREFETCH_K = 80
SPARSE_PREFETCH_K = 200
RETRIEVE_K = 150
RERANK_LIMIT = 10
DENSE_PREFETCH_K = 50
SPARSE_PREFETCH_K = 150
RETRIEVE_K = 100
RERANK_LIMIT = 15
async def embed_dense(client: httpx.AsyncClient, text: str) -> list[float]: