Skip to content

Benchmark v2 — schema-first, multi-source, rubric-based judging - #162

Merged
hydropix merged 3 commits into
mainfrom
benchmark-v2
May 9, 2026
Merged

Benchmark v2 — schema-first, multi-source, rubric-based judging#162
hydropix merged 3 commits into
mainfrom
benchmark-v2

Conversation

@hydropix

@hydropix hydropix commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

Complete rework of the benchmark system. Lives in parallel with v1 — the wiki workflow is gated on push to main, so this branch does not affect the live wiki.

What's in

Data layout

  • Split monolithic YAMLs into per-entry files under benchmark/data/
  • 17 reference texts across 6 source languages (en, fr, de, es, ja, ko, zh-Hans)
  • 45 target languages
  • New benchmark/data/submissions/ for community contributions

Schemas + validation

  • 4 JSON Schema files (submission, language, reference_text, model)
  • scripts/validate_submission.py for local + CI checks

CLI

  • --pairs flag (source:target) replaces en-only --languages
  • --no-evaluate for manual judging workflows
  • Poe added as a translation provider
  • New submit and aggregate-submissions commands

Manual evaluation pipeline

  • scripts/dump_for_evaluation.py — dumps a brief for a human/LLM judge
  • scripts/apply_evaluations.py — patches a run with judge scores
  • scripts/submission_to_run.py — re-evaluate a historical submission

Aggregation + wiki

  • benchmark/aggregator.py merges submissions via median, exposes n_obs and verified/self-reported badges
  • Wiki templates updated to surface those columns

GitHub Actions

  • validate-submission.yml — schema validation + replay sampling on PR
  • publish-wiki.yml — regenerates wiki on merge to main

Documentation

  • docs/JUDGE_RUBRIC.md — formal scoring rubric v1 (anchored 1-10 scale, penalty table, hard ceilings)
  • docs/BENCHMARK_WORKFLOW.md — end-to-end procedure
  • docs/CONTRIBUTING_BENCHMARK.md — contributor guide

Status

Draft. Iterating on:

  • Run benchmark on the 4 chosen models (gemma3:27b done, gemini-3-flash-preview / mistral-medium-3.1 / gpt-5-mini pending)
  • Decide wiki cohabitation strategy (V1 archive prefix vs namespace)
  • Validate the publish-wiki workflow on a test wiki before merge

Test plan

  • All 18 reference texts load and pass JSON Schema
  • CLI --pairs and --no-evaluate flags work end-to-end
  • Submit → aggregate → wiki pipeline tested with a synthetic submission
  • submission_to_run.py reconstructs a re-evaluable run JSON from a submission
  • Aggregator merges 2 observations on the same triple with n_obs=2 and median scores
  • Real run end-to-end (gemma3:27b done, awaiting Poe runs)

🤖 Generated with Claude Code

hydropix and others added 3 commits May 9, 2026 22:35
Complete rework of the benchmark system:

Data layout
- Split monolithic languages.yaml / reference_texts.yaml into per-entry YAMLs
  under benchmark/data/{languages,reference_texts/<lang>}/
- 17 reference texts across 6 source languages (en, fr, de, es, ja, ko, zh-Hans)
- 45 target languages (added en for back-translation pairs)
- New benchmark/data/submissions/ for community contributions

Schemas
- JSON Schema files for submission, language, reference_text, model
- Strict validation enforced both locally (CLI) and in CI

CLI
- New --pairs flag (source:target) replacing en-source-only --languages
- New --no-evaluate flag to skip auto-judge for manual evaluation
- Poe added as a translation provider
- New cmd_submit and cmd_aggregate_submissions

Manual evaluation pipeline
- scripts/dump_for_evaluation.py — dumps a brief for a human/LLM judge
- scripts/apply_evaluations.py — patches a run with externally-produced scores
- scripts/submission_to_run.py — reconstruct a runnable JSON from a submission
  for re-evaluation with a stronger judge later

Aggregation + wiki
- benchmark/aggregator.py merges multiple submissions on (model, text, lang)
  via median; surfaces n_obs and verified/self-reported badges
- Wiki templates updated to display Obs and Verified columns

GitHub Actions
- validate-submission.yml — runs schema validation + replay sampling on PRs
  touching benchmark/data/submissions/
- publish-wiki.yml — regenerates and pushes the wiki on merge to main

Documentation
- docs/JUDGE_RUBRIC.md — formal scoring rubric (v1) with anchored 1-10 scale,
  penalty table, hard ceilings, and dispersion rule for cross-model judging
- docs/BENCHMARK_WORKFLOW.md — end-to-end procedure for maintainers
- docs/CONTRIBUTING_BENCHMARK.md — contributor guide

Notes
- Wiki workflow gated on push to main; nothing fires from this feature branch
- benchmark_results/ now gitignored (local artefacts only)
- .claude/ commands stay local; users opt-in via gitignore exception

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
scripts/archive_v1_wiki.py
  One-shot script that clones the wiki, renames every existing page with the
  `Archive-` prefix, rewrites internal cross-page links to keep the archived
  content browsable on its own, generates `Archive-Index.md`, then commits
  and pushes. Supports --dry-run, --no-push, --message, --wiki-url.

home.md.j2
  Top-of-home banner: "Methodology v2 — judge: Claude Opus 4.7 ... Previous
  benchmark archived under Archive-Index". Browse section includes a link to
  Archive-Index.

docs/BENCHMARK_WORKFLOW.md
  New section "Switching the live wiki from v1 to v2" documenting the archive
  procedure (dry-run, push, cleanup behaviour). Confirms the publish-wiki
  workflow's cleanup globs leave Archive-* pages untouched.

.gitignore
  /benchmark_results/ and .wiki_repo_archive/ excluded.

Smoke-tested against the live wiki: 49 v1 pages would be archived
(1 Home, 2 cross-cutting tables, 1 Benchmark-System, 19 Language-*, 26 Model-*).
Link rewriter preserves external URLs and rewrites only page-name targets
that match an archived page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-opus-4-7-rubric-v1)

45 translations evaluated:
- en→{zh-Hans, es, fr, vi}: 10 each
- ja→en, ko→en, ja→zh-Hans: 1 each
- zh-Hans→en: 2

Per-pair averages (overall, rubric v1):
  ja→en       9.00 (excellent: kokoro)
  zh-Hans→en  8.25 (lu_xun, hu_shi)
  en→es       7.80
  en→fr       7.70
  en→vi       7.70
  ja→zh-Hans  7.50
  en→zh-Hans  7.40 (recurring untranslated-Latin / mixed-script issues)
  ko→en       6.50 (Jongno hallucination on unsu_jouen_nal)

Global average: 7.67. Distribution well spread across 6.0-8.5 thanks to the
formal rubric (start at 10, deduct per detected issue, hard cap 9.0 without
human reference).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Replay Report

benchmark/data/submissions/2026-05-09_hydropix_gemma3-27b.json

  • Submitted by: github:hydropix
  • Provider: ollama
  • Model: gemma3:27b
  • Verified mode: self_reported
  • Sampled: 4 / 45 results
  • Divergent / suspicious: 2
  • Marked as self-reported in the wiki because the model is not replayable in CI.
text lang status details
kokoro zh-Hans ok lang_detected=zh-cn, lang_ok=True, length_ok=True
study_scarlet zh-Hans suspicious lang_detected=zh-cn, lang_ok=True, length_ok=False
dorian_gray zh-Hans suspicious lang_detected=zh-cn, lang_ok=True, length_ok=False
study_scarlet es ok lang_detected=es, lang_ok=True, length_ok=True

@hydropix
hydropix marked this pull request as ready for review May 9, 2026 21:54
@hydropix
hydropix merged commit 62aeeb3 into main May 9, 2026
1 check passed
@hydropix
hydropix deleted the benchmark-v2 branch May 9, 2026 21:55
losskot pushed a commit to losskot/TranslateBooksWithLLMs that referenced this pull request Jul 10, 2026
…opix#162)

* feat(benchmark): v2 — schema-first, multi-source, rubric-based judging

Complete rework of the benchmark system:

Data layout
- Split monolithic languages.yaml / reference_texts.yaml into per-entry YAMLs
  under benchmark/data/{languages,reference_texts/<lang>}/
- 17 reference texts across 6 source languages (en, fr, de, es, ja, ko, zh-Hans)
- 45 target languages (added en for back-translation pairs)
- New benchmark/data/submissions/ for community contributions

Schemas
- JSON Schema files for submission, language, reference_text, model
- Strict validation enforced both locally (CLI) and in CI

CLI
- New --pairs flag (source:target) replacing en-source-only --languages
- New --no-evaluate flag to skip auto-judge for manual evaluation
- Poe added as a translation provider
- New cmd_submit and cmd_aggregate_submissions

Manual evaluation pipeline
- scripts/dump_for_evaluation.py — dumps a brief for a human/LLM judge
- scripts/apply_evaluations.py — patches a run with externally-produced scores
- scripts/submission_to_run.py — reconstruct a runnable JSON from a submission
  for re-evaluation with a stronger judge later

Aggregation + wiki
- benchmark/aggregator.py merges multiple submissions on (model, text, lang)
  via median; surfaces n_obs and verified/self-reported badges
- Wiki templates updated to display Obs and Verified columns

GitHub Actions
- validate-submission.yml — runs schema validation + replay sampling on PRs
  touching benchmark/data/submissions/
- publish-wiki.yml — regenerates and pushes the wiki on merge to main

Documentation
- docs/JUDGE_RUBRIC.md — formal scoring rubric (v1) with anchored 1-10 scale,
  penalty table, hard ceilings, and dispersion rule for cross-model judging
- docs/BENCHMARK_WORKFLOW.md — end-to-end procedure for maintainers
- docs/CONTRIBUTING_BENCHMARK.md — contributor guide

Notes
- Wiki workflow gated on push to main; nothing fires from this feature branch
- benchmark_results/ now gitignored (local artefacts only)
- .claude/ commands stay local; users opt-in via gitignore exception

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(benchmark): wiki archive path for v1 -> v2 transition

scripts/archive_v1_wiki.py
  One-shot script that clones the wiki, renames every existing page with the
  `Archive-` prefix, rewrites internal cross-page links to keep the archived
  content browsable on its own, generates `Archive-Index.md`, then commits
  and pushes. Supports --dry-run, --no-push, --message, --wiki-url.

home.md.j2
  Top-of-home banner: "Methodology v2 — judge: Claude Opus 4.7 ... Previous
  benchmark archived under Archive-Index". Browse section includes a link to
  Archive-Index.

docs/BENCHMARK_WORKFLOW.md
  New section "Switching the live wiki from v1 to v2" documenting the archive
  procedure (dry-run, push, cleanup behaviour). Confirms the publish-wiki
  workflow's cleanup globs leave Archive-* pages untouched.

.gitignore
  /benchmark_results/ and .wiki_repo_archive/ excluded.

Smoke-tested against the live wiki: 49 v1 pages would be archived
(1 Home, 2 cross-cutting tables, 1 Benchmark-System, 19 Language-*, 26 Model-*).
Link rewriter preserves external URLs and rewrites only page-name targets
that match an archived page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* submit(benchmark): gemma3:27b on the 8 canonical pairs (judge: claude-opus-4-7-rubric-v1)

45 translations evaluated:
- en→{zh-Hans, es, fr, vi}: 10 each
- ja→en, ko→en, ja→zh-Hans: 1 each
- zh-Hans→en: 2

Per-pair averages (overall, rubric v1):
  ja→en       9.00 (excellent: kokoro)
  zh-Hans→en  8.25 (lu_xun, hu_shi)
  en→es       7.80
  en→fr       7.70
  en→vi       7.70
  ja→zh-Hans  7.50
  en→zh-Hans  7.40 (recurring untranslated-Latin / mixed-script issues)
  ko→en       6.50 (Jongno hallucination on unsu_jouen_nal)

Global average: 7.67. Distribution well spread across 6.0-8.5 thanks to the
formal rubric (start at 10, deduct per detected issue, hard cap 9.0 without
human reference).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: hydropix <5154373+hydropix@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.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