feat(evals): 导出风格 B 改写输入;改正规范里 S01、S05 的响应方式记录;空偏离表注明「无偏离」

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-11-04 13:06:46 +08:00
parent 2beccd5fc5
commit 85d6ba67b8
3 changed files with 37 additions and 4 deletions

View File

@@ -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 | |

View File

@@ -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"] == "无偏离"
] # 没列出的(默认接受):注入时可以挑来写成偏离

View File

@@ -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))