Commit 4d000c94f48fcbe1d95fc255aa7842be03dad4d0

Authored by tangwang
1 parent 30b490e1

融合公式调参

config/config.yaml
... ... @@ -285,7 +285,7 @@ coarse_rank:
285 285 input_window: 700
286 286 output_window: 240
287 287 fusion:
288   - es_bias: 0.1
  288 + es_bias: 10.0
289 289 es_exponent: 0.05
290 290 text_bias: 0.1
291 291 text_exponent: 0.35
... ... @@ -293,10 +293,10 @@ coarse_rank:
293 293 # 因为es的打分已经给了trans进行了折扣,所以这里不再继续折扣
294 294 text_translation_weight: 1.0
295 295 knn_text_weight: 1.0
296   - knn_image_weight: 1.0
297   - knn_tie_breaker: 0.1
  296 + knn_image_weight: 2.0
  297 + knn_tie_breaker: 0.3
298 298 knn_bias: 0.6
299   - knn_exponent: 0.2
  299 + knn_exponent: 0.4
300 300  
301 301 # 精排配置(轻量 reranker)
302 302 fine_rank:
... ... @@ -324,21 +324,21 @@ rerank:
324 324 # max(knn_text_weight * text_knn, knn_image_weight * image_knn)
325 325 # + knn_tie_breaker * 另一侧较弱信号
326 326 fusion:
327   - es_bias: 0.1
  327 + es_bias: 10.0
328 328 es_exponent: 0.05
329   - rerank_bias: 1.0e-05
  329 + rerank_bias: 0.1
330 330 rerank_exponent: 1.15
331   - fine_bias: 1.0e-05
  331 + fine_bias: 0.1
332 332 fine_exponent: 1.0
333 333 text_bias: 0.1
334 334 text_exponent: 0.25
335 335 # base_query_trans_* 相对 base_query 的权重(见 search/rerank_client 中文本 dismax 融合)
336 336 text_translation_weight: 0.8
337 337 knn_text_weight: 1.0
338   - knn_image_weight: 1.0
339   - knn_tie_breaker: 0.1
  338 + knn_image_weight: 2.0
  339 + knn_tie_breaker: 0.3
340 340 knn_bias: 0.6
341   - knn_exponent: 0.2
  341 + knn_exponent: 0.4
342 342  
343 343 # 可扩展服务/provider 注册表(单一配置源)
344 344 services:
... ...
scripts/evaluation/eval_framework/prompts.py
... ... @@ -130,21 +130,18 @@ Typical situations:
130 130 - The core product type matches, but the product clearly violates an explicit and important requirement in the query, with little or no acceptable substitutability.
131 131  
132 132 Typical examples:
133   -- Query: “pantsâ€
134   - Product: “shoesâ€
135   - → Wrong product type.
136   -- Query: “slim-fit pantsâ€
137   - Product: “loose wide-leg pantsâ€
138   - → Clear contradiction in fit, with extremely low substitutability.
139   -- Query: “sleeveless dressâ€
140   - Product: “long-sleeve dressâ€
141   - → Clear contradiction in sleeve type.
142   -- Query: “jeansâ€
143   - Product: “sweatpantsâ€
144   - → Different core category, with significantly different style and wearing scenario.
145   -- Query: “bootsâ€
146   - Product: “sneakersâ€
147   - → Different core category, different function, and different usage scenario.
  133 +
  134 +1. **Different core product type with no substitutability**
  135 +- Query: "pants", Product: "shoes"
  136 +- Query: "boots", Product: "sneakers"
  137 +
  138 +2. **Close core product type but clear conflict on key attributes**
  139 +- Query: "slim-fit pants", Product: "loose wide-leg pants"
  140 +- Query: "sleeveless dress", Product: "long-sleeve dress"
  141 +- Query: "loose-fitting hoodie", Product: "slim-fit T-shirt"
  142 +
  143 +3. **Same broad category but significant difference in style or usage scenario**
  144 +- Query: "jeans", Product: "sweatpants / dress pants"
148 145  
149 146 ## Judgment Principles
150 147  
... ... @@ -277,16 +274,18 @@ _CLASSIFY_TEMPLATE_ZH = """你是一个æœé¥°ç”µå•†æœç´¢ç³»ç»Ÿä¸­çš„相关性åˆ
277 274 - 核心商å“类型匹é…ï¼Œä½†å•†å“æ˜Žæ˜¾è¿èƒŒäº†æŸ¥è¯¢ä¸­ä¸€ä¸ªæ˜Žç¡®ä¸”é‡è¦çš„è¦æ±‚,且几乎ä¸å…·å¤‡å¯æŽ¥å—的替代性。
278 275  
279 276 典型情况:
  277 +
  278 +**1. 核心å“ç±»ä¸åŒï¼Œä¸”无替代性**
280 279 - 查询:“裤å­â€ï¼Œå•†å“:“鞋å­â€
281   - → 商å“类型错误。
282   -- 查询:“修身裤â€ï¼Œå•†å“:“宽æ¾é˜”腿裤â€
283   - → ä¸Žç‰ˆåž‹è¦æ±‚明显冲çªï¼Œæ›¿ä»£æ€§æžä½Žã€‚
284   -- 查询:“无袖连衣裙â€ï¼Œå•†å“:“长袖连衣裙â€
285   - → ä¸Žè¢–åž‹è¦æ±‚明显冲çªã€‚
286   -- 查询:“牛仔裤â€ï¼Œå•†å“:“è¿åŠ¨è£¤â€
287   - → 核心å“ç±»ä¸åŒï¼ˆç‰›ä»”裤 vs è¿åŠ¨è£¤ï¼‰ï¼Œé£Žæ ¼å’Œåœºæ™¯å·®å¼‚å¤§ã€‚
288 280 - 查询:“é´å­â€ï¼Œå•†å“:“è¿åŠ¨éž‹â€
289   - → 核心å“ç±»ä¸åŒï¼ŒåŠŸèƒ½å’Œé€‚ç”¨åœºæ™¯å·®å¼‚å¤§ã€‚
  281 +
  282 +**2. 核心å“类相近,但关键属性明显冲çª**
  283 +- 查询:“紧身裤â€ï¼Œå•†å“:“阔腿裤â€
  284 +- 查询:“无袖连衣裙â€ï¼Œå•†å“:“长袖连衣裙â€
  285 +- 查询:“宽æ¾å«è¡£â€ï¼Œå•†å“:“修身Tæ¤â€
  286 +
  287 +**3. 核心å“ç±»åŒå±žå¤§ç±»ï¼Œä½†é£Žæ ¼ã€åœºæ™¯å·®å¼‚巨大**
  288 +- 查询:“牛仔裤â€ï¼Œå•†å“:“è¿åŠ¨è£¤ / 西裤â€
290 289  
291 290 ## 判断原则
292 291  
... ...