Commit 418b6a4a5e62dce57b02b9c13b7b66b8ba6d0dbc

Authored by tangwang
1 parent f8219b5e

调参

Showing 2 changed files with 8 additions and 8 deletions   Show diff stats
config/config.yaml
... ... @@ -248,8 +248,8 @@ coarse_rank:
248 248  
249 249 # 精排配置(轻量 reranker)
250 250 fine_rank:
251   - enabled: true
252   - input_window: 240
  251 + enabled: false
  252 + input_window: 160
253 253 output_window: 80
254 254 timeout_sec: 10.0
255 255 rerank_query_template: "{query}"
... ... @@ -259,7 +259,7 @@ fine_rank:
259 259 # 重排配置(provider/URL 在 services.rerank)
260 260 rerank:
261 261 enabled: true
262   - rerank_window: 80
  262 + rerank_window: 160
263 263 timeout_sec: 15.0
264 264 weight_es: 0.4
265 265 weight_ai: 0.6
... ... @@ -457,7 +457,7 @@ services:
457 457 model_name: "BAAI/bge-reranker-v2-m3"
458 458 device: null
459 459 use_fp16: true
460   - batch_size: 64
  460 + batch_size: 80
461 461 max_length: 160
462 462 cache_dir: "./model_cache"
463 463 enable_warmup: true
... ...
search/es_query_builder.py
... ... @@ -38,9 +38,9 @@ class ESQueryBuilder:
38 38 knn_text_num_candidates_long: int = 500,
39 39 knn_image_k: int = 120,
40 40 knn_image_num_candidates: int = 400,
41   - base_minimum_should_match: str = "70%",
42   - translation_minimum_should_match: str = "70%",
43   - keywords_minimum_should_match: str = "50%",
  41 + base_minimum_should_match: str = "66%",
  42 + translation_minimum_should_match: str = "66%",
  43 + keywords_minimum_should_match: str = "60%",
44 44 translation_boost: float = 0.4,
45 45 tie_breaker_base_query: float = 0.9,
46 46 best_fields_boosts: Optional[Dict[str, float]] = None,
... ... @@ -549,7 +549,7 @@ class ESQueryBuilder:
549 549 "query": kw,
550 550 "fields": combined_fields,
551 551 "minimum_should_match": self.keywords_minimum_should_match,
552   - "boost": 0.6,
  552 + "boost": 0.8,
553 553 }
554 554 }
555 555 )
... ...