Commit 4c6867fd by 黄南光

wiki-ontology尝试

1 parent 8019c687
Showing 389 changed files with 0 additions and 1148 deletions
# Wiki + RAG 智能知识平台 · 版本迭代报告 v7
## 交付物
| 文件 | 说明 |
|---|---|
| `Wiki_RAG智能知识平台版本迭代报告.html` | **最终报告**(单文件自包含,1.06 MB)。19 章 / 46 张内联 SVG / 54 张表格 / 100 个小节。直接双击用浏览器打开即可 |
| `事实底稿.md` | 写报告前的源码与 git 核查底稿。每条结论标注可回查的源码路径或 commit,正文只使用这里已核实的事实 |
## 目录结构
```
├── Wiki_RAG智能知识平台版本迭代报告.html ← 最终报告
├── 事实底稿.md ← 事实核查底稿
├── assets/ ← 46 张 SVG(构建时内联进 HTML)
├── _build/ ← 报告与图的构建脚本
│ ├── svgkit.py ← SVG 版式工具箱(自动紧致画布 / 立体组件 / 图表)
│ ├── dia_core.py ← 第 1–2 章图
│ ├── dia_wiki.py ← 第 3–5 章图
│ ├── dia_wiki2.py ← 第 6–10 章图
│ ├── dia_rag.py ← 第 11–12 章图
│ ├── dia_rag2.py ← 第 13–14 章图
│ ├── dia_platform.py ← 第 15–16 章图
│ ├── dia_memory.py ← 第 17 章图
│ ├── dia_final.py ← 第 18–19 章图
│ ├── build_report.py ← 组装器(章节片段 + 内联 SVG → 单文件 HTML)
│ └── sections/c1.html … c19.html ← 19 章正文片段
├── scripts/ ← 量化脚本(均可复跑)
│ ├── bench_query_headtohead.py ← Wiki × RAG 同题同环境实测
│ ├── bench_answer_models.py ← 问答模型横评(走完整生产链路)
│ ├── analyze_headtohead.py ← 对比实测聚合
│ └── aggregate_ingest.py ← 摄入侧七版本矩阵聚合
└── verification/ ← 全部实测数据与日志
├── 对比实测摘要.md ← Wiki × RAG 49 题实测摘要(人读)
├── headtohead_summary.json ← 同上(机读)
├── ingest_runs/
│ ├── 量化聚合摘要.md ← 摄入侧 B01–B07 × 4 基准文件矩阵(人读)
│ ├── quant_ingest.json ← 同上(机读,供画图引用)
│ ├── archive_runs.csv ← 逐次冷启动运行的原始记录
│ └── raw_result_json/ ← 28 次运行的 result.json + raw.log
├── raw/
│ ├── headtohead.jsonl ← 49 题 × 2 系统的逐题原始记录
│ ├── answer_models.jsonl ← 8 题 × 3 模型的逐次原始记录
│ └── compare_dataset.json ← 从原始差异报告提取的 196 题数据集
└── logs/
├── headtohead_run.log ← 对比实测完整运行日志(1.2 MB)
└── answer_models_run.log ← 模型横评完整运行日志(540 KB)
```
## 本轮新跑的实测(不是引用历史数据)
### 1. Wiki × RAG 同题同环境对比(49 题)
- 从原始 196 题对比集分层随机抽样(种子固定 20260814)
- 两套系统在**同一进程、同一时段、同一份知识库快照**下依次执行,均为无登录态调用
- 逐题记录:耗时 / input·output·cached token / 模型调用次数 / 回答字符 / Wiki 工具轮次 / RAG 检索链路各阶段候选数与意图
- **关键结果**:耗时均值基本持平(15.0 vs 14.8 s),但 Wiki 中位更快(10.4 vs 14.5 s)、RAG 稳定性显著更好(σ 3.0 vs 11.5)、**Wiki Token 是 RAG 的 2.9 倍**(24,388 vs 8,401)
### 2. 问答模型横评(8 题 × 3 模型)
- **走完整生产链路**(含 index.md 前缀、文件工具、related 二跳),不是只换一次生成调用
- 新增两个可程序判定的质量代理指标:**零工具题数**(一次文件都没读就作答)与**引用有效率**(`[[slug]]` 是否指向真实存在的页面)
- **关键结果**:qwen-flash 快 4.5 倍、省 5 倍 token,但 **7/8 题零工具调用**、引用有效率仅 85%;deepseek-v4-flash 8/8 题都调用工具、引用有效率 100%
### 3. 摄入侧七版本矩阵(B01–B07 × 4 基准文件)
- 来自 2026-08-11 的逐次冷启动实测归档,本轮按「每格取最后一次成功运行」的确定性口径**重新聚合**
- 覆盖:耗时 / input·cached·output·VLM token / 生成页数与字符 / Map 块数 / Frontmatter 合规率 / VLM 页级耗时分布
## 复跑方式
```bash
PY="D:/software_install/anaconda_env/envs/wiki_knowledge/python.exe"
# 摄入侧矩阵重新聚合(纯离线,秒级)
cd scripts && $PY aggregate_ingest.py
# Wiki × RAG 对比实测(需 MySQL + Qdrant + DASHSCOPE_API_KEY,约 35 分钟)
cd scripts && $PY bench_query_headtohead.py --n 25 --out ../verification/raw/headtohead.jsonl
cd scripts && $PY analyze_headtohead.py
# 问答模型横评(约 15 分钟)
cd scripts && $PY bench_answer_models.py --models deepseek-v4-flash,qwen-flash,qwen3.7-plus --repeat 1
# 重画全部 SVG + 重新组装报告
cd _build && for f in dia_core dia_wiki dia_wiki2 dia_rag dia_rag2 dia_platform dia_memory dia_final; do $PY $f.py; done
$PY _build/build_report.py
```
## 报告口径
- 「实现了」用于当前代码、配置与数据库可验证的能力
- 「提升 X%」只用于有可比基线与明确公式的数据
- 历史非受控数据明确标注为观察性证据
- 没有实测的指标写「待测」,**不用配置值或代码规模代替质量**
本报告明确**不给出** RAG 检索的 Recall@K / MRR / nDCG、Wiki 页面事实准确率、记忆采纳准确率——这三项都需要人工标注集,而标注集尚未建立。它们在第 19 章列为下一阶段的 P0。
<h2 class="ch-title">执行摘要与双系统架构</h2>
<p class="ch-lead">这套平台里跑着<strong>两个相互独立的知识系统</strong>:Wiki 负责把原始文件转成带契约、带来源账本、可编辑可撤回的知识资产;RAG 负责对数十万字的原始话术与手册做实时高保真检索。它们各有独立的摄入管线、状态机和失败边界,唯一的代码级共享点是 PDF 解析这一段。把它们画在同一张图里会掩盖这个边界,因此本章给出两张独立的架构图。</p>
<h3 id="c1-1">1.1 一句话价值</h3>
<p>平台同时具备两种互补能力:<strong>RAG 负责把知识讲得快、讲得像业务顾问;Wiki 负责保证讲的内容有依据、能沉淀、能维护、能撤回。</strong>这不是同一个能力的两种实现,而是两种失败方式不同的系统——RAG 的典型错误是「没有直接证据时做了合理的跨场景外推」,Wiki 的典型错误是「问题问得不够精确就先反问澄清」。因此产品定位不是二选一,而是让它们各自守住自己更擅长的位置。</p>
<div class="kpis">
<div class="kpi green"><div class="v">−64.5%</div><div class="l">长文件摄入总 Token</div><div class="s">135.0 万 → 47.9 万(B01→B07)</div></div>
<div class="kpi accent"><div class="v">+210.8%</div><div class="l">长文件生成正文字符</div><div class="s">18,995 → 59,040</div></div>
<div class="kpi teal"><div class="v">0% → 88.2%</div><div class="l">长文件输入缓存命中</div><div class="s">B04→B05,仅一次 Prompt 重排</div></div>
<div class="kpi violet"><div class="v">2.82×</div><div class="l">PDF 页级并发折叠倍率</div><div class="s">55 页样本实测</div></div>
<div class="kpi blue"><div class="v">−71.4%</div><div class="l">三个内置 Skill 总字符</div><div class="s">73,825 → 21,108(20→4 个文件)</div></div>
<div class="kpi amber"><div class="v">2.9×</div><div class="l">Wiki / RAG 单题 Token 比</div><div class="s">24,388 vs 8,401(49 题实测)</div></div>
</div>
<h3 id="c1-2">1.2 Wiki 内容生产系统架构</h3>
<p>Wiki 的核心不是「把文件转成 Markdown」,而是<strong>知识生产</strong>:原始文件按交付物组织(一份产品手册、一份延保政策),Wiki 页面按复用主题组织(一个文件可能拆成多个产品页,一个页面也可能合并多个来源)。因此它需要同时处理页面规划、字段归一、来源追踪、并行生成、原子提交与未来的撤销。</p>
<p>整条链路的分工原则只有一句话:<strong>模型负责语义,代码负责契约。</strong>标题写得好不好由模型判断;<code>type</code> 是否在枚举内、日期能否解析、slug 是否冲突、文件写到哪个目录,必须由程序判断。查询侧同样不依赖任何向量索引——页面地图直接进系统提示词,slug 直接拼成物理路径。</p>
<figure>{{SVG:c1_wiki_arch.svg}}<figcaption><b>图 1-1</b> Wiki 内容生产系统总体架构:五层结构 + 三类落地存储。查询层完全不读向量库,因此索引状态不会成为回答质量的隐性依赖。</figcaption></figure>
<h3 id="c1-3">1.3 RAG 实时检索系统架构</h3>
<p>RAG 面对的是另一类问题:几十万字、高度重叠、口径高度依赖原文措辞的销售话术与产品手册。这类材料如果强行走 Wiki 的内容生产流程,会被总结重组成几千字的资料,原始语境与信息量被大幅压缩。RAG 的选择是<strong>不做人工编辑,只做高保真索引</strong>:父子双层切块保证「检索得准」与「答得全」分开优化,dense + sparse 双路召回保证语义近似与精确词各有归属。</p>
<figure>{{SVG:c1_rag_arch.svg}}<figcaption><b>图 1-2</b> RAG 实时检索系统总体架构:四层结构,一条文件流写入,一条查询流读取,中间只隔着 Qdrant 与 MySQL。</figcaption></figure>
<h3 id="c1-4">1.4 两个系统的边界在哪里</h3>
<p>唯一的代码级复用是 PDF 解析:<code>src/tools/document_parser.py</code>(Wiki 侧文件抽取入口)直接 import RAG 的 <code>load_pdf()</code>,共用同一套整页 VLM 解析器与模型配置。docx / xlsx / pptx / txt 这些格式,Wiki 在自己的 <code>document_parser.py</code> 里各自独立实现抽取逻辑,并没有调用 RAG 的对应 loader。</p>
<p>这个边界是有意为之:PDF 解析是两套系统共同的技术难点(图片型表格、跨页表格、合并单元格),值得只维护一份实现;其余格式两边的产物形态与用途不同(RAG 要切块建索引,Wiki 要拼成完整 Markdown 走内容生产流程),各自实现反而更清晰。</p>
<figure>{{SVG:c1_boundary.svg}}<figcaption><b>图 1-3</b> 两个系统在最终产物、失败边界、更新方式、回答依据四个维度上的独立性。RAG 索引重建不影响 Wiki 页面;Wiki 摄入回滚不影响 RAG 检索。</figcaption></figure>
<h3 id="c1-5">1.5 能力演进主线:被工程矛盾推着走</h3>
<p>这套系统不是一次设计出来的。回看 19 个版本,几乎每一步都是被上一步暴露的具体矛盾逼出来的,而且<strong>每一个对策自身都带来了新的代价,那个代价就是下一阶段的起点</strong>。把这条链路讲清楚,比罗列功能清单更能说明这套架构为什么长成现在这样。</p>
<figure>{{SVG:c1_evolution.svg}}<figcaption><b>图 1-4</b> 能力演进主线。读法:左列是当时真实撞到的矛盾,中列是采取的对策,右列是对策自身带来的新代价——它就是下一阶段的起点。</figcaption></figure>
<h3 id="c1-6">1.6 本报告的量化口径</h3>
<p>工程质量不以代码行数、文件数量或提交次数本身衡量——这些只能证明「发生了工程变化」,不能证明「变得更正确」。本报告的量化围绕五类:输入规模、耗时、Token 与缓存成本、输出与结构质量、可靠性与可治理性。每一个百分比变化都必须有同一基准文件、同一阶段定义和可回查的原始日志。</p>
<div class="tw"><table>
<colgroup><col style="width:16%"><col style="width:26%"><col style="width:32%"><col style="width:26%"></colgroup>
<thead><tr><th>数据来源</th><th>采集方式</th><th>覆盖内容</th><th>本报告如何使用</th></tr></thead>
<tbody>
<tr><td><b>摄入侧七版本矩阵</b></td><td>B01–B07 × 4 基准文件,逐次冷启动实测归档(<code>archive_runs.csv</code>)</td><td>耗时、input/cached/output token、VLM token、生成页数与字符、Map 块数、Frontmatter 合规率、VLM 页级耗时分布</td><td>每格取该版本该文件<b>最后一次成功</b>的冷启动运行;B04 起 tracker 才能拆分 input/cached,之前的格保留为空不做估算</td></tr>
<tr><td><b>Wiki×RAG 同题对比</b></td><td>本轮新跑:49 题分层随机抽样,两套系统同进程、同时段、同知识库快照依次执行</td><td>逐题耗时、input/output/cached token、模型调用次数、回答字符、工具轮次、RAG 检索链路各阶段候选数与意图</td><td>第 15 章全部结论;同时用于订正旧报告里已过时的响应时间结论</td></tr>
<tr><td><b>问答模型横评</b></td><td>本轮新跑:8 题 × 3 模型走<b>完整生产链路</b>(含 index.md 前缀、文件工具、二跳)</td><td>耗时、token、工具调用轮次、零工具题数、回答字符、引用有效率</td><td>第 6 章默认模型选型;「零工具题数」与「引用有效率」是两个可程序判定的质量代理指标</td></tr>
<tr><td><b>源码与 git 历史</b></td><td>逐提交 <code>git ls-tree</code> / <code>git show</code> 核对</td><td>Frontmatter 契约演进、Skills 文件与行数、RAG 检索与解析方案的三次替换</td><td>第 4、10、12、13 章的演进叙述;每条结论标注 commit</td></tr>
<tr><td><b>线上库规模快照</b></td><td>2026-08-14 直接 count 主库 57 张表</td><td>用户 450 / 部门 40 / 岗位 212 / 角色 7 / 权限资源 182 / 知识库 48 / 授权 79 / 会话 124 / 消息 536 / 记忆日志 24 等</td><td>第 16、17 章的规模说明;只用于证明「模块已在真实运行」,不代表活跃度或质量</td></tr>
</tbody></table></div>
<div class="note blue"><span class="t">关于本报告不做的事</span>
本报告<b>不</b>给出 RAG 检索的 Recall@K / MRR / nDCG,<b>不</b>给出 Wiki 页面的事实准确率,<b>不</b>给出记忆采纳准确率。原因很简单:这三项都需要人工标注集,而标注集目前尚未建立。用「候选压缩比 98%」冒充准确率、用「配置了重排」冒充效果,是最容易让汇报失去可信度的做法。这些缺口在第 19 章列为下一阶段的 P0。
</div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="14.0 -6.0 1428.0 480.6" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="跨页表格拼接"><rect x="14.0" y="-6.0" width="1428.0" height="480.6" fill="#FCFAF6"/><defs><filter id="soft" x="-30%" y="-30%" width="170%" height="170%"><feDropShadow dx="0" dy="2.5" stdDeviation="4" flood-color="#8A7460" flood-opacity=".16"/></filter><marker id="ar_E0930F" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#E0930F"/></marker></defs><rect x="40.0" y="22.0" width="6.0" height="30.0" rx="3" fill="#D9622B"/><text x="58.0" y="42.0" text-anchor="start" style="font:800 22px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">跨页表格:模型负责标注延续关系,程序负责确定性拼接</text><text x="58.0" y="66.0" text-anchor="start" style="font:400 13px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">跨页表格在每页重复表头,却不一定显式写「续表」;靠字符串相似度硬猜会错拼两张不相关的表</text><rect x="46.0" y="118.0" width="210.0" height="250.0" rx="10" fill="#E2D6C4" opacity="0.30"/><rect x="40.0" y="112.0" width="210.0" height="250.0" rx="10" fill="#FFFFFF" stroke="#E2D6C4" stroke-width="1.4" filter="url(#soft)"/><text x="54.0" y="138.0" text-anchor="start" style="font:800 13.4px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">第 3 页</text><text x="54.0" y="164.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 品牌 | 产品 | 价格 |</text><text x="54.0" y="186.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| --- | --- | --- |</text><text x="54.0" y="208.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 问界 | 整车延保 | 6,800 |</text><text x="54.0" y="230.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 问界 | 电池延保 | 3,200 |</text><text x="54.0" y="252.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">…(表格未结束)</text><rect x="54.0" y="316.0" width="182.0" height="32.0" rx="7" fill="#E0930F" opacity="0.9"/><text x="145.0" y="337.0" text-anchor="middle" style="font:800 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#fff">&lt;!--table-continues--&gt;</text><rect x="326.0" y="118.0" width="210.0" height="250.0" rx="10" fill="#E2D6C4" opacity="0.30"/><rect x="320.0" y="112.0" width="210.0" height="250.0" rx="10" fill="#FFFFFF" stroke="#E2D6C4" stroke-width="1.4" filter="url(#soft)"/><text x="334.0" y="138.0" text-anchor="start" style="font:800 13.4px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">第 4 页</text><text x="334.0" y="164.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 品牌 | 产品 | 价格 |</text><text x="334.0" y="186.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| --- | --- | --- |</text><text x="334.0" y="208.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 智界 | 整车延保 | 7,200 |</text><text x="334.0" y="230.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 智界 | 轮胎保障 | 1,800 |</text><path d="M256.0 237.0L308.0 237.0" fill="none" stroke="#E0930F" stroke-width="2.2" stroke-linejoin="round" marker-end="url(#ar_E0930F)"/><rect x="586.0" y="118.0" width="450.0" height="250.0" rx="12" fill="#2F8781" opacity="0.30"/><rect x="580.0" y="112.0" width="450.0" height="250.0" rx="12" fill="#FFFFFF" stroke="#2F8781" stroke-width="1.4" filter="url(#soft)"/><text x="598.0" y="142.0" text-anchor="start" style="font:800 14.4px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#1F625E">_stitch_continued_tables() 的判定</text><text x="598.0" y="170.0" text-anchor="start" style="font:600 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">1. 遍历全部块,遇到带 table_continues 标记的表格块</text><text x="598.0" y="194.0" text-anchor="start" style="font:600 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">2. 取紧邻的下一个 table 块作为续表候选</text><text x="598.0" y="218.0" text-anchor="start" style="font:600 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">3. _merge_table_markdown:比较两表首行</text><text x="598.0" y="242.0" text-anchor="start" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57"> · 首行相同 → 判定续表重复了表头,跳过其前两行再拼</text><text x="598.0" y="266.0" text-anchor="start" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57"> · 首行不同 → 判定续表没写表头,保留其首行数据后再拼</text><text x="598.0" y="290.0" text-anchor="start" style="font:600 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">4. 把 page_end 改写成续表所在页,标记 continued_table</text><text x="598.0" y="314.0" text-anchor="start" style="font:600 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">5. 若续表自身也带标记 → while 循环继续拼下一页</text><text x="598.0" y="340.0" text-anchor="start" style="font:700 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#1F625E">证据不足时保持分页 —— 误拼两张不相关的表比分开更难被发现</text><rect x="1056.0" y="118.0" width="360.0" height="250.0" rx="12" fill="#4F8A3D" opacity="0.30"/><rect x="1050.0" y="112.0" width="360.0" height="250.0" rx="12" fill="#FFFFFF" stroke="#4F8A3D" stroke-width="1.4" filter="url(#soft)"/><text x="1068.0" y="142.0" text-anchor="start" style="font:800 14.4px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#39662B">拼接结果(单个块)</text><text x="1068.0" y="170.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 品牌 | 产品 | 价格 |</text><text x="1068.0" y="194.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| --- | --- | --- |</text><text x="1068.0" y="218.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 问界 | 整车延保 | 6,800 |</text><text x="1068.0" y="242.0" text-anchor="start" style="font:600 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#655F57">| 问界 | 电池延保 | 3,200 |</text><text x="1068.0" y="266.0" text-anchor="start" style="font:700 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#39662B">| 智界 | 整车延保 | 7,200 |</text><text x="1068.0" y="290.0" text-anchor="start" style="font:700 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#39662B">| 智界 | 轮胎保障 | 1,800 |</text><text x="1068.0" y="340.0" text-anchor="start" style="font:700 11.6px 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;fill:#39662B">metadata: page_start=3, page_end=4, continued_table=true</text><rect x="40.0" y="388.0" width="1290.0" height="60.6" rx="9" fill="#FDF3DE" stroke="#E0930F" stroke-width="1.1" opacity="0.95"/><rect x="40.0" y="388.0" width="4" height="60.6" rx="2" fill="#E0930F"/><text x="55.0" y="406.0" text-anchor="start" style="font:800 12.7px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#E0930F">可靠性边界</text><text x="55.0" y="424.9" text-anchor="start" style="font:500 12.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">这个机制依赖模型在提示词约束下正确标注延续关系(提示词第 7 条)。它比纯启发式(列数相近 / 宽度相近 / 表头相似)更可靠,因为模型看得到「这张表在页面底部被截断了」这个视觉事实;但它同样会漏标——因此代码的兜底策</text><text x="55.0" y="443.2" text-anchor="start" style="font:500 12.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">略是「没有标记就不拼」,宁可保留分页也不误拼。另外 _is_table_row 特意不只判断行首竖线:VLM 对跨页续表常省略行首 `|`,只看 startswith(&#x27;|&#x27;) 会把整段续表数据当成普通段落。</text></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="14.0 -6.0 1389.0 646.0" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Wiki 的三个动作与共同契约"><rect x="14.0" y="-6.0" width="1389.0" height="646.0" fill="#FCFAF6"/><defs><filter id="soft" x="-30%" y="-30%" width="170%" height="170%"><feDropShadow dx="0" dy="2.5" stdDeviation="4" flood-color="#8A7460" flood-opacity=".16"/></filter><marker id="ar_7A5EA8" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#7A5EA8"/></marker><marker id="ar_2F8781" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#2F8781"/></marker><marker id="ar_E0930F" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#E0930F"/></marker><marker id="ar_918878" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#918878"/></marker></defs><rect x="40.0" y="22.0" width="6.0" height="30.0" rx="3" fill="#D9622B"/><text x="58.0" y="42.0" text-anchor="start" style="font:800 22px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">Wiki 的三个动作围绕同一份权威页面闭环</text><text x="58.0" y="66.0" text-anchor="start" style="font:400 13px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">摄入产生资产,查询消费资产,维护修正资产;三者共享同一套 slug / Frontmatter / 来源标记契约</text><rect x="117.0" y="167.0" width="380.0" height="150.0" rx="14" fill="#7A5EA8" opacity="0.30"/><rect x="110.0" y="160.0" width="380.0" height="150.0" rx="14" fill="#FFFFFF" stroke="#7A5EA8" stroke-width="1.4" filter="url(#soft)"/><rect x="110.0" y="160.0" width="380" height="5.5" rx="2.7" fill="#7A5EA8"/><text x="300.0" y="196.0" text-anchor="middle" style="font:800 18px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#7A5EA8">摄入 Ingest</text><text x="300.0" y="226.0" text-anchor="middle" style="font:500 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">md / txt / docx / xlsx / pptx / pdf</text><text x="300.0" y="250.0" text-anchor="middle" style="font:500 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">→ 页面拓扑 + 12 字段头 + 正文</text><text x="300.0" y="274.0" text-anchor="middle" style="font:700 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#7A5EA8">成功 = 契约通过且一次性提交</text><rect x="557.0" y="167.0" width="380.0" height="150.0" rx="14" fill="#2F8781" opacity="0.30"/><rect x="550.0" y="160.0" width="380.0" height="150.0" rx="14" fill="#FFFFFF" stroke="#2F8781" stroke-width="1.4" filter="url(#soft)"/><rect x="550.0" y="160.0" width="380" height="5.5" rx="2.7" fill="#2F8781"/><text x="740.0" y="196.0" text-anchor="middle" style="font:800 18px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F8781">查询 Query</text><text x="740.0" y="226.0" text-anchor="middle" style="font:500 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">问题 → index.md 地图定位 slug</text><text x="740.0" y="250.0" text-anchor="middle" style="font:500 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">→ 直读 ≤3 页 + related 二跳</text><text x="740.0" y="274.0" text-anchor="middle" style="font:700 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F8781">答案必须带可点击的页面引用</text><rect x="997.0" y="167.0" width="380.0" height="150.0" rx="14" fill="#E0930F" opacity="0.30"/><rect x="990.0" y="160.0" width="380.0" height="150.0" rx="14" fill="#FFFFFF" stroke="#E0930F" stroke-width="1.4" filter="url(#soft)"/><rect x="990.0" y="160.0" width="380" height="5.5" rx="2.7" fill="#E0930F"/><text x="1180.0" y="196.0" text-anchor="middle" style="font:800 18px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#E0930F">维护 Maintain</text><text x="1180.0" y="226.0" text-anchor="middle" style="font:500 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">编辑 / lint / 重新摄入</text><text x="1180.0" y="250.0" text-anchor="middle" style="font:500 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">按来源摄出 + 字段归属重算</text><text x="1180.0" y="274.0" text-anchor="middle" style="font:700 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#E0930F">删一个来源不能误伤其他来源</text><rect x="418.0" y="438.0" width="660.0" height="176.0" rx="16" fill="#D9622B" opacity="0.30"/><rect x="410.0" y="430.0" width="660.0" height="176.0" rx="16" fill="#F4EDE2" stroke="#D9622B" stroke-width="1.4" filter="url(#soft)"/><text x="740.0" y="464.0" text-anchor="middle" style="font:800 16.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#A8461A">五项共同契约(三个动作都必须遵守)</text><text x="434.0" y="486.0" text-anchor="start" style="font:800 12.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">▸ slug / WikiType</text><text x="624.0" y="486.0" text-anchor="start" style="font:500 12.3px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">摄入定路径 · 查询定位 · 维护同步重命名</text><text x="434.0" y="509.0" text-anchor="start" style="font:800 12.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">▸ 12 字段 Frontmatter</text><text x="624.0" y="509.0" text-anchor="start" style="font:500 12.3px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">摄入落盘前校验 · 查询按字段防串味 · lint 复检</text><text x="434.0" y="532.0" text-anchor="start" style="font:800 12.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">▸ sources + field_sources</text><text x="624.0" y="532.0" text-anchor="start" style="font:500 12.3px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">摄入写账本 · 查询告知依据 · 摄出只撤销对应贡献</text><text x="434.0" y="555.0" text-anchor="start" style="font:800 12.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">▸ SOURCE_START/END</text><text x="624.0" y="555.0" text-anchor="start" style="font:500 12.3px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">包围来源正文块,使按来源精确删除成为可能</text><text x="434.0" y="578.0" text-anchor="start" style="font:800 12.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">▸ index.md</text><text x="624.0" y="578.0" text-anchor="start" style="font:500 12.3px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">入库后确定性重建 · 查询侧稳定前缀 · 维护保证一致</text><path d="M300.0 310.0L300.0 372.7L555.2 372.7L555.2 424.0" fill="none" stroke="#7A5EA8" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_7A5EA8)"/><path d="M740.0 310.0L740.0 372.7L740.0 372.7L740.0 424.0" fill="none" stroke="#2F8781" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_2F8781)"/><path d="M1180.0 310.0L1180.0 372.7L924.8 372.7L924.8 424.0" fill="none" stroke="#E0930F" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_E0930F)"/><path d="M492.0 235.0L548.0 235.0" fill="none" stroke="#918878" stroke-width="2.0" stroke-linejoin="round" marker-end="url(#ar_918878)"/><rect x="482.0" y="223.0" width="76.0" height="23.0" rx="11.5" fill="#FCFAF6" stroke="#918878" stroke-width="1.0" opacity="0.98"/><text x="520.0" y="239.3" text-anchor="middle" style="font:700 12px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">页面即接口</text><path d="M932.0 235.0L988.0 235.0" fill="none" stroke="#918878" stroke-width="2.0" stroke-linejoin="round" marker-end="url(#ar_918878)"/><rect x="916.0" y="223.0" width="88.0" height="23.0" rx="11.5" fill="#FCFAF6" stroke="#918878" stroke-width="1.0" opacity="0.98"/><text x="960.0" y="239.3" text-anchor="middle" style="font:700 12px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">反馈驱动修正</text><path d="M1180.0 150.0L1180.0 114.0L300.0 114.0L300.0 150.0" fill="none" stroke="#918878" stroke-width="2.0" stroke-linejoin="round" marker-end="url(#ar_918878)" stroke-dasharray="7,5"/><text x="740.0" y="106.0" text-anchor="middle" style="font:700 12.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">维护结果重新进入摄入:知识只增不减是不可维护的</text></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="14.0 -6.0 1367.0 802.0" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="三阶段摄入时序"><rect x="14.0" y="-6.0" width="1367.0" height="802.0" fill="#FCFAF6"/><defs><filter id="soft" x="-30%" y="-30%" width="170%" height="170%"><feDropShadow dx="0" dy="2.5" stdDeviation="4" flood-color="#8A7460" flood-opacity=".16"/></filter><marker id="ar_3B6FB5" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#3B6FB5"/></marker><marker id="ar_7A5EA8" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#7A5EA8"/></marker><marker id="ar_2F8781" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#2F8781"/></marker><marker id="ar_E0930F" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#E0930F"/></marker><marker id="ar_4F8A3D" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6.4" markerHeight="6.4" orient="auto-start-reverse"><path d="M0.6 1L9.4 5L0.6 9L2.6 5z" fill="#4F8A3D"/></marker></defs><rect x="40.0" y="22.0" width="6.0" height="30.0" rx="3" fill="#D9622B"/><text x="58.0" y="42.0" text-anchor="start" style="font:800 22px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F2A24">一次短文档摄入的完整时序</text><text x="58.0" y="66.0" text-anchor="start" style="font:400 13px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">重点看两处:共享前缀在每次调用中逐字节一致;所有磁盘副作用集中在最后一段临界区</text><rect x="55.0" y="110.0" width="190.0" height="46.0" rx="10" fill="#FFFFFF" stroke="#3B6FB5" stroke-width="1.6"/><text x="150.0" y="130.0" text-anchor="middle" style="font:800 13.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#3B6FB5">接口层</text><text x="150.0" y="147.0" text-anchor="middle" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">run_ingest_agent</text><line x1="150.0" y1="156.0" x2="150.0" y2="770.0" stroke="#E2D6C4" stroke-width="1.6" stroke-linecap="round" stroke-dasharray="5,6"/><rect x="325.0" y="110.0" width="190.0" height="46.0" rx="10" fill="#FFFFFF" stroke="#7A5EA8" stroke-width="1.6"/><text x="420.0" y="130.0" text-anchor="middle" style="font:800 13.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#7A5EA8">Planner</text><text x="420.0" y="147.0" text-anchor="middle" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">qwen3.7-plus</text><line x1="420.0" y1="156.0" x2="420.0" y2="770.0" stroke="#E2D6C4" stroke-width="1.6" stroke-linecap="round" stroke-dasharray="5,6"/><rect x="605.0" y="110.0" width="190.0" height="46.0" rx="10" fill="#FFFFFF" stroke="#2F8781" stroke-width="1.6"/><text x="700.0" y="130.0" text-anchor="middle" style="font:800 13.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F8781">Writers ×N</text><text x="700.0" y="147.0" text-anchor="middle" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">信号量 ≤20</text><line x1="700.0" y1="156.0" x2="700.0" y2="770.0" stroke="#E2D6C4" stroke-width="1.6" stroke-linecap="round" stroke-dasharray="5,6"/><rect x="885.0" y="110.0" width="190.0" height="46.0" rx="10" fill="#FFFFFF" stroke="#E0930F" stroke-width="1.6"/><text x="980.0" y="130.0" text-anchor="middle" style="font:800 13.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#E0930F">契约校验器</text><text x="980.0" y="147.0" text-anchor="middle" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">ingest_contract</text><line x1="980.0" y1="156.0" x2="980.0" y2="770.0" stroke="#E2D6C4" stroke-width="1.6" stroke-linecap="round" stroke-dasharray="5,6"/><rect x="1160.0" y="110.0" width="190.0" height="46.0" rx="10" fill="#FFFFFF" stroke="#4F8A3D" stroke-width="1.6"/><text x="1255.0" y="130.0" text-anchor="middle" style="font:800 13.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#4F8A3D">磁盘 / DB</text><text x="1255.0" y="147.0" text-anchor="middle" style="font:500 11.6px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#918878">staging→正式</text><line x1="1255.0" y1="156.0" x2="1255.0" y2="770.0" stroke="#E2D6C4" stroke-width="1.6" stroke-linecap="round" stroke-dasharray="5,6"/><path d="M150.0 192.0L420.0 192.0" fill="none" stroke="#3B6FB5" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_3B6FB5)"/><text x="285.0" y="184.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#3B6FB5">① 组装共享前缀:Skill + Schema 契约 + 原文(逐字节固定)</text><path d="M420.0 238.0L150.0 238.0" fill="none" stroke="#7A5EA8" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_7A5EA8)"/><text x="285.0" y="230.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#7A5EA8">② 返回页面计划 JSON:type / slug / 路径 / global_dims / pages[]</text><path d="M156.0 284.0L214.0 284.0L214.0 314.0L162.0 314.0" fill="none" stroke="#3B6FB5" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_3B6FB5)"/><text x="224.0" y="303.0" text-anchor="start" style="font:600 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#3B6FB5">③ 结构校验:字段齐全?slug 冲突?路径合法?失败回喂错误重规划(≤2 次)</text><path d="M150.0 340.0L700.0 340.0" fill="none" stroke="#3B6FB5" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_3B6FB5)"/><text x="425.0" y="332.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#3B6FB5">④ 扇出:同一份共享前缀 + 各自的页面任务(前缀之后才分叉)</text><path d="M700.0 386.0L980.0 386.0" fill="none" stroke="#2F8781" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_2F8781)"/><text x="840.0" y="378.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F8781">⑤ 每页产出 Frontmatter + 正文,逐页送校验</text><path d="M980.0 432.0L700.0 432.0" fill="none" stroke="#E0930F" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_E0930F)"/><text x="840.0" y="424.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#E0930F">⑥ 缺 required_extra / 枚举越界 → 带具体错误重试该页(≤4 次)</text><path d="M700.0 478.0L150.0 478.0" fill="none" stroke="#2F8781" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_2F8781)"/><text x="425.0" y="470.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#2F8781">⑦ 全部页面通过;fail-fast:任一页异常立即中止整批</text><path d="M150.0 524.0L1255.0 524.0" fill="none" stroke="#3B6FB5" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_3B6FB5)"/><text x="702.5" y="516.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#3B6FB5">⑧ 写 staging 临时目录 + 备份已存在的同名页面</text><path d="M150.0 570.0L1255.0 570.0" fill="none" stroke="#4F8A3D" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_4F8A3D)"/><text x="702.5" y="562.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#4F8A3D">⑨ 全部 staging 成功 → 逐个 shutil.move 到正式路径</text><path d="M150.0 616.0L1255.0 616.0" fill="none" stroke="#4F8A3D" stroke-width="1.9" stroke-linejoin="round" marker-end="url(#ar_4F8A3D)"/><text x="702.5" y="608.0" text-anchor="middle" style="font:700 11.8px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#4F8A3D">⑩ 重建 index.md(全量,非追加)+ 追加 log.md + 落库任务状态</text><rect x="50.0" y="668.0" width="1305.0" height="74.0" rx="11" fill="#FBEAED" stroke="#B54A5B" stroke-width="1.3" stroke-dasharray="7,5"/><text x="70.0" y="694.0" text-anchor="start" style="font:800 13.5px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#8A3444">异常分支(⑧⑨ 任一步失败)</text><text x="70.0" y="718.0" text-anchor="start" style="font:500 12.2px 'Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,'Segoe UI',sans-serif;fill:#655F57">把备份 shutil.move 回原路径 → finally 清空 staging 目录 → 正式仓库观察到的仍是完整旧版本,绝不出现「一半新一半旧」</text></svg>
\ No newline at end of file
# -*- coding: utf-8 -*-
"""head-to-head 实测结果聚合:耗时 / token / 回答体量 / 特殊回答 / 检索链路。
输出 verification/headtohead_summary.json 与 verification/对比实测摘要.md。
"""
from __future__ import annotations
import json
import os
import re
import statistics as st
HERE = os.path.dirname(os.path.abspath(__file__))
V7 = os.path.dirname(HERE)
SRC = os.path.join(V7, "verification", "raw", "headtohead.jsonl")
OUT_JSON = os.path.join(V7, "verification", "headtohead_summary.json")
OUT_MD = os.path.join(V7, "verification", "对比实测摘要.md")
# 特殊回答判定(与原始差异报告口径对齐,但改为可复算的正则)
ASK_PAT = re.compile(r"(请问您是哪个品牌|请补充|请问.{0,12}具体|方便告诉我|需要您.{0,8}确认|"
r"能否提供|请先.{0,10}确认|您指的是|请明确)")
REFUSE_PAT = re.compile(r"(知识库(中|里)?(暂|目前)?(未|没有)收录|暂无相关|没有查到|未检索到|"
r"我还没有学到|资料不足|无法回答|不足以支持)")
SUPPLEMENT_PAT = re.compile(r"(建议(您)?补充|请补充(相关)?文档|如需.{0,10}请提供|"
r"补充以下信息|提供以下信息)")
def load():
rows = []
with open(SRC, encoding="utf-8") as f:
for line in f:
line = line.strip()
if line:
rows.append(json.loads(line))
return rows
def pct(a, b):
if not a:
return None
return round((b - a) / a * 100, 1)
def stats(vals):
vals = [v for v in vals if v is not None]
if not vals:
return {}
vals_sorted = sorted(vals)
return {
"n": len(vals),
"mean": round(st.mean(vals), 2),
"median": round(st.median(vals), 2),
"min": round(min(vals), 2),
"max": round(max(vals), 2),
"p95": round(vals_sorted[max(0, int(len(vals_sorted) * 0.95) - 1)], 2),
"stdev": round(st.pstdev(vals), 2) if len(vals) > 1 else 0.0,
}
def classify(ans: str) -> dict:
ans = ans or ""
return {
"ask": bool(ASK_PAT.search(ans)),
"refuse": bool(REFUSE_PAT.search(ans)),
"supplement": bool(SUPPLEMENT_PAT.search(ans)),
}
def main() -> None:
rows = load()
out = {"n_questions": len(rows), "datasets": {}, "overall": {}}
def agg(subset, label):
res = {"n": len(subset)}
for sysname in ("wiki", "rag"):
recs = [r[sysname] for r in subset if sysname in r and r[sysname].get("status") == "Success"]
if not recs:
continue
cls = [classify(r.get("answer", "")) for r in recs]
special = sum(1 for c in cls if c["ask"] or c["refuse"] or c["supplement"])
res[sysname] = {
"n_success": len(recs),
"duration_s": stats([r["duration_s"] for r in recs]),
"total_tokens": stats([r["tokens"]["total_tokens"] for r in recs]),
"input_tokens": stats([r["tokens"]["input_tokens"] for r in recs]),
"output_tokens": stats([r["tokens"]["output_tokens"] for r in recs]),
"cached_input_tokens": stats([r["tokens"]["cached_input_tokens"] for r in recs]),
"llm_calls": stats([r["tokens"].get("calls", 0) for r in recs]),
"answer_chars": stats([r["answer_chars"] for r in recs]),
"cache_hit_rate": round(
sum(r["tokens"]["cached_input_tokens"] for r in recs) /
max(1, sum(r["tokens"]["input_tokens"] for r in recs)) * 100, 1),
"special_answers": {
"ask": sum(1 for c in cls if c["ask"]),
"refuse": sum(1 for c in cls if c["refuse"]),
"supplement": sum(1 for c in cls if c["supplement"]),
"any": special,
"any_pct": round(special / len(recs) * 100, 1),
},
}
if sysname == "wiki":
res[sysname]["tool_calls"] = stats([r.get("tool_calls", 0) for r in recs])
else:
res[sysname]["variants"] = stats([r.get("variants", 0) for r in recs])
res[sysname]["ranked"] = stats([r.get("ranked", 0) for r in recs])
res[sysname]["final_chunks"] = stats([r.get("final_chunks", 0) for r in recs])
res[sysname]["context_chars"] = stats([r.get("context_chars", 0) for r in recs])
res[sysname]["citations"] = stats([r.get("citations", 0) for r in recs])
intents = {}
for r in recs:
intents[r.get("intent") or "?"] = intents.get(r.get("intent") or "?", 0) + 1
res[sysname]["intent_dist"] = dict(sorted(intents.items(), key=lambda kv: -kv[1]))
res[sysname]["degraded"] = sum(1 for r in recs if r.get("degraded"))
res[sysname]["recall_total"] = stats(
[sum((r.get("recall") or {}).values()) for r in recs])
# 同题配对差
paired = [r for r in subset if r.get("wiki", {}).get("status") == "Success"
and r.get("rag", {}).get("status") == "Success"]
if paired:
res["paired"] = {
"n": len(paired),
"rag_faster_count": sum(1 for r in paired if r["rag"]["duration_s"] < r["wiki"]["duration_s"]),
"wiki_faster_count": sum(1 for r in paired if r["wiki"]["duration_s"] < r["rag"]["duration_s"]),
"token_ratio_wiki_over_rag": round(
sum(r["wiki"]["tokens"]["total_tokens"] for r in paired) /
max(1, sum(r["rag"]["tokens"]["total_tokens"] for r in paired)), 2),
"duration_ratio_wiki_over_rag": round(
sum(r["wiki"]["duration_s"] for r in paired) /
max(1e-9, sum(r["rag"]["duration_s"] for r in paired)), 2),
"chars_ratio_wiki_over_rag": round(
sum(r["wiki"]["answer_chars"] for r in paired) /
max(1, sum(r["rag"]["answer_chars"] for r in paired)), 2),
}
return res
for ds in sorted({r["dataset"] for r in rows}):
out["datasets"][ds] = agg([r for r in rows if r["dataset"] == ds], ds)
out["overall"] = agg(rows, "overall")
with open(OUT_JSON, "w", encoding="utf-8") as f:
json.dump(out, f, ensure_ascii=False, indent=1)
lines = ["# Wiki × RAG 同题同环境 head-to-head 实测摘要", "",
f"> 样本:{out['n_questions']} 题(从原始 196 题对比集分层随机抽样,种子固定 20260814);",
"> 两套系统在**同一进程、同一时段、同一份知识库快照**下依次执行,逐题记录耗时与 token。", ""]
for name, res in [("总体", out["overall"])] + [(k, v) for k, v in out["datasets"].items()]:
lines += [f"## {name}({res['n']} 题)", "",
"| 指标 | Wiki | RAG |", "|---|--:|--:|"]
w, r = res.get("wiki", {}), res.get("rag", {})
def row(label, path, fmt="{:,.1f}"):
def get(d):
cur = d
for p in path.split("."):
cur = (cur or {}).get(p) if isinstance(cur, dict) else None
return fmt.format(cur) if cur is not None else "-"
lines.append(f"| {label} | {get(w)} | {get(r)} |")
row("平均耗时(秒)", "duration_s.mean")
row("中位耗时(秒)", "duration_s.median")
row("最长耗时(秒)", "duration_s.max")
row("最短耗时(秒)", "duration_s.min")
row("耗时标准差", "duration_s.stdev")
row("平均总 Token", "total_tokens.mean", "{:,.0f}")
row("中位总 Token", "total_tokens.median", "{:,.0f}")
row("最大总 Token", "total_tokens.max", "{:,.0f}")
row("平均输入 Token", "input_tokens.mean", "{:,.0f}")
row("平均输出 Token", "output_tokens.mean", "{:,.0f}")
row("平均模型调用次数", "llm_calls.mean", "{:,.2f}")
row("输入缓存命中率(%)", "cache_hit_rate", "{:,.1f}")
row("平均回答字符", "answer_chars.mean", "{:,.0f}")
row("特殊回答占比(%)", "special_answers.any_pct", "{:,.1f}")
if "paired" in res:
p = res["paired"]
lines += ["", f"- 同题配对 {p['n']} 组:RAG 更快 {p['rag_faster_count']} 题,Wiki 更快 {p['wiki_faster_count']} 题",
f"- Wiki / RAG 总耗时比 = {p['duration_ratio_wiki_over_rag']}×,总 Token 比 = "
f"{p['token_ratio_wiki_over_rag']}×,回答字符比 = {p['chars_ratio_wiki_over_rag']}×"]
lines.append("")
r = out["overall"].get("rag", {})
if r:
lines += ["## RAG 检索链路实测(总体)", "",
f"- 查询变体数:均值 {r['variants']['mean']},最大 {r['variants']['max']}",
f"- 召回候选合计:均值 {r['recall_total']['mean']:.0f}",
f"- 进入重排的候选:均值 {r['ranked']['mean']:.1f}",
f"- 最终进入上下文的父块:均值 {r['final_chunks']['mean']:.1f}",
f"- 最终上下文字符:均值 {r['context_chars']['mean']:.0f}",
f"- 意图分布:{r['intent_dist']}",
f"- 查询理解降级次数:{r['degraded']}", ""]
with open(OUT_MD, "w", encoding="utf-8") as f:
f.write("\n".join(lines))
print("written:", OUT_JSON)
print("written:", OUT_MD)
print(json.dumps(out["overall"], ensure_ascii=False, indent=1)[:2600])
if __name__ == "__main__":
main()
# -*- coding: utf-8 -*-
"""Wiki 问答模型横评(走完整生产链路,不是只换一次生成调用)。
对同一批问题,逐个模型跑完整的 Wiki ReAct 问答(含 index.md 前缀、文件工具、二跳),
记录:耗时 / token(含缓存命中)/ 工具调用轮数 / 回答字符数 /
引用 slug 数与**引用有效率**(答案里的 [[slug]] 是否真实存在于知识库)。
引用有效率是可程序判定的幻觉代理指标:模型编造一个不存在的页面名即计为无效引用。
用法:
python bench_answer_models.py --models deepseek-v4-flash,qwen-flash,qwen3.7-plus --repeat 1
"""
from __future__ import annotations
import argparse
import asyncio
import glob
import json
import os
import re
import sys
import time
BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
sys.path.insert(0, BASE)
from dotenv import load_dotenv # noqa: E402
load_dotenv(os.path.join(BASE, ".env"))
_BUCKET = {"input_tokens": 0, "output_tokens": 0, "total_tokens": 0, "cached_input_tokens": 0, "calls": 0}
# 固定题集:覆盖产品参数、政策条款、话术、流程、对比、排障六类意图
QUESTIONS = [
"鸿蒙智行官方延保有哪些套餐?分别多少钱?",
"问界的电池延保保障范围包括什么?有哪些除外责任?",
"客户说延保太贵了,应该怎么回应?",
"轮胎保障服务的理赔流程是什么?",
"驾行安心包和养车安心包有什么区别?",
"太阳膜的质保政策是怎样的?",
"辅助驾驶无忧服务覆盖哪些场景?",
"客户质疑第三方延保更便宜,怎么解释官方延保的价值?",
]
def _install_token_hook() -> None:
from src.utils import llm_tracker
if getattr(llm_tracker, "_bench_hooked", False):
return
original = llm_tracker.add_usage_tokens
def patched(counter, usage): # noqa: ANN001
original(counter, usage)
try:
for key, value in llm_tracker.extract_usage_tokens(usage).items():
_BUCKET[key] = _BUCKET.get(key, 0) + int(value or 0)
_BUCKET["calls"] += 1
except Exception: # noqa: BLE001
pass
llm_tracker.add_usage_tokens = patched
llm_tracker._bench_hooked = True
for mod in list(sys.modules.values()):
if mod and getattr(mod, "__name__", "").startswith("src.") and hasattr(mod, "add_usage_tokens"):
mod.add_usage_tokens = patched
def _known_slugs() -> set[str]:
"""知识库里真实存在的页面 slug 全集(用于判定引用是否有效)。"""
slugs: set[str] = set()
for path in glob.glob(os.path.join(BASE, "ware", "kb", "**", "wiki", "**", "*.md"), recursive=True):
name = os.path.splitext(os.path.basename(path))[0]
if name not in ("index", "log"):
slugs.add(name)
return slugs
_LINK_RE = re.compile(r"\[\[([^\]]+)\]\]")
def score_citations(answer: str, known: set[str]) -> tuple[int, int]:
links = [s.strip().split("|")[0].strip() for s in _LINK_RE.findall(answer or "")]
if not links:
return 0, 0
valid = sum(1 for s in links if s in known or os.path.splitext(os.path.basename(s))[0] in known)
return len(links), valid
async def run_once(question: str, model: str) -> dict:
os.environ["QUERY_MODEL_NAME"] = model
import config as app_config
from src.api.routes import query as query_mod
app_config.QUERY_MODEL_NAME = model
query_mod.QUERY_MODEL_NAME = model
_install_token_hook()
for key in _BUCKET:
_BUCKET[key] = 0
t0 = time.time()
try:
runner = query_mod.WikiQueryRunner(user_query=question, history=[], session_id=None, user_id=None)
result = await runner.execute()
status, err, answer = result.status, result.error, result.answer
steps = runner.reasoning
except Exception as exc: # noqa: BLE001
status, err, answer, steps = "Error", f"{type(exc).__name__}: {exc}", "", []
dt = time.time() - t0
tool_calls = [s for s in steps if s.get("type") == "call"]
return {
"model": model,
"question": question,
"status": status,
"error": err,
"duration_s": round(dt, 3),
"tokens": dict(_BUCKET),
"answer_chars": len(answer or ""),
"tool_calls": len(tool_calls),
"tool_names": [s.get("name") for s in tool_calls],
"answer": answer,
}
async def main() -> None:
ap = argparse.ArgumentParser()
ap.add_argument("--models", default="deepseek-v4-flash,qwen-flash,qwen3.7-plus,qwen3.6-flash")
ap.add_argument("--repeat", type=int, default=1)
ap.add_argument("--out", default=os.path.join(os.path.dirname(__file__), "..", "verification", "raw", "answer_models.jsonl"))
args = ap.parse_args()
models = [m.strip() for m in args.models.split(",") if m.strip()]
out_path = os.path.abspath(args.out)
os.makedirs(os.path.dirname(out_path), exist_ok=True)
known = _known_slugs()
print(f"[bench] 已知 slug {len(known)} 个;模型 {models};题 {len(QUESTIONS)}×{args.repeat}", flush=True)
done = set()
if os.path.exists(out_path):
with open(out_path, encoding="utf-8") as f:
for line in f:
try:
r = json.loads(line)
done.add((r["model"], r["question"], r.get("round", 1)))
except Exception: # noqa: BLE001
pass
with open(out_path, "a", encoding="utf-8") as f:
for rnd in range(1, args.repeat + 1):
for model in models:
for question in QUESTIONS:
if (model, question, rnd) in done:
continue
rec = await run_once(question, model)
rec["round"] = rnd
total, valid = score_citations(rec["answer"], known)
rec["citations_total"] = total
rec["citations_valid"] = valid
f.write(json.dumps(rec, ensure_ascii=False) + "\n")
f.flush()
print(f" {model:18s} r{rnd} {rec['duration_s']:6.1f}s tok={rec['tokens']['total_tokens']:6d} "
f"tools={rec['tool_calls']} chars={rec['answer_chars']} cite={valid}/{total}", flush=True)
print("[bench] done", flush=True)
if __name__ == "__main__":
asyncio.run(main())
# -*- coding: utf-8 -*-
"""Wiki vs RAG 同题同环境 head-to-head 实测。
对同一批问题分别跑当前代码的 Wiki 问答链路与 RAG 问答链路,逐题记录:
耗时 / 输入 token / 输出 token / 缓存 token / 总 token / 回答字符数 /
工具调用轮次(Wiki) / 检索候选与最终片段数(RAG) / 意图(RAG)
用法:
python bench_query_headtohead.py --n 20 --out ../verification/raw/headtohead.jsonl
"""
from __future__ import annotations
import argparse
import asyncio
import json
import os
import random
import sys
import time
BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
sys.path.insert(0, BASE)
from dotenv import load_dotenv # noqa: E402
load_dotenv(os.path.join(BASE, ".env"))
DATASET = os.path.join(os.path.dirname(__file__), "..", "verification", "raw", "compare_dataset.json")
# ---------------------------------------------------------------------------
# 全局 token 采集:Wiki/RAG 两条链路内部各自 set 了自己的 ContextVar 计数器,
# 外层再 set 一个会被覆盖。这里直接在最底层的累加函数上挂钩子,
# 把每一次模型调用的 usage 同时汇总到本模块的全局桶里,跨 ContextVar 生效。
# ---------------------------------------------------------------------------
_BUCKET = {"input_tokens": 0, "output_tokens": 0, "total_tokens": 0, "cached_input_tokens": 0, "calls": 0}
def _install_token_hook() -> None:
from src.utils import llm_tracker
if getattr(llm_tracker, "_bench_hooked", False):
return
original = llm_tracker.add_usage_tokens
def patched(counter, usage): # noqa: ANN001
original(counter, usage)
try:
tokens = llm_tracker.extract_usage_tokens(usage)
for key, value in tokens.items():
_BUCKET[key] = _BUCKET.get(key, 0) + int(value or 0)
_BUCKET["calls"] += 1
except Exception: # noqa: BLE001
pass
llm_tracker.add_usage_tokens = patched
llm_tracker._bench_hooked = True
# 已经 import 过该符号的模块要一并替换,否则钩子不生效
import importlib
import pkgutil
import src
for mod in list(sys.modules.values()):
if mod and getattr(mod, "__name__", "").startswith("src.") and hasattr(mod, "add_usage_tokens"):
mod.add_usage_tokens = patched
_ = (importlib, pkgutil, src)
def _reset_bucket() -> None:
for key in _BUCKET:
_BUCKET[key] = 0
def _snapshot() -> dict:
return dict(_BUCKET)
def load_questions(n_per_set: int, seed: int = 20260814) -> list[dict]:
with open(DATASET, encoding="utf-8") as f:
data = json.load(f)
rng = random.Random(seed)
picked: list[dict] = []
for name, items in data.items():
idx = list(range(len(items)))
rng.shuffle(idx)
for i in sorted(idx[:n_per_set]):
it = items[i]
picked.append({
"dataset": name,
"id": it.get("id"),
"question": it.get("question", "").strip(),
"hist_wiki_time": it.get("wiki_time"),
"hist_rag_time": it.get("rag_time"),
})
return picked
async def run_rag(question: str) -> dict:
from src.rag.api.schemas import RagQueryRequest
from src.rag.retrieval.pipeline import query_debug
_install_token_hook()
_reset_bucket()
t0 = time.time()
try:
data = await query_debug(RagQueryRequest(query=question, sessionId=f"bench-rag-{int(t0)}"))
status = "Success"
err = None
except Exception as exc: # noqa: BLE001
data, status, err = {}, "Error", f"{type(exc).__name__}: {exc}"
dt = time.time() - t0
counter = _snapshot()
intent = (data.get("intent") or {})
retrieval = (data.get("retrieval") or {})
return {
"system": "rag",
"status": status,
"error": err,
"duration_s": round(dt, 3),
"answer": data.get("answer", ""),
"answer_chars": len(data.get("answer", "") or ""),
"tokens": dict(counter),
"intent": intent.get("intent"),
"intents": intent.get("intents"),
"degraded": intent.get("degraded"),
"sub_queries": intent.get("sub_queries"),
"variants": len(retrieval.get("queries") or []),
"recall": retrieval.get("recall"),
"ranked": len(retrieval.get("ranked") or []),
"final_chunks": len(retrieval.get("context_sources") or []),
"context_chars": sum(len((c.get("content") or "")) for c in (retrieval.get("context_sources") or [])),
"rerank_scores": [round(float(((c.get("score") or {}).get("rerank_score")) or 0), 4)
for c in (retrieval.get("context_sources") or [])],
"soft_boosts": retrieval.get("soft_boosts"),
"citations": len(data.get("citations") or []),
}
async def run_wiki(question: str) -> dict:
from src.api.routes.query import WikiQueryRunner
_install_token_hook()
_reset_bucket()
t0 = time.time()
try:
runner = WikiQueryRunner(user_query=question, history=[], session_id=None, user_id=None)
result = await runner.execute()
status, err, answer = result.status, result.error, result.answer
steps = runner.reasoning
except Exception as exc: # noqa: BLE001
status, err, answer, steps = "Error", f"{type(exc).__name__}: {exc}", "", []
dt = time.time() - t0
counter = _snapshot()
tool_calls = [s for s in steps if s.get("type") == "call"]
return {
"system": "wiki",
"status": status,
"error": err,
"duration_s": round(dt, 3),
"answer": answer,
"answer_chars": len(answer or ""),
"tokens": dict(counter),
"tool_calls": len(tool_calls),
"tool_names": [s.get("name") for s in tool_calls],
"steps": len(steps),
}
async def main() -> None:
ap = argparse.ArgumentParser()
ap.add_argument("--n", type=int, default=15, help="每个测试集抽题数")
ap.add_argument("--out", default=os.path.join(os.path.dirname(__file__), "..", "verification", "raw", "headtohead.jsonl"))
ap.add_argument("--only", choices=["wiki", "rag", "both"], default="both")
args = ap.parse_args()
questions = load_questions(args.n)
out_path = os.path.abspath(args.out)
os.makedirs(os.path.dirname(out_path), exist_ok=True)
done = set()
if os.path.exists(out_path):
with open(out_path, encoding="utf-8") as f:
for line in f:
try:
rec = json.loads(line)
done.add((rec["dataset"], rec["id"]))
except Exception: # noqa: BLE001
pass
print(f"[bench] 共 {len(questions)} 题,已完成 {len(done)},输出 {out_path}", flush=True)
with open(out_path, "a", encoding="utf-8") as f:
for i, q in enumerate(questions, 1):
key = (q["dataset"], q["id"])
if key in done:
continue
print(f"[{i}/{len(questions)}] {q['dataset']}#{q['id']} {q['question'][:40]}", flush=True)
rec = dict(q)
if args.only in ("rag", "both"):
rec["rag"] = await run_rag(q["question"])
print(f" rag {rec['rag']['duration_s']:.1f}s tok={rec['rag']['tokens']['total_tokens']} chars={rec['rag']['answer_chars']}", flush=True)
if args.only in ("wiki", "both"):
rec["wiki"] = await run_wiki(q["question"])
print(f" wiki {rec['wiki']['duration_s']:.1f}s tok={rec['wiki']['tokens']['total_tokens']} chars={rec['wiki']['answer_chars']} tools={rec['wiki']['tool_calls']}", flush=True)
f.write(json.dumps(rec, ensure_ascii=False) + "\n")
f.flush()
print("[bench] done", flush=True)
if __name__ == "__main__":
asyncio.run(main())
2026-08-11 19:14:27,903 INFO __main__ [BenchmarkAdapter] legacy_original_raw_copy=ware/raw/md/KB_外部渠道.md
2026-08-11 19:14:33,820 INFO src.api.routes.ingest [KB_外部渠道.md] 摄入任务启动
2026-08-11 19:14:33,831 INFO src.api.routes.ingest [KB_外部渠道.md] [阶段一] 开始统筹规划与全局打标... 使用模型: qwen3.7-plus
2026-08-11 19:16:25,091 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 1] 规划完成。全局标签: ['问界', '比亚迪', '鸿蒙智行', '轻改类', '异议处理', '驻店销售'],规划页面数: 8
2026-08-11 19:16:25,091 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 开始并发写作与自检,共 8 个页面...
2026-08-11 19:17:01,534 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/sources/外部渠道异议处理知识汇总.md (首次尝试成功)
2026-08-11 19:17:33,068 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/电动踏板异议处理话术.md (首次尝试成功)
2026-08-11 19:17:43,202 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/太阳膜异议处理话术.md (首次尝试成功)
2026-08-11 19:17:50,834 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/天窗冰甲异议处理话术.md (首次尝试成功)
2026-08-11 19:17:50,839 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/脚垫及内饰小桌板异议处理话术.md (首次尝试成功)
2026-08-11 19:17:52,411 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/底盘护板异议处理话术.md (首次尝试成功)
2026-08-11 19:18:07,915 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/漆面保护膜异议处理话术.md (首次尝试成功)
2026-08-11 19:18:36,011 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 页面校验成功: ware/wiki/scripts/综合及跨品类异议处理话术.md (首次尝试成功)
2026-08-11 19:18:36,011 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 2] 并发写作完成。成功生成 8 / 8 个页面。
2026-08-11 19:18:36,012 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 3] 开始批量安全保存...
2026-08-11 19:18:36,077 INFO src.api.routes.ingest [KB_外部渠道.md] [Phase 3] 文件保存完成。
{
"schema_version": "1.0",
"checkpoint": "B01_initial",
"run_id": "20260811_hist40_cold",
"started_at": "2026-08-11T11:14:26.849503+00:00",
"status": "Indexed",
"input": {
"file_name": "KB_外部渠道.md",
"file_type": "md",
"bytes": 595399,
"sha256": "4d0626b8c9ccb382a6d7ff5b44720bda4bc63ef39aa72f79cfd056368e3741bc"
},
"finished_at": "2026-08-11T11:18:36.180871+00:00",
"wall_duration_seconds": 249.331,
"file_id": "701d592a-4991-44b4-8168-3d453cdcbaa3",
"raw_path": "ware/raw/md/KB_外部渠道_701d592a-4991-44b4-8168-3d453cdcbaa3.md",
"legacy_raw_path": "ware/raw/md/KB_外部渠道.md",
"database_record": {
"id": "701d592a-4991-44b4-8168-3d453cdcbaa3",
"name": "KB_外部渠道.md",
"word_count": 0,
"status": "Indexed",
"total_tokens": 1350257,
"ingest_duration": "242.27",
"ingest_time": "2026-08-11 19:18:36",
"error_message": null
},
"operation_details": "{\"total_tokens\": 1350257, \"duration_seconds\": 242.3, \"generated_wiki_pages\": [\"ware/wiki/scripts/底盘护板异议处理话术.md\", \"ware/wiki/scripts/脚垫及内饰小桌板异议处理话术.md\", \"ware/wiki/scripts/电动踏板异议处理话术.md\", \"ware/wiki/sources/外部渠道异议处理知识汇总.md\", \"ware/wiki/scripts/太阳膜异议处理话术.md\", \"ware/wiki/scripts/漆面保护膜异议处理话术.md\", \"ware/wiki/scripts/天窗冰甲异议处理话术.md\", \"ware/wiki/scripts/综合及跨品类异议处理话术.md\"]}",
"output_summary": {
"generated_file_count": 8,
"existing_file_count": 8,
"generated_characters": 18995,
"source_marker_count": 8,
"field_sources_mentions": 8,
"frontmatter_valid_count": 8
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 8,
"field_sources_mentions": 8,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
2026-08-11 18:56:37,247 INFO __main__ [BenchmarkAdapter] legacy_original_raw_copy=ware/raw/md/《东风岚图延保新车零售指导手册》.md
2026-08-11 18:56:41,406 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] 摄入任务启动
2026-08-11 18:56:41,409 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [阶段一] 开始统筹规划与全局打标... 使用模型: qwen3.7-plus
2026-08-11 18:57:42,914 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 1] 规划完成。全局标签: ['岚图', '岚图', '权益类', '延保', '驻店销售'],规划页面数: 7
2026-08-11 18:57:42,915 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 开始并发写作与自检,共 7 个页面...
2026-08-11 18:58:17,823 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/sources/岚图/东风岚图延保新车零售指导手册.md (首次尝试成功)
2026-08-11 18:58:21,903 WARNING src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验失败 ware/wiki/procedures/岚图延保理赔与售后FAQ.md (第 1 次): Frontmatter 解析失败: YAML 缺少必填字段: ['schema_version', 'type', 'title', 'tags', 'related', 'sources', 'created', 'updated']
2026-08-11 18:58:25,597 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/policies/岚图延保免责条款与合规红线.md (首次尝试成功)
2026-08-11 18:58:31,422 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/entities/岚图品牌与车型定位.md (首次尝试成功)
2026-08-11 18:58:32,913 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/concepts/岚图销售原则与用车基础.md (首次尝试成功)
2026-08-11 18:58:43,999 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/scripts/岚图延保接待与异议处理话术.md (首次尝试成功)
2026-08-11 18:58:52,389 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/procedures/岚图延保理赔与售后FAQ.md (第 1 次重试后成功)
2026-08-11 18:59:20,508 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 页面校验成功: ware/wiki/products/岚图整车延保.md (首次尝试成功)
2026-08-11 18:59:20,509 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 2] 并发写作完成。成功生成 7 / 7 个页面。
2026-08-11 18:59:20,510 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 3] 开始批量安全保存...
2026-08-11 18:59:20,555 INFO src.api.routes.ingest [《东风岚图延保新车零售指导手册》.md] [Phase 3] 文件保存完成。
{
"schema_version": "1.0",
"checkpoint": "B01_initial",
"run_id": "20260811_hist30_cold",
"started_at": "2026-08-11T10:56:36.155245+00:00",
"status": "Indexed",
"input": {
"file_name": "《东风岚图延保新车零售指导手册》.md",
"file_type": "md",
"bytes": 30069,
"sha256": "6bce489cb848a0c109448d3079fa28bf5541bc151c9dc56eb7bd90fe022dcb43"
},
"finished_at": "2026-08-11T10:59:20.639609+00:00",
"wall_duration_seconds": 164.484,
"file_id": "795a85a2-4871-48ec-a456-36e17dbb5fb9",
"raw_path": "ware/raw/md/《东风岚图延保新车零售指导手册》_795a85a2-4871-48ec-a456-36e17dbb5fb9.md",
"legacy_raw_path": "ware/raw/md/《东风岚图延保新车零售指导手册》.md",
"database_record": {
"id": "795a85a2-4871-48ec-a456-36e17dbb5fb9",
"name": "《东风岚图延保新车零售指导手册》.md",
"word_count": 0,
"status": "Indexed",
"total_tokens": 130900,
"ingest_duration": "159.16",
"ingest_time": "2026-08-11 18:59:21",
"error_message": null
},
"operation_details": "{\"total_tokens\": 130900, \"duration_seconds\": 159.2, \"generated_wiki_pages\": [\"ware/wiki/sources/岚图/东风岚图延保新车零售指导手册.md\", \"ware/wiki/scripts/岚图延保接待与异议处理话术.md\", \"ware/wiki/policies/岚图延保免责条款与合规红线.md\", \"ware/wiki/entities/岚图品牌与车型定位.md\", \"ware/wiki/procedures/岚图延保理赔与售后FAQ.md\", \"ware/wiki/products/岚图整车延保.md\", \"ware/wiki/concepts/岚图销售原则与用车基础.md\"]}",
"output_summary": {
"generated_file_count": 7,
"existing_file_count": 7,
"generated_characters": 13931,
"source_marker_count": 7,
"field_sources_mentions": 7,
"frontmatter_valid_count": 7
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 7,
"field_sources_mentions": 7,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
2026-08-11 18:43:14,068 INFO __main__ [BenchmarkAdapter] legacy_original_raw_copy=ware/raw/md/轻改产品.md
2026-08-11 18:43:24,981 INFO src.api.routes.ingest [轻改产品.md] 摄入任务启动
2026-08-11 18:43:24,987 INFO src.api.routes.ingest [轻改产品.md] [阶段一] 开始统筹规划与全局打标... 使用模型: qwen3.7-plus
2026-08-11 18:44:15,511 INFO src.api.routes.ingest [轻改产品.md] [Phase 1] 规划完成。全局标签: ['嘀加', '通用', '轻改类', '汽车轻改', '驻店销售'],规划页面数: 10
2026-08-11 18:44:15,512 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 开始并发写作与自检,共 10 个页面...
2026-08-11 18:44:37,281 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/底盘护板.md (首次尝试成功)
2026-08-11 18:44:37,665 WARNING src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验失败 ware/wiki/concepts/汽车轻改.md (第 1 次): Frontmatter 解析失败: YAML 缺少必填字段: ['schema_version', 'type', 'title', 'tags', 'related', 'sources', 'created', 'updated']
2026-08-11 18:44:40,608 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/entities/嘀加.md (首次尝试成功)
2026-08-11 18:44:40,854 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/天窗冰甲.md (首次尝试成功)
2026-08-11 18:44:41,946 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/电动踏板.md (首次尝试成功)
2026-08-11 18:44:42,507 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/汽车脚垫.md (首次尝试成功)
2026-08-11 18:44:45,244 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/后排小桌板.md (首次尝试成功)
2026-08-11 18:44:51,893 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/太阳膜.md (首次尝试成功)
2026-08-11 18:44:55,429 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/concepts/汽车轻改.md (第 1 次重试后成功)
2026-08-11 18:44:55,785 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/products/漆面保护膜.md (首次尝试成功)
2026-08-11 18:44:56,743 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 页面校验成功: ware/wiki/sources/嘀加/嘀加轻改产品说明书.md (首次尝试成功)
2026-08-11 18:44:56,743 INFO src.api.routes.ingest [轻改产品.md] [Phase 2] 并发写作完成。成功生成 10 / 10 个页面。
2026-08-11 18:44:56,743 INFO src.api.routes.ingest [轻改产品.md] [Phase 3] 开始批量安全保存...
2026-08-11 18:44:56,796 INFO src.api.routes.ingest [轻改产品.md] [Phase 3] 文件保存完成。
{
"schema_version": "1.0",
"checkpoint": "B01_initial",
"run_id": "20260811_hist20_cold",
"started_at": "2026-08-11T10:43:11.773083+00:00",
"status": "Indexed",
"input": {
"file_name": "轻改产品.md",
"file_type": "md",
"bytes": 4708,
"sha256": "ac63d7a9a9b9ff61b47791798b65705e8d0188cb545a0924c55a949308f52ae1"
},
"finished_at": "2026-08-11T10:44:56.904958+00:00",
"wall_duration_seconds": 105.131,
"file_id": "b7311a6a-557b-4cf9-8acc-885b8d2703f7",
"raw_path": "ware/raw/md/轻改产品_b7311a6a-557b-4cf9-8acc-885b8d2703f7.md",
"legacy_raw_path": "ware/raw/md/轻改产品.md",
"database_record": {
"id": "b7311a6a-557b-4cf9-8acc-885b8d2703f7",
"name": "轻改产品.md",
"word_count": 0,
"status": "Indexed",
"total_tokens": 65664,
"ingest_duration": "91.83",
"ingest_time": "2026-08-11 18:44:57",
"error_message": null
},
"operation_details": "{\"total_tokens\": 65664, \"duration_seconds\": 91.8, \"generated_wiki_pages\": [\"ware/wiki/sources/嘀加/嘀加轻改产品说明书.md\", \"ware/wiki/products/底盘护板.md\", \"ware/wiki/products/太阳膜.md\", \"ware/wiki/products/汽车脚垫.md\", \"ware/wiki/entities/嘀加.md\", \"ware/wiki/concepts/汽车轻改.md\", \"ware/wiki/products/漆面保护膜.md\", \"ware/wiki/products/后排小桌板.md\", \"ware/wiki/products/天窗冰甲.md\", \"ware/wiki/products/电动踏板.md\"]}",
"output_summary": {
"generated_file_count": 10,
"existing_file_count": 10,
"generated_characters": 9901,
"source_marker_count": 10,
"field_sources_mentions": 10,
"frontmatter_valid_count": 10
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 10,
"field_sources_mentions": 10,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
2026-08-11 19:44:43,134 INFO __main__ [BenchmarkAdapter] legacy_original_raw_copy=ware/raw/pdf/鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf
2026-08-11 19:44:51,035 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] 摄入任务启动
2026-08-11 19:44:56,171 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [阶段一] 开始统筹规划与全局打标... 使用模型: qwen3.7-plus
2026-08-11 19:45:50,130 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 1] 规划完成。全局标签: ['鸿蒙智行', '鸿蒙智行', '权益类', '驾行安心包', '驻店销售'],规划页面数: 6
2026-08-11 19:45:50,134 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 开始并发写作与自检,共 6 个页面...
2026-08-11 19:46:25,149 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 页面校验成功: ware/wiki/entities/中邮智行及业务联系人.md (首次尝试成功)
2026-08-11 19:46:27,083 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 页面校验成功: ware/wiki/sources/鸿蒙智行/鸿蒙智行官方驾行安心包系列产品手册.md (首次尝试成功)
2026-08-11 19:46:35,374 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 页面校验成功: ware/wiki/products/驾行安心包系列产品.md (首次尝试成功)
2026-08-11 19:46:48,500 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 页面校验成功: ware/wiki/procedures/驾行安心包销售出单流程.md (首次尝试成功)
2026-08-11 19:46:57,824 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 页面校验成功: ware/wiki/procedures/驾行安心包理赔操作流程.md (首次尝试成功)
2026-08-11 19:46:58,508 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 页面校验成功: ware/wiki/policies/驾行安心包免责与享权政策.md (首次尝试成功)
2026-08-11 19:46:58,509 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 2] 并发写作完成。成功生成 6 / 6 个页面。
2026-08-11 19:46:58,509 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 3] 开始批量安全保存...
2026-08-11 19:46:58,566 INFO src.api.routes.ingest [鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf] [Phase 3] 文件保存完成。
{
"schema_version": "1.0",
"checkpoint": "B01_initial",
"run_id": "20260811_hist50_cold",
"started_at": "2026-08-11T11:44:42.042838+00:00",
"status": "Indexed",
"input": {
"file_name": "鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf",
"file_type": "pdf",
"bytes": 9921845,
"sha256": "9bdd20200abff9db1b439630bc49998353ad404b43bab2a49e402c4ae5a59d28"
},
"finished_at": "2026-08-11T11:46:58.658316+00:00",
"wall_duration_seconds": 136.616,
"file_id": "c0b99f9d-f0aa-457f-99f2-d92b140dc4ef",
"raw_path": "ware/raw/pdf/鸿蒙智行官方驾行安心包系列产品手册260302(3)_c0b99f9d-f0aa-457f-99f2-d92b140dc4ef.pdf",
"legacy_raw_path": "ware/raw/pdf/鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf",
"database_record": {
"id": "c0b99f9d-f0aa-457f-99f2-d92b140dc4ef",
"name": "鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf",
"word_count": 0,
"status": "Indexed",
"total_tokens": 118042,
"ingest_duration": "127.54",
"ingest_time": "2026-08-11 19:46:59",
"error_message": null
},
"operation_details": "{\"total_tokens\": 118042, \"duration_seconds\": 127.5, \"generated_wiki_pages\": [\"ware/wiki/procedures/驾行安心包理赔操作流程.md\", \"ware/wiki/entities/中邮智行及业务联系人.md\", \"ware/wiki/sources/鸿蒙智行/鸿蒙智行官方驾行安心包系列产品手册.md\", \"ware/wiki/procedures/驾行安心包销售出单流程.md\", \"ware/wiki/policies/驾行安心包免责与享权政策.md\", \"ware/wiki/products/驾行安心包系列产品.md\"]}",
"output_summary": {
"generated_file_count": 6,
"existing_file_count": 6,
"generated_characters": 14559,
"source_marker_count": 6,
"field_sources_mentions": 6,
"frontmatter_valid_count": 6
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 6,
"field_sources_mentions": 6,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
{
"schema_version": "1.0",
"checkpoint": "B02_dual_channel",
"run_id": "20260811_hist41_cold",
"started_at": "2026-08-11T11:18:37.812936+00:00",
"status": "Indexed",
"input": {
"file_name": "KB_外部渠道.md",
"file_type": "md",
"bytes": 595399,
"sha256": "4d0626b8c9ccb382a6d7ff5b44720bda4bc63ef39aa72f79cfd056368e3741bc"
},
"finished_at": "2026-08-11T11:22:47.953366+00:00",
"wall_duration_seconds": 250.141,
"file_id": "fcb32852-a18b-44db-abbf-702675f946d8",
"raw_path": "ware/raw/md/KB_外部渠道_fcb32852-a18b-44db-abbf-702675f946d8.md",
"legacy_raw_path": "ware/raw/md/KB_外部渠道.md",
"database_record": {
"id": "fcb32852-a18b-44db-abbf-702675f946d8",
"name": "KB_外部渠道.md",
"word_count": 0,
"status": "Indexed",
"total_tokens": 1235372,
"ingest_duration": "231.37",
"ingest_time": "2026-08-11 19:22:48",
"error_message": null
},
"operation_details": "{\"total_tokens\": 1235372, \"duration_seconds\": 231.4, \"generated_wiki_pages\": [\"ware/wiki/scripts/tianchuangbingjia-yichu-chuli.md\", \"ware/wiki/sources/鸿蒙智行/qinggai-youxiu-yichu-chuli-huizong.md\", \"ware/wiki/scripts/dipanhuban-yichu-chuli.md\", \"ware/wiki/scripts/jiaodian-xiaozhuoban-yichu-chuli.md\", \"ware/wiki/scripts/qimianbaohumo-yichu-chuli.md\", \"ware/wiki/scripts/diandongtaban-yichu-chuli.md\", \"ware/wiki/scripts/taiyangmo-yichu-chuli.md\"]}",
"output_summary": {
"generated_file_count": 7,
"existing_file_count": 7,
"generated_characters": 26244,
"source_marker_count": 7,
"field_sources_mentions": 7,
"frontmatter_valid_count": 7
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 7,
"field_sources_mentions": 7,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
{
"schema_version": "1.0",
"checkpoint": "B02_dual_channel",
"run_id": "20260811_hist31_cold",
"started_at": "2026-08-11T10:59:23.582643+00:00",
"status": "Indexed",
"input": {
"file_name": "《东风岚图延保新车零售指导手册》.md",
"file_type": "md",
"bytes": 30069,
"sha256": "6bce489cb848a0c109448d3079fa28bf5541bc151c9dc56eb7bd90fe022dcb43"
},
"finished_at": "2026-08-11T11:02:33.675490+00:00",
"wall_duration_seconds": 190.093,
"file_id": "0fede2b8-a6ce-4798-88f1-86b797da4de5",
"raw_path": "ware/raw/md/《东风岚图延保新车零售指导手册》_0fede2b8-a6ce-4798-88f1-86b797da4de5.md",
"legacy_raw_path": "ware/raw/md/《东风岚图延保新车零售指导手册》.md",
"database_record": {
"id": "0fede2b8-a6ce-4798-88f1-86b797da4de5",
"name": "《东风岚图延保新车零售指导手册》.md",
"word_count": 0,
"status": "Indexed",
"total_tokens": 132296,
"ingest_duration": "169.56",
"ingest_time": "2026-08-11 19:02:34",
"error_message": null
},
"operation_details": "{\"total_tokens\": 132296, \"duration_seconds\": 169.6, \"generated_wiki_pages\": [\"ware/wiki/sources/岚图/岚图延保新车零售指导手册.md\", \"ware/wiki/scripts/岚图延保销售话术与异议处理.md\", \"ware/wiki/concepts/岚图车型定位与用户画像.md\", \"ware/wiki/products/岚图整车延保产品方案.md\", \"ware/wiki/policies/岚图延保合规红线与免责条款.md\", \"ware/wiki/procedures/岚图延保服务与理赔流程.md\"]}",
"output_summary": {
"generated_file_count": 6,
"existing_file_count": 6,
"generated_characters": 18507,
"source_marker_count": 6,
"field_sources_mentions": 6,
"frontmatter_valid_count": 6
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 6,
"field_sources_mentions": 6,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
{
"schema_version": "1.0",
"checkpoint": "B02_dual_channel",
"run_id": "20260811_hist21_cold",
"started_at": "2026-08-11T10:44:58.517828+00:00",
"status": "Indexed",
"input": {
"file_name": "轻改产品.md",
"file_type": "md",
"bytes": 4708,
"sha256": "ac63d7a9a9b9ff61b47791798b65705e8d0188cb545a0924c55a949308f52ae1"
},
"finished_at": "2026-08-11T10:47:37.126682+00:00",
"wall_duration_seconds": 158.609,
"file_id": "cc03f03a-93b4-4d4f-812a-172e2c6acf49",
"raw_path": "ware/raw/md/轻改产品_cc03f03a-93b4-4d4f-812a-172e2c6acf49.md",
"legacy_raw_path": "ware/raw/md/轻改产品.md",
"database_record": {
"id": "cc03f03a-93b4-4d4f-812a-172e2c6acf49",
"name": "轻改产品.md",
"word_count": 0,
"status": "Indexed",
"total_tokens": 106013,
"ingest_duration": "145.12",
"ingest_time": "2026-08-11 18:47:37",
"error_message": null
},
"operation_details": "{\"total_tokens\": 106013, \"duration_seconds\": 145.1, \"generated_wiki_pages\": [\"ware/wiki/products/嘀加汽车脚垫.md\", \"ware/wiki/products/嘀加底盘护板.md\", \"ware/wiki/concepts/嘀加品牌与轻改定义.md\", \"ware/wiki/products/嘀加后排小桌板.md\", \"ware/wiki/products/嘀加天窗冰甲.md\", \"ware/wiki/products/嘀加漆面保护膜.md\", \"ware/wiki/products/嘀加电动踏板.md\", \"ware/wiki/products/嘀加太阳膜.md\", \"ware/wiki/sources/通用品牌/嘀加轻改产品知识说明书.md\"]}",
"output_summary": {
"generated_file_count": 9,
"existing_file_count": 9,
"generated_characters": 11407,
"source_marker_count": 9,
"field_sources_mentions": 9,
"frontmatter_valid_count": 9
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 9,
"field_sources_mentions": 9,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
{
"schema_version": "1.0",
"checkpoint": "B02_dual_channel",
"run_id": "20260811_hist51_cold",
"started_at": "2026-08-11T11:47:01.811023+00:00",
"status": "Indexed",
"input": {
"file_name": "鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf",
"file_type": "pdf",
"bytes": 9921845,
"sha256": "9bdd20200abff9db1b439630bc49998353ad404b43bab2a49e402c4ae5a59d28"
},
"finished_at": "2026-08-11T12:00:18.692238+00:00",
"wall_duration_seconds": 796.881,
"file_id": "181f6cc6-f94a-43b2-a03a-da61eaa6fb3f",
"raw_path": "ware/raw/pdf/鸿蒙智行官方驾行安心包系列产品手册260302(3)_181f6cc6-f94a-43b2-a03a-da61eaa6fb3f.pdf",
"legacy_raw_path": "ware/raw/pdf/鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf",
"database_record": {
"id": "181f6cc6-f94a-43b2-a03a-da61eaa6fb3f",
"name": "鸿蒙智行官方驾行安心包系列产品手册260302(3).pdf",
"word_count": 0,
"status": "Indexed",
"total_tokens": 529333,
"ingest_duration": "784.45",
"ingest_time": "2026-08-11 20:00:19",
"error_message": null
},
"operation_details": "{\"total_tokens\": 529333, \"duration_seconds\": 784.4, \"generated_wiki_pages\": [\"ware/wiki/procedures/鸿蒙智行驾行安心包理赔操作流程.md\", \"ware/wiki/procedures/鸿蒙智行驾行安心包销售出单流程.md\", \"ware/wiki/sources/鸿蒙智行/鸿蒙智行官方驾行安心包系列产品手册260302.md\", \"ware/wiki/concepts/鸿蒙智行驾行安心包常见问题与业务联系人.md\", \"ware/wiki/products/鸿蒙智行驾行安心包保障范围与理赔限额.md\", \"ware/wiki/products/鸿蒙智行驾行安心包产品与价格.md\", \"ware/wiki/policies/鸿蒙智行驾行安心包购买条件与免责条款.md\"]}",
"output_summary": {
"generated_file_count": 7,
"existing_file_count": 7,
"generated_characters": 22868,
"source_marker_count": 7,
"field_sources_mentions": 7,
"frontmatter_valid_count": 7
},
"quality_summary": {
"all_registered_pages_exist": true,
"frontmatter_valid_rate": 1.0,
"source_marker_count": 7,
"field_sources_mentions": 7,
"output_to_input_character_ratio": null,
"scope_note": "自动质量指标仅证明结构、落盘和来源标记;事实覆盖率由固定抽样题集另行评估。"
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!