Commit 4d000c94f48fcbe1d95fc255aa7842be03dad4d0
1 parent
30b490e1
融合公式调参
Showing
2 changed files
with
32 additions
and
33 deletions
Show diff stats
config/config.yaml
| @@ -285,7 +285,7 @@ coarse_rank: | @@ -285,7 +285,7 @@ coarse_rank: | ||
| 285 | input_window: 700 | 285 | input_window: 700 |
| 286 | output_window: 240 | 286 | output_window: 240 |
| 287 | fusion: | 287 | fusion: |
| 288 | - es_bias: 0.1 | 288 | + es_bias: 10.0 |
| 289 | es_exponent: 0.05 | 289 | es_exponent: 0.05 |
| 290 | text_bias: 0.1 | 290 | text_bias: 0.1 |
| 291 | text_exponent: 0.35 | 291 | text_exponent: 0.35 |
| @@ -293,10 +293,10 @@ coarse_rank: | @@ -293,10 +293,10 @@ coarse_rank: | ||
| 293 | # 因为es的打分已经给了trans进行了折扣,所以这里不再继续折扣 | 293 | # 因为es的打分已经给了trans进行了折扣,所以这里不再继续折扣 |
| 294 | text_translation_weight: 1.0 | 294 | text_translation_weight: 1.0 |
| 295 | knn_text_weight: 1.0 | 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 | knn_bias: 0.6 | 298 | knn_bias: 0.6 |
| 299 | - knn_exponent: 0.2 | 299 | + knn_exponent: 0.4 |
| 300 | 300 | ||
| 301 | # 精排配置(轻量 reranker) | 301 | # 精排配置(轻量 reranker) |
| 302 | fine_rank: | 302 | fine_rank: |
| @@ -324,21 +324,21 @@ rerank: | @@ -324,21 +324,21 @@ rerank: | ||
| 324 | # max(knn_text_weight * text_knn, knn_image_weight * image_knn) | 324 | # max(knn_text_weight * text_knn, knn_image_weight * image_knn) |
| 325 | # + knn_tie_breaker * 另一侧较弱信号 | 325 | # + knn_tie_breaker * 另一侧较弱信号 |
| 326 | fusion: | 326 | fusion: |
| 327 | - es_bias: 0.1 | 327 | + es_bias: 10.0 |
| 328 | es_exponent: 0.05 | 328 | es_exponent: 0.05 |
| 329 | - rerank_bias: 1.0e-05 | 329 | + rerank_bias: 0.1 |
| 330 | rerank_exponent: 1.15 | 330 | rerank_exponent: 1.15 |
| 331 | - fine_bias: 1.0e-05 | 331 | + fine_bias: 0.1 |
| 332 | fine_exponent: 1.0 | 332 | fine_exponent: 1.0 |
| 333 | text_bias: 0.1 | 333 | text_bias: 0.1 |
| 334 | text_exponent: 0.25 | 334 | text_exponent: 0.25 |
| 335 | # base_query_trans_* 相对 base_query 的权重(见 search/rerank_client 中文本 dismax 融合) | 335 | # base_query_trans_* 相对 base_query 的权重(见 search/rerank_client 中文本 dismax 融合) |
| 336 | text_translation_weight: 0.8 | 336 | text_translation_weight: 0.8 |
| 337 | knn_text_weight: 1.0 | 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 | knn_bias: 0.6 | 340 | knn_bias: 0.6 |
| 341 | - knn_exponent: 0.2 | 341 | + knn_exponent: 0.4 |
| 342 | 342 | ||
| 343 | # 可扩展服务/provider 注册表(单一配置源) | 343 | # 可扩展服务/provider 注册表(单一配置源) |
| 344 | services: | 344 | services: |
scripts/evaluation/eval_framework/prompts.py
| @@ -130,21 +130,18 @@ Typical situations: | @@ -130,21 +130,18 @@ Typical situations: | ||
| 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. | 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 | Typical examples: | 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 | ## Judgment Principles | 146 | ## Judgment Principles |
| 150 | 147 | ||
| @@ -277,16 +274,18 @@ _CLASSIFY_TEMPLATE_ZH = """ä½ æ˜¯ä¸€ä¸ªæœé¥°ç”µå•†æœç´¢ç³»ç»Ÿä¸çš„ç›¸å…³æ€§åˆ | @@ -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 |