docs: register baseline_diagnosis and split_manifest schemas with baseline metrics
This commit is contained in:
@@ -205,6 +205,31 @@
|
|||||||
"id": "plan:results-driven-video-split-plan",
|
"id": "plan:results-driven-video-split-plan",
|
||||||
"label": "结果驱动的视频级切分实现计划",
|
"label": "结果驱动的视频级切分实现计划",
|
||||||
"type": "plan"
|
"type": "plan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "schema:baseline-diagnosis",
|
||||||
|
"label": "表结构: baseline_diagnosis(逐题诊断信号)",
|
||||||
|
"type": "schema"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "schema:split-manifest",
|
||||||
|
"label": "表结构: split_manifest(切分冻结溯源)",
|
||||||
|
"type": "schema"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "metric:split-signal-tier-distribution",
|
||||||
|
"label": "指标: 诊断信号 tier 分布(T0/T1/T2/uncertain 占比)",
|
||||||
|
"type": "metric"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "metric:split-cell-coverage",
|
||||||
|
"label": "指标: 48格(task_type×error_type)多样性覆盖率",
|
||||||
|
"type": "metric"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "metric:split-floor-and-representativeness",
|
||||||
|
"label": "指标: floor 达标率 + test 代表性偏差",
|
||||||
|
"type": "metric"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
@@ -396,6 +421,41 @@
|
|||||||
"relation": "implements",
|
"relation": "implements",
|
||||||
"evidence": "实现结果驱动视频级切分设计",
|
"evidence": "实现结果驱动视频级切分设计",
|
||||||
"added": "2026-07-15T15:27:39.569247+00:00"
|
"added": "2026-07-15T15:27:39.569247+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "schema:baseline-diagnosis",
|
||||||
|
"target": "design:results-driven-video-split",
|
||||||
|
"relation": "implements",
|
||||||
|
"evidence": "逐题诊断信号表",
|
||||||
|
"added": "2026-07-15T15:42:38.107624+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "schema:split-manifest",
|
||||||
|
"target": "design:results-driven-video-split",
|
||||||
|
"relation": "implements",
|
||||||
|
"evidence": "切分冻结溯源",
|
||||||
|
"added": "2026-07-15T15:42:38.147922+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "metric:split-signal-tier-distribution",
|
||||||
|
"target": "schema:baseline-diagnosis",
|
||||||
|
"relation": "measures",
|
||||||
|
"evidence": "tier 分布",
|
||||||
|
"added": "2026-07-15T15:42:38.187336+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "metric:split-cell-coverage",
|
||||||
|
"target": "schema:baseline-diagnosis",
|
||||||
|
"relation": "measures",
|
||||||
|
"evidence": "48格覆盖",
|
||||||
|
"added": "2026-07-15T15:42:38.228857+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "metric:split-floor-and-representativeness",
|
||||||
|
"target": "schema:split-manifest",
|
||||||
|
"relation": "measures",
|
||||||
|
"evidence": "floor+代表性",
|
||||||
|
"added": "2026-07-15T15:42:38.269455+00:00"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Research Wiki 索引
|
# Research Wiki 索引
|
||||||
|
|
||||||
> 自动生成,更新时间:2026-07-15 15:27 UTC
|
> 自动生成,更新时间:2026-07-15 15:42 UTC
|
||||||
|
|
||||||
## design (33)
|
## design (33)
|
||||||
- [2026-07-06-core-agent-adapters-llm-design](designs/2026-07-06-core-agent-adapters-llm-design.md) `design:2026-07-06-core-agent-adapters-llm-design`
|
- [2026-07-06-core-agent-adapters-llm-design](designs/2026-07-06-core-agent-adapters-llm-design.md) `design:2026-07-06-core-agent-adapters-llm-design`
|
||||||
@@ -93,14 +93,19 @@
|
|||||||
## review (1)
|
## review (1)
|
||||||
- [question-gen v2 设计对抗审核 — 六路独立核验(四层病灶闭合度 + 契约一致性)](reviews/2026-07-15-question-gen-v2-adversarial-audit.md) `review:2026-07-15-question-gen-v2-adversarial-audit`
|
- [question-gen v2 设计对抗审核 — 六路独立核验(四层病灶闭合度 + 契约一致性)](reviews/2026-07-15-question-gen-v2-adversarial-audit.md) `review:2026-07-15-question-gen-v2-adversarial-audit`
|
||||||
|
|
||||||
## schema (4)
|
## schema (6)
|
||||||
- [表结构 v3 出题日志/观测(unit_verdict / collapse_metrics / quarantine / facts / resume)](schemas/v3-question-gen-logging.md) `schema:v3-question-gen-logging`
|
- [表结构 v3 出题日志/观测(unit_verdict / collapse_metrics / quarantine / facts / resume)](schemas/v3-question-gen-logging.md) `schema:v3-question-gen-logging`
|
||||||
- [表结构: adversarial_verdicts(Phase B agent 门判定)](schemas/adversarial-verdicts.md) `schema:adversarial-verdicts`
|
- [表结构: adversarial_verdicts(Phase B agent 门判定)](schemas/adversarial-verdicts.md) `schema:adversarial-verdicts`
|
||||||
|
- [表结构: baseline_diagnosis(逐题诊断信号)](schemas/baseline-diagnosis.md) `schema:baseline-diagnosis`
|
||||||
- [表结构: question_gen_items(逐题门判定)](schemas/question-gen-items.md) `schema:question-gen-items`
|
- [表结构: question_gen_items(逐题门判定)](schemas/question-gen-items.md) `schema:question-gen-items`
|
||||||
- [表结构: question_gen_runs(出题批次)](schemas/question-gen-runs.md) `schema:question-gen-runs`
|
- [表结构: question_gen_runs(出题批次)](schemas/question-gen-runs.md) `schema:question-gen-runs`
|
||||||
|
- [表结构: split_manifest(切分冻结溯源)](schemas/split-manifest.md) `schema:split-manifest`
|
||||||
|
|
||||||
## metric (4)
|
## metric (7)
|
||||||
- [出题四门总拦截率](metrics/qgen-gate-rejection-rate.md) `metric:qgen-gate-rejection-rate`
|
- [出题四门总拦截率](metrics/qgen-gate-rejection-rate.md) `metric:qgen-gate-rejection-rate`
|
||||||
|
- [指标: 48格(task_type×error_type)多样性覆盖率](metrics/split-cell-coverage.md) `metric:split-cell-coverage`
|
||||||
|
- [指标: floor 达标率 + test 代表性偏差](metrics/split-floor-and-representativeness.md) `metric:split-floor-and-representativeness`
|
||||||
|
- [指标: 诊断信号 tier 分布(T0/T1/T2/uncertain 占比)](metrics/split-signal-tier-distribution.md) `metric:split-signal-tier-distribution`
|
||||||
- [最终接受率](metrics/qgen-acceptance-rate.md) `metric:qgen-acceptance-rate`
|
- [最终接受率](metrics/qgen-acceptance-rate.md) `metric:qgen-acceptance-rate`
|
||||||
- [答案位置分布均匀性](metrics/qgen-answer-uniformity.md) `metric:qgen-answer-uniformity`
|
- [答案位置分布均匀性](metrics/qgen-answer-uniformity.md) `metric:qgen-answer-uniformity`
|
||||||
- [重出收敛率(3轮内过门)](metrics/qgen-regen-convergence.md) `metric:qgen-regen-convergence`
|
- [重出收敛率(3轮内过门)](metrics/qgen-regen-convergence.md) `metric:qgen-regen-convergence`
|
||||||
|
|||||||
@@ -102,3 +102,14 @@
|
|||||||
- [2026-07-15 15:27 UTC] 新增 plan: 结果驱动的视频级切分实现计划 (plan:results-driven-video-split-plan)
|
- [2026-07-15 15:27 UTC] 新增 plan: 结果驱动的视频级切分实现计划 (plan:results-driven-video-split-plan)
|
||||||
- [2026-07-15 15:27 UTC] 新增边: plan:results-driven-video-split-plan --implements--> design:results-driven-video-split
|
- [2026-07-15 15:27 UTC] 新增边: plan:results-driven-video-split-plan --implements--> design:results-driven-video-split
|
||||||
- [2026-07-15 15:27 UTC] 重建索引: 91 篇页面
|
- [2026-07-15 15:27 UTC] 重建索引: 91 篇页面
|
||||||
|
- [2026-07-15 15:40 UTC] 新增 schema: 表结构: baseline_diagnosis(逐题诊断信号) (schema:baseline-diagnosis)
|
||||||
|
- [2026-07-15 15:40 UTC] 新增 schema: 表结构: split_manifest(切分冻结溯源) (schema:split-manifest)
|
||||||
|
- [2026-07-15 15:40 UTC] 新增 metric: 指标: 诊断信号 tier 分布(T0/T1/T2/uncertain 占比) (metric:split-signal-tier-distribution)
|
||||||
|
- [2026-07-15 15:40 UTC] 新增 metric: 指标: 48格(task_type×error_type)多样性覆盖率 (metric:split-cell-coverage)
|
||||||
|
- [2026-07-15 15:40 UTC] 新增 metric: 指标: floor 达标率 + test 代表性偏差 (metric:split-floor-and-representativeness)
|
||||||
|
- [2026-07-15 15:42 UTC] 新增边: schema:baseline-diagnosis --implements--> design:results-driven-video-split
|
||||||
|
- [2026-07-15 15:42 UTC] 新增边: schema:split-manifest --implements--> design:results-driven-video-split
|
||||||
|
- [2026-07-15 15:42 UTC] 新增边: metric:split-signal-tier-distribution --measures--> schema:baseline-diagnosis
|
||||||
|
- [2026-07-15 15:42 UTC] 新增边: metric:split-cell-coverage --measures--> schema:baseline-diagnosis
|
||||||
|
- [2026-07-15 15:42 UTC] 新增边: metric:split-floor-and-representativeness --measures--> schema:split-manifest
|
||||||
|
- [2026-07-15 15:42 UTC] 重建索引: 96 篇页面
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
type: metric
|
||||||
|
node_id: metric:split-cell-coverage
|
||||||
|
title: "指标: 48格(task_type×error_type)多样性覆盖率"
|
||||||
|
date: 2026-07-15
|
||||||
|
---
|
||||||
|
|
||||||
|
# 指标: 48格(task_type×error_type)多样性覆盖率
|
||||||
|
|
||||||
|
> 衡量 train+val 的 T2 defect 覆盖了多少种不同失败模式(多样性目标函数的验收)。
|
||||||
|
|
||||||
|
## 定义与判定
|
||||||
|
|
||||||
|
| 项 | 值 |
|
||||||
|
|----|----|
|
||||||
|
| 格子空间 | `task_type(12) × error_type(4)` = 48 格;但长尾类型无 defect 时对应格子天然空 |
|
||||||
|
| 覆盖数 | train+val 内 T2 题 `cell_of` 并集去重后的格子数 |
|
||||||
|
| 覆盖率 | 覆盖数 / 全数据集实际可达格子数(分母=全 240 非对中 T2 覆盖的格子集) |
|
||||||
|
| 基线 | **待首次诊断后建立**(实际可达格子数依赖 error_type 分布,运行前未知) |
|
||||||
|
| 判定 | 贪心 submodular 有 1−1/e 保证;验收要求 train+val 覆盖率接近全集可达格子(如 ≥90%),显著偏低提示 floor/ε 约束挤占了多样性 |
|
||||||
|
|
||||||
|
## 关联
|
||||||
|
- 度量表:`schema:baseline-diagnosis`、`schema:split-manifest`(coverage_report)
|
||||||
|
- 实现设计:`design:results-driven-video-split`
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
type: metric
|
||||||
|
node_id: metric:split-floor-and-representativeness
|
||||||
|
title: "指标: floor 达标率 + test 代表性偏差"
|
||||||
|
date: 2026-07-15
|
||||||
|
---
|
||||||
|
|
||||||
|
# 指标: floor 达标率 + test 代表性偏差
|
||||||
|
|
||||||
|
> 衡量切分是否满足两条硬约束:train 每高信号类型 defect 下限 + test 相对全局的代表性。
|
||||||
|
|
||||||
|
## 定义与判定
|
||||||
|
|
||||||
|
| 项 | 定义 | 判定 |
|
||||||
|
|----|------|------|
|
||||||
|
| floor 达标率 | 各高信号类型 train+val 内 T2 数 ≥ `floor_k[type]` 的类型占比 | **必须 100%**;否则选择器 `InfeasibleSplitError` fail loud |
|
||||||
|
| test 类型比例偏差 | reportable 类型(总题 ≥ report_floor=27)在 test 的比例 vs 全局比例的最大偏差 | ≤ `epsilon`(拟定 0.1) |
|
||||||
|
| test 难度画像偏差 | test 的 0/1/2/3-对视频占比 vs 全局(125/115/55/5=41.7/38.3/18.3/1.7%)的最大偏差 | ≤ `epsilon` |
|
||||||
|
| val 功效 | val 内错题数 | ≥ `val_wrong_min`(拟定 ≥20,McNemar 功效);否则 `InsufficientValSignal` |
|
||||||
|
|
||||||
|
## 基线(全局分布,诊断无关,已知)
|
||||||
|
|
||||||
|
| 维度 | 全局值 |
|
||||||
|
|------|--------|
|
||||||
|
| 视频难度画像 | 全对125 / 1错115 / 2错55 / 3错5(共300) |
|
||||||
|
| reportable 类型(≥27题) | Object Reasoning 240、Action Reasoning 180、Info Synopsis 163、Temporal Reasoning 91、Action Recognition 63、Object Recognition 54、Counting 48、Attribute Perception 27 |
|
||||||
|
| 非 reportable | OCR 14、Spatial Reasoning 11、Temporal Perception 6、Spatial Perception 3(折进 overall) |
|
||||||
|
|
||||||
|
## 关联
|
||||||
|
- 度量表:`schema:split-manifest`(coverage_report)、`schema:baseline-diagnosis`
|
||||||
|
- 实现设计:`design:results-driven-video-split`
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
type: metric
|
||||||
|
node_id: metric:split-signal-tier-distribution
|
||||||
|
title: "指标: 诊断信号 tier 分布(T0/T1/T2/uncertain 占比)"
|
||||||
|
date: 2026-07-15
|
||||||
|
---
|
||||||
|
|
||||||
|
# 指标: 诊断信号 tier 分布(T0/T1/T2/uncertain 占比)
|
||||||
|
|
||||||
|
> 衡量 240 非对题经诊断后各信号层占比,决定训练可用信号量。
|
||||||
|
|
||||||
|
## 定义与判定
|
||||||
|
|
||||||
|
| 项 | 值 |
|
||||||
|
|----|----|
|
||||||
|
| 数据源 | `baseline_diagnosis`(run_id=`infer_adhoc`,某 diag_fingerprint) |
|
||||||
|
| 计算 | 按 tier 分组计数 / 总非对题数 |
|
||||||
|
| 硬性锚点(诊断前已知) | 总题 900、正确 660、非对 **240**(236 可诊断错 + **4 INFRA→T0**) |
|
||||||
|
| T1/T2 分布 | **待首次诊断后建立**(defect vs lapse 由 judge 判定,运行前未知) |
|
||||||
|
| uncertain | judge 降级题占比,**待建立**;期望低(<5%),过高提示 judge 不稳 |
|
||||||
|
| 判定 | T2(可训练 defect)占比过低(如 <30% 可诊断错)→ 训练信号不足告警 → 触发设计 §14 方案 B 评估 |
|
||||||
|
|
||||||
|
## 关联
|
||||||
|
- 度量表:`schema:baseline-diagnosis`
|
||||||
|
- 实现设计:`design:results-driven-video-split`
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
type: schema
|
||||||
|
node_id: schema:baseline-diagnosis
|
||||||
|
title: "表结构: baseline_diagnosis(逐题诊断信号)"
|
||||||
|
date: 2026-07-15
|
||||||
|
---
|
||||||
|
|
||||||
|
# 表结构: baseline_diagnosis(逐题诊断信号)
|
||||||
|
|
||||||
|
> 载体:`harness.db`(`workspaces/<ws>/harness.db`)。用途:把已有 baseline run(如 `infer_adhoc`)的每道错题诊断结果落成信号行,供视频级切分选择器消费。**逐题 upsert,可断点续跑。**
|
||||||
|
> 实现:`schema:results-driven-video-split` 计划 Task 3(端口 `DiagnosisSignalStore`(`core/evolution/protocols.py`)+ 适配 `adapters/baseline_diagnosis_store.py`),遵循 `app/harness/log.py::HarnessLog` 既有约定(`create_table` + `insert(mode="replace")` 实现 upsert)。
|
||||||
|
|
||||||
|
## 列定义
|
||||||
|
|
||||||
|
| 列 | 类型 | 可空 | 说明 |
|
||||||
|
|----|------|:---:|------|
|
||||||
|
| question_id | TEXT | 否 | 题唯一标识(canonical 取行 = 每 qid 第一行 `ORDER BY rowid`) |
|
||||||
|
| video_id | TEXT | 否 | 视频标识 |
|
||||||
|
| baseline_run_id | TEXT | 否 | 溯源 run(如 `infer_adhoc`) |
|
||||||
|
| diag_fingerprint | TEXT | 否 | `hash(诊断prompt版本 + model + 诊断代码git短SHA)`,`--force` 用新值不覆盖旧 |
|
||||||
|
| task_type | TEXT | 否 | 12 类之一 |
|
||||||
|
| error_type | TEXT | **是** | extraction/search/reasoning/mixed;**T0(INFRA)/uncertain 行为 NULL** |
|
||||||
|
| cause_category | TEXT | 是 | defect/lapse;正确题/INFRA/未判为 NULL |
|
||||||
|
| tier | TEXT | 否 | T0 / T1 / T2 / uncertain |
|
||||||
|
| evolution_target | TEXT | **是** | 由 error_type 派生 tool/skill/system;error_type 为 NULL 时亦 NULL |
|
||||||
|
| degraded | INTEGER | 否 | judge 解析失败降级 0/1 |
|
||||||
|
| infra | INTEGER | 否 | INFRA(stop_reason∈{error,parse_error})排除 0/1 |
|
||||||
|
| session_id | TEXT | 是 | 遥测关联 ID |
|
||||||
|
|
||||||
|
**主键**:`(question_id, baseline_run_id, diag_fingerprint)` —— 保证 upsert 幂等、不同 fingerprint 隔离、断点续跑按已完成集跳过。
|
||||||
|
|
||||||
|
**tier 写规则**:INFRA 题 `infra=1, tier=T0, error_type/cause_category/evolution_target=NULL`;degraded/诊断失败题 `degraded=1, tier=uncertain, error_type` 可 NULL;`cause_category='defect'`→`tier=T2`;`='lapse'`→`tier=T1`。仅 T2 进 48 格覆盖。
|
||||||
|
|
||||||
|
## 埋点位置
|
||||||
|
|
||||||
|
| 位置 | 动作 |
|
||||||
|
|------|------|
|
||||||
|
| `app/harness/baseline_diagnosis.py::run_baseline_diagnosis`(计划 Task 4) | 投影 `run_diagnosis` 的 `error_attributions` + `infra_question_ids` + `degraded_question_ids` → 逐行 `store.upsert(DiagnosisSignalRow)` |
|
||||||
|
| `adapters/baseline_diagnosis_store.py::SqliteDiagnosisSignalStore.upsert`(计划 Task 3) | `INSERT OR REPLACE`(单事务原子) |
|
||||||
|
| 读回 | `.done_question_ids(run,fp)`(续跑跳过)/ `.load(run,fp)`(选择器输入) |
|
||||||
|
|
||||||
|
## 关联
|
||||||
|
- 实现设计:`design:results-driven-video-split`
|
||||||
|
- 被度量:`metric:split-signal-tier-distribution`、`metric:split-cell-coverage`
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
type: schema
|
||||||
|
node_id: schema:split-manifest
|
||||||
|
title: "表结构: split_manifest(切分冻结溯源)"
|
||||||
|
date: 2026-07-15
|
||||||
|
---
|
||||||
|
|
||||||
|
# 表结构: split_manifest(切分冻结溯源)
|
||||||
|
|
||||||
|
> 载体:JSON sidecar,随冻结的 `pools.json` 同目录(非 DB 表)。用途:记录切分产物的复现三元组与验收报告,任何人可据此校验/复现该次切分。
|
||||||
|
> 实现:`app/harness/split_manifest.py::write_manifest`(计划 Task 10/11)。
|
||||||
|
|
||||||
|
## 字段定义
|
||||||
|
|
||||||
|
| 键 | 类型 | 说明 |
|
||||||
|
|----|------|------|
|
||||||
|
| baseline_run_id | str | 溯源 run(`infer_adhoc`) |
|
||||||
|
| diag_fingerprint | str | 诊断指纹(与 `baseline_diagnosis` 一致,不匹配则 build 时 fail loud) |
|
||||||
|
| seed | int | 选择器随机种子 |
|
||||||
|
| config | object | 旋钮快照:n_trainval / floor_k / epsilon / report_floor / val_wrong_min |
|
||||||
|
| pools_sha256 | str | 冻结 `pools.json` 内容 SHA256(自洽校验) |
|
||||||
|
| coverage_report | object | 48格覆盖数、floor 达标情况、test 代表性偏差、各 tier 占比、默认lapse/degraded 计数 |
|
||||||
|
| generated_at | str | 生成时间(由脚本传入,非代码内 `Date.now`) |
|
||||||
|
|
||||||
|
**幂等/原子**:manifest 与 pools.json 均经 `_atomic_write_json`(tmp + os.replace)落盘;重建时 `diag_fingerprint`/`pools_sha256` 不匹配即 fail loud。
|
||||||
|
|
||||||
|
## 关联
|
||||||
|
- 实现设计:`design:results-driven-video-split`
|
||||||
|
- 承载指标:`metric:split-floor-and-representativeness`、`metric:split-cell-coverage`
|
||||||
|
|
||||||
Reference in New Issue
Block a user