我把数据集交付前的质量检查、泄漏核验和人工签批放进同一个工作台。这些实测记录了 Agent 能替人做到哪一步,也展示了并发标注时最先卡在哪里。I built Datakeel to bring quality checks, leakage review and human sign-off into one dataset workbench. These notes trace what an agent can do on its own and where the system slows down under load.
11 月 28 日 14:09(上海)核对时,本地 main 的 16fcddb7 已包含 Wave 2 同步提交 468e37bc 及后续审计与取证工具。包清单仍为 0.27.1,本地尚无 v0.28.0 标签。下文每组实测单独标注运行时的版本与环境。At 14:09 Shanghai time on 28 November, local main at 16fcddb7 included the Wave 2 integration at 468e37bc and subsequent audit and evidence tools. The package manifest still read 0.27.1, with no local v0.28.0 tag. Each benchmark below identifies its own revision and environment.
Wave 1治理与评测Governance and evaluation
MCP 2.0 · 60e00092
给代理划定数据范围Give agents a scoped view
网关新增回环 Streamable HTTP。五档访问配置可限定到单个数据集,提供六种只读资源、五个治理提示和四个计划与工作流查询工具。写操作仍由人在 Web 或 CLI 签批。The gateway adds loopback Streamable HTTP. Five profiles can narrow access to one dataset. Six read-only resources, five governance prompts and four plan or workflow inspection tools expose evidence. People approve writes in the Web UI or CLI.
BYOD / CI · c18ec0d0
让质量检查进入 CIGate delivery on measured quality
datakeel audit 为自带数据生成质量与跨划分泄漏报告,可按阈值让 CI 失败。自托管兼容模型走本机回环可免 API Key,默认推理计价为零,硬件和电费另计。datakeel audit checks a supplied dataset for quality and cross-split leaks. Thresholds can fail CI. A compatible self-hosted model on loopback needs no API key. Its default inference tariff is zero, excluding hardware and electricity.
Harness 2.0 · 0841302c
把会话变成回归用例Turn a session into a regression case
真实会话可脱敏导出为 Golden YAML 草稿,复核后按用例或标签重跑。覆盖模型配置后可对照两次评测的 Markdown 报告。另有 20 条双语用例专测一句话规划。Export a redacted conversation as a draft Golden YAML case, review it and rerun by case or tag. Override the model and compare two saved runs in Markdown. A separate 20-case bilingual corpus exercises the intent planner.
Workflows · d3b9cb7e
并发取证,按门槛分支Gather evidence in parallel
用户可覆写专家与工作流声明并离线校验。parallel_tools 每步容纳 1–8 个只读调用,按声明顺序汇总。内置交付检查同时读取质量、报告和证据,以 80 分决定下一步。Users can override specialist and workflow definitions and validate them offline. A parallel_tools step accepts 1–8 reads and returns them in declared order. The release-readiness workflow joins quality, report and evidence reads, then branches at 80 points.
Copilot · 6054bfdd
让驳回理由进入下一轮规划Replan from the reviewer’s reason
规划器读取已保存的驳回理由和补充指导,重新提出方案。Copilot 随页面给出双语建议。稳定提示前缀可复用缓存,Anthropic 最多标记两处断点,OpenAI 使用确定性缓存键。The planner reads the recorded rejection and reviewer guidance before proposing a new plan. Copilot suggestions follow the current page. Stable prompt material can use up to two Anthropic cache breakpoints or a deterministic OpenAI cache key.
Agent Ops · d1729ed8
把一次退步定位到用例Trace a regression to one case
看板汇总缓存、护栏和工具可靠性,评测历史按稳定用例 ID 比较通过、失败和增删。Planner 用 SSE 显示实时阶段,阶段事件仅在运行时显示,回放使用持久化结果。The dashboard tracks cache usage, guardrails and tool reliability. Evaluation history compares outcomes by stable case ID, including added and removed cases. Planner stages stream live over SSE. Replay uses the persisted outcomes.
Wave 2 与后续进展Wave 2 and subsequent changes
Evidence · 2e3c0e11 / 162da17b / d8d6bca5
从质量问题追到原图Trace a finding back to its image
审查员可从五个质量维度下钻,放大原图并切换标注叠层。模型每次可复核同一数据集内的 1–4 张图片。MCP 的证据链接固定到来源版本,每次读取都重新校验权限。Reviewers can drill into five quality dimensions, zoom in and toggle annotations. A model can inspect 1–4 images from one dataset per call. MCP evidence links pin the source version and recheck access on every read.
Workspace · c2bc66ae / 0c83e326
找到模块,也找回上次的笔记Find a module or a note from the last review
三组导航和命令面板可直达模块与对象。已完成的回复可编辑为全局或数据集笔记,再用中英术语表和 BM25 跨语言检索。脱敏笔记支持导入、导出。Three navigation lanes and command search lead to modules and objects. Save a reviewed reply as a global or dataset note, retrieve it across languages with a bilingual glossary and BM25, or transfer it through redacted export and import.
Overlap · 7696e556 / 61f27a61
查出跨分区样本和重复段落Locate cross-split matches and repeated passages
Rust 直接比对不同分区的图像 dHash 和文本 SimHash,保留 Python 回退。独立的子文档审计可从本地训练文件找出重复文本单元,在 JSONL 账本中记录原文位置供人工核实。Rust compares image dHashes and text SimHashes across splits, with a Python fallback. A separate offline audit finds repeated text units in local training files and records their original locations in a JSONL ledger for review.
Metrics · 4688346d / 16fcddb7
诊断指标草稿,重放 SQL 反例Diagnose draft metrics and replay SQL discrepancies
dbt 导入器保留不兼容的指标草稿,并给出阻塞原因。metric-verify 在小表上比较生成的 SQL 与独立 Python 计算结果。发现差异即可保存反例供重放,搜索范围受实例预算限制。The dbt importer retains unsupported metrics as drafts and reports what blocks conversion. On small tables, metric-verify compares generated SQL against an independent Python evaluator. Disagreements can be saved and replayed within the search budget.
Parquet · 4f5146f1
只读所需的本地 Parquet 列Read only the Parquet columns an audit needs
本地分片按映射列分批读取,直接进入质量与跨分区泄漏检查。默认上限为 1 万行、64 MiB 映射列数据,超限即停止。该字节预算只计入选列的值,进程内存另计。The audit reads mapped columns from local shards in batches for quality and cross-split leakage checks. It stops above the default limits of 10,000 rows or 64 MiB of mapped values. Process memory also includes other allocations.
OTLP · 1c9713e8
沿执行树定位失败的工具调用Follow a failed call through the execution tree
追踪导出器只读已记录的模型、工具和子代理调用,按委派关系组成 OTLP 执行树。日志标识经哈希处理,未完成的调用标为待定,重试导出可按稳定的 span ID 去重。The exporter reads recorded model, tool and specialist calls and links them in an OTLP execution tree. Identifiers are hashed, unfinished calls are marked incomplete, and stable span IDs let consumers deduplicate repeated exports.
B1–B7 · 2026-11-11
两套数据库能处理多大负载?How far did each database scale?
同一台工作站上,分别用 SQLite 和 PostgreSQL 跑导入、流水线、问数和故障恢复。B2 在 8 个进程下每秒处理数千份文件。换成 B5 的 50 个交互用户,两套库都错过了 1 秒的 p95 目标。p95 表示 95% 的请求能在该时长内完成。On the same workstation, eight workers processed thousands of files per second in B2. When the workload switched to 50 interactive users in B5, both databases missed the one-second p95 target. A p95 of one second means 95% of requests finish within a second.
B2 流水线吞吐量 · 文件/秒B2 pipeline throughput · files per second
SQLite6,769.5
PostgreSQL4,476.5
容量矩阵 · 同一行使用同一单位Capacity matrix · units are given in each row
场景与指标Workload and measure
SQLite
PostgreSQL
B1 · M10 万文件导入(s)Import 100k files (s)
32.20
34.10
B1 · M选取 1 万文件建版本(s)Version 10k selected files (s)
20.01
24.13
B1 · M版本对比(s)Compare versions (s)
9.88
13.10
B1 · L100 万条元数据离线导入(s)Offline import of 1M metadata entries (s)
B3 的目录有 1 万张表、20 万列。B4 两套数据库的样本行数相差十倍。B5 持续 300 秒,SQLite 完成 1,685 次请求,PostgreSQL 完成 18,938 次,均为零错误。尾延迟仍不足以支持 50 用户交互 SLA。B6 在输出发布前强制终止一个进程,两栈各重试 1 次,0 任务丢失、0 重复发布。B3 indexed 10,000 tables and 200,000 columns. B4 used ten times more fact rows on PostgreSQL. During 300 seconds in B5, SQLite handled 1,685 requests and PostgreSQL handled 18,938 with zero errors. Their tail latencies rule out a 50-user interactive SLA on this workload. Killing one worker before publication in B6 triggered one retry on each stack, with zero lost tasks or duplicate publications.
测量环境、来源与复现Environment, sources and reproduction
2026-11-11 的 18 次顺序压测使用合成数据、seed 23,关闭性能采样。记录的主机配置为 Apple M5 Pro、15 核、48 GiB,macOS 26.3.2 arm64、Python 3.12.13、SQLite 3.53.1、本地容器 PostgreSQL 17.11。B5 包含 ASGI 路由和序列化,排除网络套接字与代理。B1 L 仅测离线元数据。The 18 sequential runs on 2026-11-11 used synthetic fixtures, seed 23 and no profiler. The reported 15-core Apple M5 Pro had 48 GiB of memory and ran macOS 26.3.2 arm64, Python 3.12.13, SQLite 3.53.1 and PostgreSQL 17.11 in a local container. B5 included ASGI routing and serialization and excluded sockets and proxies. B1 L measured offline metadata.
测量版本 0.24.1,提交 3fafd6a、6686646。两者的 Python 源码 SHA-256 前缀均为 88de0f45394d。在锁定的开发环境中选 B1–B7 逐个运行,B1 L 使用 --size L。PostgreSQL 需通过 DATAKEEL_TEST_DATABASE_URL 指向本机一次性数据库。Version 0.24.1 at 3fafd6a and 6686646 shared the Python source SHA-256 prefix 88de0f45394d. In the locked development environment, select B1–B7 individually and use --size L for B1 L. For PostgreSQL, set DATAKEEL_TEST_DATABASE_URL to a disposable loopback database.
uv sync --locked
uv run python -m scripts.scale_bench B2 --size M --stack sqlite --seed 23 --output b2-sqlite.json
uv run python -m scripts.scale_bench B2 --size M --stack postgres --seed 23 --output b2-postgres.json
缩短写锁时间后,保存快了多少?What changed when the write lock got shorter?
50 位模拟标注员反复领取、保存、提交任务。原先每次领取都要在写锁内把候选任务取出,用 Python 排序。把显示顺序存入数据库后,SQLite 的整场保存 p95 从 2,841 ms 降到 188 ms,约为原来的十五分之一。Fifty simulated annotators repeatedly claimed, saved and submitted tasks. Each claim used to fetch and sort all eligible tasks in Python while holding the write lock. Persisting their display order reduced SQLite’s whole-run save p95 from 2,841 ms to 188 ms, about a fifteenfold reduction.
整场对比 · 修复前 → 修复后Whole-run comparison · before → after
指标Measure
SQLite
PostgreSQL
保存 p95(ms)Save p95 (ms)
2,841 → 188
113 → 73
领取 p95(ms)Claim p95 (ms)
548 → 33
254 → 77
吞吐量(操作/秒)Throughput (ops/s)
37.3 → 58.3
56.3 → 58.3
10 个完整分钟的尾延迟Tail latency across ten full minutes
横轴为分钟,纵轴为 p95 毫秒,四图使用相同对数刻度。Minutes run horizontally. The vertical axis shows p95 in milliseconds on the same logarithmic scale in all four charts.
修复后,两套库都出现 0 次重复领取和 0 次重复回收,各有 150 个弃置租约成功回收并再次领取。SQLite 最后一分钟的保存 p95 达到 247 ms,高于整场 188 ms。这里测的是动作准备和执行,未包含 HTTP。After the fix, both databases recorded zero duplicate claims or releases. All 150 abandoned leases on each stack were reclaimed and claimed again. In SQLite’s final full minute, save p95 reached 247 ms despite a whole-run p95 of 188 ms. These timings cover action preparation and execution, excluding HTTP.
查看曲线原值(毫秒)Read the chart values in milliseconds
SQLite · 修复前 → 修复后before → after
分钟Minute
保存 p95Save p95
领取 p95Claim p95
1
2,538 → 149
2,652 → 635
2
2,853 → 167
163 → 21
3
2,733 → 160
195 → 30
4
2,534 → 176
109 → 18
5
2,851 → 186
221 → 31
6
2,648 → 181
430 → 31
7
2,653 → 232
500 → 31
8
3,150 → 231
1,006 → 32
9
2,866 → 242
761 → 20
10
3,684 → 247
763 → 51
PostgreSQL · 修复前 → 修复后before → after
分钟Minute
保存 p95Save p95
领取 p95Claim p95
1
147 → 70
1,179 → 281
2
144 → 72
293 → 76
3
130 → 74
250 → 75
4
129 → 75
251 → 77
5
97 → 72
204 → 71
6
94 → 72
171 → 78
7
108 → 72
216 → 76
8
99 → 74
176 → 79
9
89 → 74
182 → 74
10
97 → 72
178 → 77
负载、提交与复现Workload, revisions and reproduction
沿用上节 M5 Pro / 48 GiB 与两套库版本。1 万任务,50 人,10 进程,600 秒。每次领取后保存 3 次再提交,操作间等待 0.5–1.5 秒。每 40 次领取弃置 1 个任务,租约为 1 分钟。每套配置顺序运行一次,曲线舍去末尾不足一分钟的桶。Same M5 Pro, 48 GiB and database versions as B1–B7. Ten processes hosted 50 users over 10,000 tasks for 600 seconds. Each claim led to three saves and a submit, with 0.5–1.5 s pauses. Every 40th claim was abandoned on a one-minute lease. Each configuration ran once, sequentially. Charts omit the trailing partial minute.
11 月 11 日和 12 日的源码 SHA-256 前缀依次是 88de0f45394d 和 f2ae92db14d9。在基线 3fafd6a/6686646 与修复 8de3577 的检出目录分别运行下列命令,再将 --stack 改为 postgres 重跑。The 11 and 12 November source SHA-256 prefixes are 88de0f45394d and f2ae92db14d9. Run this in separate baseline (3fafd6a/6686646) and fixed (8de3577) checkouts. Repeat with --stack postgres on a disposable local database.
uv run python -m scripts.scale_bench B8 --size M --stack sqlite --workers 10 --think-ms 1000 --seed 23 --output b8-sqlite.json
近重复哈希,速度和召回如何取舍?How fast can the hash kernel find near-duplicates?
prefix 只比较前 4 位相同的哈希,容易漏掉跨桶的样本对。exact 先用多个分段找候选,再核对完整汉明距离。10 万哈希时,Rust 的 exact 用了 0.074 秒,并找全了植入的近重复对。Prefix matching only compares hashes in the same four-bit bucket and can miss pairs across buckets. Exact matching indexes multiple segments, then verifies Hamming distance. On 100,000 hashes the Rust exact kernel took 0.074 seconds and found every planted pair.
10 万哈希 · Python 耗时 ÷ Rust 耗时100,000 hashes · Python time ÷ Rust time
prefix348.5×
exact≈ 2,099×
比较内核耗时(秒)· 每行一次调用Comparison time in seconds · one invocation per row
哈希数与模式Hash count and mode
Python
Rust
10,000 prefix
0.465
0.0021
10,000 exact
2.198
0.0046
100,000 prefix
26.530
0.076
100,000 exact
156.339
0.074
1,000,000 prefix
超时Timeout
12.815
1,000,000 exact
超时Timeout
7.311
100 万哈希时,Python 两种模式都在 600 秒时限内超时,召回率未知。Rust exact 用了 7.311 秒,峰值 RSS 270.86 MiB,植入召回率 1.0。该计时只包含哈希比较,图片解码和数据生成在计时范围外。Both Python modes hit the 600-second process limit at one million hashes, leaving recall unmeasured. Rust exact finished in 7.311 seconds with peak RSS of 270.86 MiB and planted recall of 1.0. Timings cover hash comparison and exclude image decoding and fixture generation.
环境、数据分布与复现Environment, input distribution and reproduction
Apple M5 Pro(15 个逻辑 CPU,48 GiB),macOS 26.3.2 arm64、CPython 3.12.13、Rust 1.96.0,release 扩展 0.1.0、Python 内核 1.0,Rayon 默认线程池。每档使用 seed 20261027 生成 64 位哈希,植入 N/100 对,半数跨前缀。共享主机上每行仅测一次,表中的倍数适用于该分布与比较内核。Apple M5 Pro, 15 logical CPUs, 48 GiB, macOS 26.3.2 arm64, CPython 3.12.13, Rust 1.96.0, release extension 0.1.0, Python kernel 1.0 and the default Rayon pool. Seed 20261027 generated 64-bit hashes with N/100 planted pairs, half across prefix buckets. Each row is one sample on a shared host. Speedups apply to this distribution and comparison kernel.
图片评测运行真实抽取流程,并与独立生成的标准答案比对。人工植入样本的召回率不能外推到任意真实图片集。可在含实测记录的提交 c3d33e2e 中构建扩展后执行。The image evaluation ran the extraction pipeline against independently generated ground truth. Planted recall measures this artificial distribution. Build the extension in the benchmark report revision c3d33e2e to reproduce.
uv sync --locked
make check-rust
uv run python -m scripts.near_duplicate_benchmark --output benchmark.json
uv run datakeel eval-evidence --mode prefix --json
uv run datakeel eval-evidence --mode exact --json
20 条双语规划用例,验证了什么?What did the 20 bilingual planning cases verify?
同一套规划器实际执行参数校验、作用域和审批检查。离线评测用固定的模型回复驱动它,逐轮核对动作的顺序、参数,以及何时应追问或拒绝。每个用例的所有轮次都通过才计一分。The actual planner applied its schema, scope and approval checks. Scripted model replies drove each turn, with expectations for ordered actions, parameters, clarifying questions and refusals. A case passed only when every turn matched.
按语言统计 · 每格代表一个通过的用例Cases by language · each square is one passing case
规划轮次的动作、参数与审批Plan turns matching actions, parameters and approvals
12 / 12
澄清问题的精确率 / 召回率Clarification precision / recall
1.0 / 1.0
正确阻止越界或不受支持的请求Boundary turns safely handled
6 / 6
fake 模式复现的是确定性的集成边界。语义理解、真实模型在新说法上的准确率和在线延迟仍需单独测量。Fake mode exercises deterministic integration behavior. Semantic understanding, accuracy on unseen phrasing and live provider latency require separate measurements.
语料指纹、运行方式与复现Corpus fingerprint, runner and reproduction
2026-11-28 在 9d5a7d8b 独立源码快照上离线复跑(CPython 3.12.13)。每个用例在独立临时 SQLite 中生成夹具,模型为 fake-script。用例含改述、多步动作、歧义澄清、无权限写入及失败重规划。本次评测没有调用在线模型。Replayed offline on 2026-11-28 from an isolated snapshot at 9d5a7d8b with CPython 3.12.13. Each case used a fresh temporary SQLite store, generated fixtures and fake-script replies. The corpus includes paraphrases, ordered chains, clarification, unauthorized writes and failed-chain replanning. The run made no live model calls.
运行方式记录于 docs/EVALUATION.md。contracts/intents/benchmark.yaml 的文件 SHA-256 前缀为 7822d893d7fe,评测选中用例的规范化摘要为 98dc2ea5dbe3。从包含该命令的源码检出运行。The runner is documented in docs/EVALUATION.md. The file SHA-256 prefix for contracts/intents/benchmark.yaml is 7822d893d7fe. The canonical digest prefix for the selected cases is 98dc2ea5dbe3. Run the command from a checkout containing this harness.
uv run datakeel eval-intents --provider fake --json --markdown intent-report.md