best: score 0.5541 (recall 0.5759, ndcg 0.4670)
- DENSE_PREFETCH_K 80 → 120 - RERANK_LIMIT 25 → 35 - add question.text as extra dense when differs from search_text Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6f122eabd0
commit
dc3a5b9dfd
1 changed files with 7 additions and 4 deletions
|
|
@ -162,10 +162,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 = 120
|
||||||
SPARSE_PREFETCH_K = 200
|
SPARSE_PREFETCH_K = 200
|
||||||
RETRIEVE_K = 150
|
RETRIEVE_K = 150
|
||||||
RERANK_LIMIT = 25
|
RERANK_LIMIT = 35
|
||||||
KEYWORD_BOOST_EXTRA = 10
|
KEYWORD_BOOST_EXTRA = 10
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -405,13 +405,16 @@ async def search(payload: SearchAPIRequest) -> SearchAPIResponse:
|
||||||
|
|
||||||
dense_vectors = [dense_vector]
|
dense_vectors = [dense_vector]
|
||||||
extra_texts: list[str] = []
|
extra_texts: list[str] = []
|
||||||
|
raw_text = question.text.strip()
|
||||||
|
if raw_text and raw_text != dense_query:
|
||||||
|
extra_texts.append(raw_text)
|
||||||
for v in (question.variants or []):
|
for v in (question.variants or []):
|
||||||
q_v = v.strip()
|
q_v = v.strip()
|
||||||
if q_v and q_v not in extra_texts:
|
if q_v and q_v != dense_query and q_v not in extra_texts:
|
||||||
extra_texts.append(q_v)
|
extra_texts.append(q_v)
|
||||||
for h in (question.hyde or []):
|
for h in (question.hyde or []):
|
||||||
q_h = h.strip()
|
q_h = h.strip()
|
||||||
if q_h and q_h not in extra_texts:
|
if q_h and q_h != dense_query and q_h not in extra_texts:
|
||||||
extra_texts.append(q_h)
|
extra_texts.append(q_h)
|
||||||
extra_texts = extra_texts[:3]
|
extra_texts = extra_texts[:3]
|
||||||
if extra_texts:
|
if extra_texts:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue