Skip to content

The bench extracts each document once, and the table rules ride only with a passage that has a table - #1000

Merged
WaylandYang merged 3 commits into
devfrom
cost/next
Sep 28, 2026
Merged

WaylandYang merged 3 commits into
devfrom
cost/next

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Two things found while measuring what one document costs.

The bench extracted every document twice

A base with a chat model queues extraction by itself once a document is parsed. typed.mjs and timewords.mjs then called the manual extract route for every document, and a manual extract is a forced full run that dismisses the one in progress. 20 documents with 24 chunks made 45 extraction calls. Both scripts now force extraction only for documents the pipeline did not queue. Per-document token figures recorded before this include nearly a second extraction.

The table rules ride only with a passage that has a table

The extraction system message is about 2,380 tokens for a passage of about 270. The sentences on reading tables (about 150 tokens) are now included only when the passage has one: a pipe, an HTML cell, a tab, or a line of three or more columns set apart by runs of spaces. For a passage with a table the message is byte for byte what it was.

Measured

31 passages without a table, each system message three times, replies read by the server's parser and scored against gold entity pairs and the time bench expectations:

system message input per call gold pairs same sentence time words replies repaired down to one statement
as it was 2,488 27.0 / 27.6 / 28.6% 42.6 / 44.6 / 47.0% 28 / 28 / 27 0 of 93
without the table rules 2,339 28.6 / 28.4 / 28.6% 47.0 / 46.2 / 46.2% 27 / 27 / 27 0 of 93
also without rule 6 2,296 29.0 / 27.4 / 26.5% 49.4 / 47.4 / 43.4% 28 / 27 / 28 3 of 93
also without the closing example 2,182 27.9 / 23.3 / 27.6% 44.2 / 41.4 / 45.0% 28 / 29 / 28 0 of 93

Rule 6 and the closing example stay: without rule 6 the model miswrites brackets, and without the example one run in three lost gold pairs.

Full 20-document run on gemini-3.5-flash with single extraction: 24,175 tokens per document, judged precision 79.7%. Details in scripts/bench/README.md.

🤖 Generated with Claude Code

WaylandYang and others added 3 commits September 28, 2026 20:53
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Wayland Yang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Wayland Yang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Wayland Yang <wayland0916@gmail.com>
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