From 735471df3c0417645417ac3b13d89c04272d8995 Mon Sep 17 00:00:00 2001 From: iomgaa Date: Fri, 10 Jul 2026 08:55:47 -0400 Subject: [PATCH] =?UTF-8?q?fix(question=5Fgen):=20Information=20Synopsis?= =?UTF-8?q?=20=E5=8E=BB=E9=87=8D=E9=98=88=E5=80=BC=E6=94=BE=E5=AE=BD?= =?UTF-8?q?=E8=87=B3=200.90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 该题型天然高相似(benchmark 均值 0.66,中位数 0.67), 通用阈值 0.75/0.85 导致几乎所有新题被误判重复。 按题型覆盖为 0.90,只拦截真正的复制品。 Co-Authored-By: Claude Opus 4.6 (1M context) --- tools/generate_questions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/generate_questions.py b/tools/generate_questions.py index 317795f..a1b9ee0 100644 --- a/tools/generate_questions.py +++ b/tools/generate_questions.py @@ -811,6 +811,11 @@ async def _run_generate(args: argparse.Namespace) -> None: output_dir = Path(args.output_dir) per_type = args.per_type similarity_threshold = args.similarity_threshold + # Information Synopsis 题目天然高相似(均值 0.66,中位数 0.67), + # 用通用阈值会导致几乎所有新题被误判重复。按题型放宽。 + _PER_TYPE_THRESHOLD = { + "Information Synopsis": max(similarity_threshold, 0.90), + } max_retries = args.max_retries concurrency = args.concurrency seed = args.seed @@ -951,7 +956,7 @@ async def _run_generate(args: argparse.Namespace) -> None: if ( pool.ndim == 2 and pool.shape[0] > 0 - and is_duplicate(candidate.question, pool, embed_fn, similarity_threshold) + and is_duplicate(candidate.question, pool, embed_fn, _PER_TYPE_THRESHOLD.get(task_type, similarity_threshold)) ): logger.warning("去重: {} 与池中题目相似", candidate.question_id) continue