Skip to content

Give the typed-graph bench a warm-base mode and count tokens by phase from the server log - #920

Merged
WaylandYang merged 1 commit into
devfrom
feat/bench-warm-base
Sep 25, 2026
Merged

WaylandYang merged 1 commit into
devfrom
feat/bench-warm-base

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

The missing reading named in #918: the per-document cost on a base that already ran, where alignment is paid per signature rather than per document.

  • typed.mjs --into <kb> --corpus redocred-100b: ingests a second batch into an existing base, extracts only those documents, runs alignment as the product would (decided signatures with an unchanged basis are not re-asked), scores only the new documents (a fact counts for every document its evidence names), and judges only facts evidenced in this batch, read against this batch's text. --into … --score re-scores an ingested batch.
  • fetch-redocred.mjs --name --exclude: a second batch that shares no document with the first, filenames under its own prefix, ontology file untouched; corpora/redocred-100b.json and its truth are committed (3600 gold facts, all on the base's 95 properties).
  • BENCH_SERVER_LOG: the result JSON carries model tokens per phase (extract, align, errata) and per document from the server's llm usage lines; the console prints the line.

Measured on run 3's base (README, 温库第二批): 25k tokens per document against 31k fresh, alignment 14k against 22k. The second hundred documents bring about 800 new signatures (bound 426 → 674, none 1178 → 1698), nearly as many as the first hundred: Re-DocRED's phrase signatures barely repeat across documents, so amortisation is small on this corpus. Judged precision 80.0%; same-sentence recall 11.7% after errata, lower than the first batch because signatures already decided none are not re-asked.

🤖 Generated with Claude Code

… from the server log

`--into <kb>` ingests a second batch into a base that already ran,
extracts only those documents, runs alignment as the product would
(decided signatures with an unchanged basis are not re-asked), and
scores only the new documents; a fact counts for every document its
evidence names, and the judge samples only facts evidenced in this batch
and reads them against this batch's text. `fetch-redocred.mjs` gains
`--name` and `--exclude` for a second batch that shares no document with
the first and does not rewrite the ontology; batch redocred-100b is
committed. With BENCH_SERVER_LOG the result carries model tokens per
phase and per document from the server's usage lines.

Measured on run 3's base: 25k tokens per document against 31k on a
fresh base, alignment 14k against 22k, because the second hundred
documents bring about 800 new signatures, nearly as many as the first.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Wayland Yang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit 03fee5a into dev Sep 25, 2026
7 checks passed
@WaylandYang
WaylandYang deleted the feat/bench-warm-base branch September 25, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant