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:
parent
57a5229c95
commit
2bb595e452
2 changed files with 5 additions and 5 deletions
|
|
@ -74,7 +74,7 @@ class SparseVector(BaseModel):
|
||||||
values: list[float]
|
values: list[float]
|
||||||
|
|
||||||
|
|
||||||
CHUNK_SIZE = 256
|
CHUNK_SIZE = 384
|
||||||
OVERLAP_SIZE = 128
|
OVERLAP_SIZE = 128
|
||||||
SPARSE_MODEL_NAME = "Qdrant/bm25"
|
SPARSE_MODEL_NAME = "Qdrant/bm25"
|
||||||
FASTEMBED_CACHE_PATH = "/models/fastembed"
|
FASTEMBED_CACHE_PATH = "/models/fastembed"
|
||||||
|
|
|
||||||
|
|
@ -161,10 +161,10 @@ async def lifespan(app: FastAPI):
|
||||||
|
|
||||||
app = FastAPI(title="Search Service", version="0.1.0", lifespan=lifespan)
|
app = FastAPI(title="Search Service", version="0.1.0", lifespan=lifespan)
|
||||||
|
|
||||||
DENSE_PREFETCH_K = 80
|
DENSE_PREFETCH_K = 50
|
||||||
SPARSE_PREFETCH_K = 200
|
SPARSE_PREFETCH_K = 150
|
||||||
RETRIEVE_K = 150
|
RETRIEVE_K = 100
|
||||||
RERANK_LIMIT = 10
|
RERANK_LIMIT = 15
|
||||||
|
|
||||||
|
|
||||||
async def embed_dense(client: httpx.AsyncClient, text: str) -> list[float]:
|
async def embed_dense(client: httpx.AsyncClient, text: str) -> list[float]:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue