From 85d6ba67b84de2c2d83a29c8f1403326b48b093f Mon Sep 17 00:00:00 2001 From: YANG JIANKUAN Date: Wed, 4 Nov 2026 13:06:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(evals):=20=E5=AF=BC=E5=87=BA=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC=20B=20=E6=94=B9=E5=86=99=E8=BE=93=E5=85=A5=EF=BC=9B?= =?UTF-8?q?=E6=94=B9=E6=AD=A3=E8=A7=84=E8=8C=83=E9=87=8C=20S01=E3=80=81S05?= =?UTF-8?q?=20=E7=9A=84=E5=93=8D=E5=BA=94=E6=96=B9=E5=BC=8F=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=EF=BC=9B=E7=A9=BA=E5=81=8F=E7=A6=BB=E8=A1=A8=E6=B3=A8?= =?UTF-8?q?=E6=98=8E=E3=80=8C=E6=97=A0=E5=81=8F=E7=A6=BB=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- evals/check/GUIDELINES.md | 4 ++-- evals/check/build.py | 4 ++-- evals/check/export_rewrite.py | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 evals/check/export_rewrite.py diff --git a/evals/check/GUIDELINES.md b/evals/check/GUIDELINES.md index 5598527..8074e53 100644 --- a/evals/check/GUIDELINES.md +++ b/evals/check/GUIDELINES.md @@ -28,11 +28,11 @@ | 文件 | 技术参数 | 实质性 / ★ | 商务 | 资格 | 评分项 | 备注 | |---|---|---|---|---|---|---| -| S01 | explicit | explicit + evidence | explicit(商务要求均为实质性) | presence | evidence | 「中标后签订合同前提供」11 处(`award`),投标文件中提供 2 处 | +| S01 | explicit | explicit + evidence | explicit(商务要求均为实质性) | presence | evidence | 「中标后签订合同前提供」11 处(`award`);投标时要提供的有第三方检测报告 12 处、承诺函 5 处(`bid`)。须知(p13)又写证明材料「在投标文件中提供」,和逐条的写法冲突,按逐条的写法 | | S02 | implicit | 符合性条件:explicit(符合性条件响应表);部分 ★:evidence | implicit | presence | evidence | 偏离表只列「除采购需求符合性条件外」的偏离 | | S03 | implicit(以偏离表为准) | ★ 14 条:evidence(要标注参数)+ 实质性响应条款表 | implicit | presence | evidence | ▲ 31 条也要 evidence(级别重要) | | S04 | explicit(全部逐一逐条) | ★:explicit(实质性响应偏离表)+ evidence | explicit | presence | evidence | 另有平台内逐条应答(platform) | -| S05 | implicit(只列正偏离) | 无标注 | implicit | presence(第 1~5 项必须全部提供) | evidence | 偏离表几乎为空是正常的 | +| S05 | implicit(只列正偏离) | 无标注;符合性证明文件第 1~5 项:presence | implicit | presence(资格证明文件第 1~6 项必须提供;专门面向中小企业,中小企业声明函也必须) | evidence | 偏离表几乎为空是正常的 | | S06 | explicit | explicit(斜体下划线逐条) | explicit | presence | evidence | ▲ 要 evidence,未提供视为负偏离;格式写「(如有请提供)」和须知矛盾 | | S07 | **冲突** | ★ 国产化承诺:evidence(承诺函) | **冲突** | evidence(逐一提供证明文件) | evidence | 须知「逐条标明满足与否」vs 格式注「未列入上表的视作完全接受」 | | S08 | explicit(非实质性也逐条) | explicit + evidence | explicit | presence | ▲ 7 项:evidence | | diff --git a/evals/check/build.py b/evals/check/build.py index 13a127a..26c0f7f 100644 --- a/evals/check/build.py +++ b/evals/check/build.py @@ -366,8 +366,8 @@ def build(tender: str, bid: str, style: str, run: str) -> None: if f.get("only_deviations"): devs = [r for r in src if r["deviation"] != "无偏离"] rows = [_row(k, r, columns) for k, r in enumerate(devs, 1)] - empty = {"no": "1", "requirement": "—", "answer": "无偏离", "deviation": "无"} - rows = rows or [{"cells": [empty.get(c, "") for c in columns], "anchor": columns.index("answer")}] + empty = {"no": "1", "requirement": "—", "answer": "—", "deviation": "无偏离"} # 苏采云范本:没有偏离时注明「无偏离」 + rows = rows or [{"cells": [empty.get(c, "") for c in columns], "anchor": columns.index("deviation") if "deviation" in columns else 0}] pool = [ _row(0, r, columns) for r in src if r["deviation"] == "无偏离" ] # 没列出的(默认接受):注入时可以挑来写成偏离 diff --git a/evals/check/export_rewrite.py b/evals/check/export_rewrite.py new file mode 100644 index 0000000..838aad1 --- /dev/null +++ b/evals/check/export_rewrite.py @@ -0,0 +1,33 @@ +"""导出风格 B 改写的输入:从风格 A 的投标文件稿里取出要改写的表格行(evals/check/prompts/style-B.md)。 + + cd server && ../.venv/bin/python ../evals/check/export_rewrite.py <招标文件> [...] +输出:evals/out/check/<招标文件>-B/rewrite-input.json(数组,字段 key、requirement、answer)。 +""" + +from __future__ import annotations + +import json +import pathlib +import sys + +OUT = pathlib.Path(__file__).resolve().parents[1] / "out" / "check" + +for tender in sys.argv[1:]: + spec = json.loads((OUT / f"{tender}-A" / "spec.json").read_text()) + rows: dict[str, dict[str, str]] = {} + for v in spec["volumes"]: + for b in v["blocks"]: + cols = b.get("columns") or [] + if b.get("type") != "table" or "requirement" not in cols or "answer" not in cols: + continue + for r in [*b["rows"], *(b.get("pool") or [])]: + if r.get("key") and r["key"] not in rows: + rows[r["key"]] = { + "key": r["key"], + "requirement": r["cells"][cols.index("requirement")], + "answer": r["cells"][cols.index("answer")], + } + d = OUT / f"{tender}-B" + d.mkdir(exist_ok=True) + (d / "rewrite-input.json").write_text(json.dumps(list(rows.values()), ensure_ascii=False, indent=1)) + print(tender, len(rows))