From 782a8101caf24c5f573911ae24a51fbaf5488d16 Mon Sep 17 00:00:00 2001 From: Stephen Masters Date: Fri, 9 Oct 2026 13:52:47 +0100 Subject: [PATCH] docs(site): drop the average bars from the research walkthrough The results section drew the corpus averages twice: once as CSS bars above the table, once as the matplotlib chart below it. The chart carries the same figures with more detail and the ceiling reference set apart, so the bars went. The lede now introduces the table it precedes and carries the note about Claude being a ceiling reference that used to sit under the bars. The browser test that counted the bars is reduced to the document plates, whose row count still derives from the CSV header, so a CSV column with no engine entry still fails the suite. Co-authored-by: Yvette Mankerian Co-Authored-By: Claude Fable 5.1 --- .claude/skills/tetrak-ocr-design/SKILL.md | 8 +-- CLAUDE.md | 7 +- site/assets/scss/_app.scss | 88 ----------------------- site/layouts/research/walkthrough.html | 33 ++------- site/tests/site.spec.ts | 18 +---- 5 files changed, 16 insertions(+), 138 deletions(-) diff --git a/.claude/skills/tetrak-ocr-design/SKILL.md b/.claude/skills/tetrak-ocr-design/SKILL.md index e59fa66..fed23a5 100644 --- a/.claude/skills/tetrak-ocr-design/SKILL.md +++ b/.claude/skills/tetrak-ocr-design/SKILL.md @@ -181,10 +181,10 @@ reason it still looks like the same site: - No cards, no boxed callouts, no second accent. Scale comes from the corpus imagery, from display-size Playfair numerals, and from air. - The only marks are `--rule` hairlines and 2px `--clay` rules above a block. -- The average bars are drawn in CSS from the CSV, coloured with the `--engine-*` - tokens — the same tokens the matplotlib chart below them uses. Word recall is - the accent at 42% opacity rather than a second hue, because a second colour - there reads as a second engine. +- The per-document score rows and the matplotlib chart colour engines with + the `--engine-*` tokens and nothing else. There used to be a set of + CSS-drawn average bars above the results table as well; they showed what the + chart below the table already shows, and were removed in October 2026. If a section here seems to want a border to hold it together, it wants more space instead. diff --git a/CLAUDE.md b/CLAUDE.md index d52b905..f9bf321 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -265,9 +265,10 @@ Two more steps once it reaches the benchmark, neither obvious from the code: - Add an `[[engine]]` entry to [`site/data/walkthrough.toml`](site/data/walkthrough.toml) with `key` matching the CSV column stem, an `accent` token, and its prose. - The walkthrough draws its bars from `benchmark.csv` but takes their names - and colours from there, so a column with no entry renders one bar short - and fails the browser suite rather than the build. + The walkthrough reads its figures from `benchmark.csv` but takes the + engines' names and colours from there, so a column with no entry leaves + every document plate one row short and fails the browser suite rather than + the build. - Run `tetrak-ocr evaluate --backend --save --merge` to put its column into `benchmark.{csv,md}`. `--all` re-runs every engine, which costs hours and paid API calls for figures that have not changed. diff --git a/site/assets/scss/_app.scss b/site/assets/scss/_app.scss index ce0f832..e48ad7d 100644 --- a/site/assets/scss/_app.scss +++ b/site/assets/scss/_app.scss @@ -623,94 +623,6 @@ } } -// --- Average bars ------------------------------------------------------------ -// Drawn in CSS from the CSV at build time rather than by a charting library. -// Build time over runtime, and the bars take their colour from the same engine -// tokens the matplotlib chart below them uses. -.wt-bars { - margin: 3rem 0 0; - max-width: 900px; -} - -.wt-bar { - display: grid; - grid-template-columns: 150px minmax(0, 1fr) 108px; - align-items: center; - gap: 20px; - padding: 9px 0; - - &__name { - margin: 0; - font-family: var(--font-mono); - font-size: 0.8rem; - - code { - font-size: 1em; - } - } - - &__track { - display: flex; - flex-direction: column; - gap: 4px; - } - - &__fill { - height: 9px; - min-width: 2px; - - &--chr { - background: var(--accent); - } - - // Word recall is the same engine measured a second way, so it is the same - // colour set back rather than a second hue. A second colour here would - // read as a second engine. - &--wrd { - background: var(--accent); - opacity: 0.42; - } - } - - &__figs { - margin: 0; - font-family: var(--font-mono); - font-size: 0.8rem; - font-variant-numeric: tabular-nums; - text-align: right; - color: var(--ink-soft); - - span { - color: var(--rule); - } - } - - &s__key { - margin: 1.4rem 0 0; - font-size: 0.85rem; - line-height: 1.6; - color: var(--ink-soft); - } - - &s__swatch { - display: inline-block; - width: 22px; - height: 8px; - margin-right: 5px; - margin-left: 10px; - vertical-align: baseline; - background: var(--ink-soft); - - &:first-child { - margin-left: 0; - } - - &--wrd { - opacity: 0.42; - } - } -} - // --- Findings ---------------------------------------------------------------- // The page's spot colour. Set at display size with a clay rule above, which is // as close to a pull quote as the system goes. diff --git a/site/layouts/research/walkthrough.html b/site/layouts/research/walkthrough.html index 7c29a2a..112d635 100644 --- a/site/layouts/research/walkthrough.html +++ b/site/layouts/research/walkthrough.html @@ -47,8 +47,6 @@ {{- end }} {{- $engines = $engines | append . }} {{- end }} - {{- $locals := where $engines "ceiling" "!=" true }} - {{- $avg := index $rows "Average" }}
@@ -160,33 +158,14 @@

{{ $doc.title }}

Four · The results

Choosing per file beats choosing an engine

- Averaged over the whole corpus. Character similarity is order-sensitive - and word recall is not, so they are always reported as a pair — the gap - between them is where the interesting behaviour lives. + Every engine against every document, then averaged over the corpus. + Character similarity is order-sensitive and word recall is not, so they + are always reported as a pair — the gap between them is where the + interesting behaviour lives. claude is set apart throughout: + it generated the reference transcripts everything else is scored + against, so its figures measure self-consistency rather than accuracy.

-
- {{- range $locals }} - {{- $chr := index $avg (index $col (printf "%s_chr" .key)) }} - {{- $wrd := index $avg (index $col (printf "%s_wrd" .key)) }} -
-

{{ .label }}

-
-
-
-
-

{{ printf "%.2f" (float $chr) }} / {{ printf "%.2f" (float $wrd) }}

-
- {{- end }} -

- character similarity - word recall - — claude is omitted here: it generated the reference - transcripts everything else is scored against, so its bar would measure - self-consistency rather than accuracy. -

-
-

Every engine against every document

{{ partial "benchmark.html" (dict "boldBest" true) }} diff --git a/site/tests/site.spec.ts b/site/tests/site.spec.ts index 909e84a..00cef71 100644 --- a/site/tests/site.spec.ts +++ b/site/tests/site.spec.ts @@ -67,23 +67,9 @@ test("the walkthrough renders its figures from the CSV, not from prose", async ( const csv = readFileSync(join(__dirname, "..", "..", "evaluation", "ocr", "benchmark.csv"), "utf8"); const header = csv.split("\n")[0].split(","); - const average = csv.split("\n").find(line => line.startsWith("Average"))!.split(","); - const chrOf = (backend: string) => - Number(average[header.indexOf(`${backend}_chr`)]).toFixed(2); - - // Every local engine gets a bar, and the ceiling reference does not: its bar - // would measure self-consistency rather than accuracy. Derived from the CSV - // header (all engines minus the ceiling), like every other count here — a + // Five document plates, each with a full set of per-engine figures. The + // count is derived from the CSV header, like every other count here — a // hardcoded 6 broke the day Vision became the eighth backend. - const bars = page.locator(".wt-bar"); - await expect(bars).toHaveCount(header.filter(c => c.endsWith("_chr")).length - 1); - await expect(page.locator(".wt-bars")).not.toContainText("claude*"); - - // The routing engine's average, straight off the CSV. - await expect(page.locator(".wt-bar", { hasText: "auto-local" }).locator(".wt-bar__figs")) - .toContainText(chrOf("auto-local")); - - // Five document plates, each with a full set of per-engine figures. await expect(page.locator(".wt-plate")).toHaveCount(5); const firstScores = page.locator(".wt-scores").first(); await expect(firstScores.locator(".wt-scores__row")).toHaveCount(header.filter(c => c.endsWith("_chr")).length);