Skip to content

feat(claude): add claude-haiku, the smaller model, as its own backend - #71

Merged
stephen-masters merged 1 commit into
mainfrom
feat/claude-haiku-backend
Oct 16, 2026
Merged

stephen-masters merged 1 commit into
mainfrom
feat/claude-haiku-backend

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

Brief 002 asks whether the smaller Claude model is good enough to be the default for batch escalation, given it costs about a fifth as much. This adds it as a backend so the harness can answer that, and records the answer: it is not.

What changes

  • New backend, claude-haiku. It is the Claude backend asking claude-haiku-5-5 instead of claude-opus-4-8.
    • The backend gains an optional model argument.
    • The registry wraps it the same way tesseract-auto wraps Tesseract.
    • AGENTS.md now lists model among the allowed optional arguments.
  • Its column is in benchmark.csv, from evaluate --backend claude-haiku --save --merge. No other column was re-measured.
  • No API backend counts as "best local" any more. The site's benchmark table, the walkthrough plates and the deck each had claude hard-coded as the only non-local column, so claude-haiku would have been bolded as best local on most posters.
    • walkthrough.toml gains a cloud = true flag.
    • The table and plates read that flag.
    • The deck has a matching NOT_LOCAL set.
  • Docs: README, the backends guide, installation, the command-line guide, and an engines-page section on the smaller model.

What the measurement showed

Character similarity Word recall
claude, whole corpus (ledger) 0.927 0.909
claude-haiku, whole corpus (ledger) 0.864 0.841
claude, local-failure set, three runs each 0.875 0.832
claude-haiku, local-failure set, three runs each 0.791 0.697
  • The local-failure set is the seven fixtures where the best local engine scores below 0.80 character similarity: bancroft, graumans, both Hollywood Boulevard scenes, kar-mi, over-the-fence and thurston.
    • I repeated those runs because a 20-word poster scored once is noisy.
    • The gap held across all three runs, so it is not run-to-run variation.
    • All but one of those references are human-verified, so these are real measurements, not self-consistency.
  • The errors are the costly kind for a catalogue. claude-haiku drops imprints and copyright lines (thurston in two of three runs, bancroft's 1895). Sometimes it writes plausible text in their place:
    • "Strobridge Litho Co." for bancroft's actual Springer & Welty;
    • "Eleven Swords" for kar-mi's Sixteen.
  • Where it appears to win, the cause is reading order, not reading. On over-the-fence, claude puts the imprint block first and pays for it in character similarity. Its words are the more accurate ones ("THE U.S. PRINTING CO." where Haiku wrote "THIES PRINTING CO."). On the page-six newspaper, the two models have the same word recall, and Haiku's character score swings between 0.59 and 0.87 depending on which column it reads first.

Checked

  • ruff check and ruff format --check pass.
  • pytest -m "not slow": 380 passed, including two new registry tests.
  • npm run build passes.
  • Playwright: 31 passed.
  • In the built benchmark table, claude-haiku is bolded on 0 rows.

The decision itself is recorded in brief 002 in the product repository, in a separate PR. Closes #30.

🤖 Generated with Claude Code

Scored beside claude through the harness so brief 002's question, whether
the smaller model is good enough for batch escalation, is a measurement.
It is not: on the posters local engines cannot read it drops small print
and substitutes plausible wording. The site and deck no longer count any
API backend as best local.

Refs #30

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying tetrak with  Cloudflare Pages  Cloudflare Pages

Latest commit: c68b9ef
Status: ✅  Deploy successful!
Preview URL: https://98cd9e60.tetrak.pages.dev
Branch Preview URL: https://feat-claude-haiku-backend.tetrak.pages.dev

View logs

@stephen-masters
stephen-masters merged commit e70207e into main Oct 16, 2026
8 checks passed
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.

Benchmark the smaller Claude model on the fixtures local engines fail

1 participant