From deb422d03e1582dffe252e3d55bb56f5d11da833 Mon Sep 17 00:00:00 2001 From: q Date: Sat, 18 Apr 2026 20:28:35 +0300 Subject: [PATCH] Port v5-revert params from Lotus (best score 0.5517 vs our 0.5094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- index/main.py | 2 +- search/main.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index/main.py b/index/main.py index df4575a..5ae3343 100644 --- a/index/main.py +++ b/index/main.py @@ -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" diff --git a/search/main.py b/search/main.py index a55a466..7f9facb 100644 --- a/search/main.py +++ b/search/main.py @@ -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]: