Skip to content

Malayalam (ml) test project: benchmark vs native-speaker reference, calibration with Adisankar, go/no-go #189

Description

@mmcky

Why Malayalam needs its own test project

Malayalam is the hardest target language to date, for a structural reason: the policy is inverted relative to every language we ship. For zh-cn/fa/fr the failure mode is under-translation and the tool's job is to translate everything; for ml (#70, #71) the failure mode is over-translation — the tool must keep all technical terms in English and generate Malayalam only as grammatical connective tissue, attaching case-suffixes and auxiliaries directly to English roots (economy-യിലെ, process ചെയ്ത്). None of our existing evaluation habits, review-judge expectations, or intuitions transfer directly, so ml gets a dedicated test project with detailed assessment rounds with Adisankar (native-speaker reviewer, #70) before we seed a real repo.

Tracking issue for that test project. Prerequisite: #71 (ml config, glossary seed, review-judge policy injection) merges first.#71 merged 2026-07-24 and #70 closed 2026-07-26: Malayalam has shipped in v0.24.0, the policy is recorded as .dev/decisions/D-2026-06-01-malayalam-keep-english-policy.md, and test-translation-sync.ml is a first-class harness language at 26/26 green (#206, #209). So this issue is no longer gated on anything in the engine — it is gated on native-speaker review capacity, which is #207 and now #228.

Assets in hand

  • Strategy doc (Malayalam Translation Strategy: Technical Term Handling, Adisankar) — the policy plus 16 worked examples across economics, finance, statistics, and programming.
  • Reference translation — Adisankar's hand-crafted Malayalam getting_started.md (source: lecture-python-programming). This is our ground truth for style: keep-English density, morphology attachment, heading treatment. Note it contains a few typos ("eentire", "substanial") and some fully-English sentences, so divergences from it are questions for Adisankar, not automatic errors.
  • PR feat: add Malayalam (ml) language support — keep-English-dominant policy #71ml language config (7 rules), 52-term glossary seed (47 keep-English + 5 everyday), review-mode policy injection so the judge knows keep-English is deliberate.

The ml advantage: the policy is deterministically checkable

Because the policy is "keep these exact English strings", much of the assessment can be scripted rather than judged by an LLM — and our experience so far is that deterministic checks beat the LLM judge (#157 lineage). Planned metrics, implemented in experiments/ml-benchmark/scripts/ and candidates for graduating into diff-checks.ts as ml-specific gates later:

Metric Check Target
Pinned-term retention each of the 47 glossary keep-English terms appears in English, never in Malayalam script 100%
Beyond-glossary retention list of ~30 terms the reference keeps English (notebook, cell, kernel, terminal, browser, dashboard, …) stays English 100%
Transliteration detection no Malayalam-script phonetic renderings of English technical terms 0 instances
Heading fidelity every heading identical to the English source 100%
Consistency every repeated term handled the same way (same script, same root) on all occurrences 100%
Morphology pattern hyphenated suffix attachment (X-യിലെ, X-ന്റെ) present and well-formed qualitative
Script ratio Latin vs Malayalam codepoints per paragraph, compared against the reference's band within band

The script-ratio band is the interesting one: too much Malayalam signals over-translation, too much Latin signals the tool lazily leaving prose untranslated — a single metric that catches both failure directions.

Phases

Phase 0 — prerequisites

Phase 1 — re-scoped to the reviewer packet: #228

Re-scoped 2026-07-28. Phase 1 was designed as a two-arm model benchmark that would also produce a report. Both halves were wrong. The benchmark half is n=1 per arm on one file, which #227 puts at ~13% power — the Opus-vs-Sonnet contrast it was meant to settle remains unresolved at p = 0.192 after 26 invocations, so model selection moves to bench/ (#227). The report half is the part that matters, and it is re-scoped from "a report" to one packet that converts what we already have into the smallest set of questions only a native speaker can answer — because Adisankar's availability, not our tooling, is what paces Phases 2–4.

Full plan in #228, which also folds in #207's seed review so he is not asked the same four open #71 questions twice. The old run-book #194 is closed, with a section-by-section disposition recorded there.

  • Stage 1 — divergence inventory: translate getting_started.md once (claude-opus-5, --localize none), score it, fix what the FAIL gates catch, reduce to ~30 ranked adjudications (term treatment → morphology → script-ratio outliers)
  • Stage 2 — content-mix catalog: ~10 passages from the two harness seed documents, covering the content situations the reference contains none of (display-math prose, admonitions, captions, code-cell prose, nested ####)
  • Stage 3 — English-knowns checklist: glossary-review skill over ~5 domain-dense lectures, seed + probe, ranked by whether the two renderings split on keeping a term English
  • Deliver REPORT.md (for us) and PACKET.md (numbered questions only) into experiments/ml-benchmark/dev(ml): the Adisankar review packet — Stages 1-3 of #228 #231, 2026-07-28
  • Get the packet to Adisankar — sent 2026-07-29, as an email attachment rather than GitHub issues. Task-list checkboxes are only editable by users with write access and he is not a collaborator, so the issue-and-checkbox design would have asked him to tick boxes he cannot tick — the failure mode already live on fr#3, 26 boxes never ticked since 2026-07-15. Delivered as experiments/ml-benchmark/malayalam-review-questions.md, 23 answer boxes, with scripts/parse_responses.py to extract the reply

Phase 2 — Adisankar deep assessment (calibration batch)

Phase 1 is complete and closed (#228, delivered by #231 and #233). His reply arrived 2026-08-03 — 23/23 answered (#236) — and everything it decided has shipped: register rules + glossary v0.2.0 (#237, regeneration-verified), the batch translated and delivered, and the review relocated to the real edition lecture-python-programming.ml (PRs 1–5) so his fixes merge into the site (see 2026-08-03 comments). Phase 2 now waits on his PR review comments; the follow-up round (F1–F3, the A5–A7 source sentences) returned 2026-08-06 with all three resolved — A5 a live rule gap queued for v0.3, A6/A7 accepted-as-is (#252).

Phase 3 — review-mode calibration

  • Run review mode (post-feat: add Malayalam (ml) language support — keep-English-dominant policy #71 judge with policy injection) on all Phase 1–2 outputs and score the judge against Adisankar's flags: does it produce false "untranslated content" findings on compliant text, and does it catch seeded over-translations?
  • Adversarial check: hand-inject 5–10 deliberate violations (a translated technical term, a transliterated term, a Malayalam heading) and confirm the judge flags every one as a terminology finding
  • Decide which deterministic metrics graduate into diff-checks.ts as ml gates

Phase 4 — decisions and go/no-go

Success criteria for go

All deterministic metrics at target on the calibration batch, zero unresolved Adisankar flags, the review judge produces no false positives on compliant output and catches all seeded violations, and per-file cost is measured and acceptable (fr ran ~$0.21/file real cost; ml should be the same order).

Risks

Refs #70 (closed), #71. Phase 1 → #228 · model selection → #227 · seed review → #207 · superseded run-book → #194.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions