Skip to content

ml: rule 8 takes "now" by sense and keeps "In essence" / "In practice" English (measured; rule-12 edit withdrawn) - #404

Merged
mmcky merged 7 commits into
mainfrom
ml/held-rule-edits
Oct 21, 2026
Merged

mmcky merged 7 commits into
mainfrom
ml/held-rule-edits

Conversation

@mmcky

@mmcky mmcky commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Measured: rule 8 passes; the rule-12 edit this PR first carried failed and is withdrawn. The arm is in this PR at experiments/ml-benchmark/arms/2026-10-21-held-rule-edits/, and the verdict is in .qe/dev/log/2026-10-21-ml-held-rule-edits-handover.md.

What it changes: rule 8 of the ml rules, in src/language-config.ts.

The measurement. Raw drafts against a same-day control at 888cdb7 (main), with claude-sonnet-5 and the English at b0c58ab.

Measure Control Rule 8 p (one-sided)
"next" → ഇനി, pandas, per draft (of 3) 1.58 2.17 0.016
"at this moment" → ഇപ്പോൾ, held-out numpy, per draft (of 2) 0.50 0.92 0.036
In essence / In practice kept English, pandas site-draws 0/24 14/24 4e-6
functions bare-endings mode, 48 v 48 28/48 32/48 0.26 (not worse)
functions parity refusals (attempts) 1/49 1/49 0.75 (not worse)

On functions, the first 24-draw round put the bare-endings mode on the 25-point flag line (p = 0.071). A second round, pre-registered before drawing, reversed it, and the pooled 48 v 48 result is in the table.

Withdrawn: the rule-12 edit for QuantEcon/lecture-python-programming.ml#57 Q1 (short label bullets and a short label-like lead-in stay English).

  • It reached its target only on pandas, whose bullets its examples quote.
  • On its own it raised parity refusals on functions (the {raw} head directive dropped) from 1/49 to 7/31 attempts (p = 0.005), and the bare-endings mode from 28/48 to 20/24 (p = 0.03).
  • It also left the pandas axis bullets under the lead-in in English in 12/12 drafts; the editor translated them.
  • Rule 12 is back to main's text, and a test pins it there. The ruling stays in code (ml_repair.py repair 6, ml: the editor's ml#57 answers — short label bullets stay English; commas on case-marked -ഉം pairs #403).
  • The prompt edit waits on the editor's answer about lists that complete their lead-in's sentence.

Design note. At 12 draws on pandas and numpy alone, as first planned, the bundle showed no regression; every regression showed on functions. That lecture at ≥ 24 draws per arm is now the standard regression lecture for ml prompt edits.

Jest passes 1639/1639, lint and format are clean, and dist-action/ is rebuilt. Not released: after the merge, the release procedure follows (the gate on the tag, step 4b, the @v0 smoke).

🤖 Generated with Claude Code

mmcky and others added 2 commits October 21, 2026 10:57
…sense — held for measurement

Rule 12 (lecture-python-programming.ml#57 Q1): a short label bullet and a
short label-like lead-in stay English byte for byte, and the review judge
is told not to call them under-translation; "make a bare noun-phrase
bullet a sentence" is limited to longer, descriptive bullets. Rule 8:
"now" meaning "next" takes ഇനി mid-sentence too (ml#25 answer 3), and
"In essence," / "In practice," join the formulas that stay English.

Not for release until the 12-draw arm in
.qe/dev/log/2026-10-21-ml-held-rule-edits-handover.md passes.
dist-action rebuilt; Jest 1635/1635, lint clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmcky
mmcky force-pushed the ml/held-rule-edits branch from db79953 to fa25d19 Compare October 20, 2026 23:57
mmcky and others added 4 commits October 21, 2026 11:25
… before drawing

Review of #404 before the draws:

- Rule 8: "now" meaning "next" *or "at this point"* went to ഇനി. "At this
  point" also reads as "at this moment", which is how the editor kept English
  pandas 487 (ml 492, ഇപ്പോൾ), one of the arm's own negatives. The rule now
  uses the two senses he confirmed on lecture-python-programming.ml#25 Q3:
  "next, let's move on" (ഇനി) and "at this moment" (ഇപ്പോൾ).
- language-config.test.ts pins the rule-12 and rule-8 edits, as every ml
  rule PR since #297 has.
- Handover design: functions added at 24 draws per arm (the bare-endings
  panel had ~42% power against the round-4 effect at 12 v 12) and as the
  held-out label list (270-271; numpy has none and rule 12 quotes pandas');
  control pinned to 888cdb7; the lead-in counts as kept with or without its
  colon; per-item table for pandas 57-58; a regression ablates rule 12
  against rule 8 before any rewording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… after its arm

The 2026-10-21 arm (experiments/ml-benchmark/arms/2026-10-21-held-rule-edits/):

- Rule 8 (now by sense; In essence / In practice kept English) moves its
  targets — pandas "next" -> ഇനി p = 0.016, held-out numpy "at this
  moment" -> ഇപ്പോൾ p = 0.036 — and at 48 v 48 on functions neither the
  bare-endings mode (28/48 -> 32/48, p = 0.26) nor refusals (1/49 v 1/49)
  worsen.
- Rule 12's lecture-python-programming.ml#57 Q1 edit reached its target only
  on pandas, which its examples quote, and on its own raised parity
  refusals on functions (1/49 -> 7/31, p = 0.005) and the bare-endings
  mode. It is reverted to main's text; the ruling stays in code
  (ml_repair.py repair 6) and waits on the editor's answer about lists that
  complete their lead-in's sentence.

Test, CHANGELOG, STATE and the handover's verdict follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rule 8 flagged

96 raw drafts (pandas 12, numpy 12, functions 24 per arm), control 888cdb7
against candidate b5c1f10, plus a rule-12 / rule-8 ablation on functions
(24 per arm), all 2026-10-21, claude-sonnet-5, English at b0c58ab.

- Rule 12 hits its target only where its examples quote the lecture
  (pandas list 0/12 -> 12/12) and alone reproduces the functions regression:
  parity refusals 0/24 -> 7/31 attempts, bare-endings mode 11/24 -> 20/24,
  and bullets left English that the editor translated.
- Rule 8 moves its targets (pandas "next" p = 0.016, numpy "at this moment"
  p = 0.036) with no refusals; its bare-endings mode on functions is
  11/24 -> 17/24 (p = 0.071), on the 25-point flag line.
- At 12 draws on pandas and numpy alone, the panel shows no regression.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ered); rule 8 passes

Round 1 left rule 8 on the 25-point flag line for the bare-endings mode on
functions (11/24 -> 17/24, p = 0.071). A second round of 24 drafts each for
control and rule 8 alone, with its decision rule fixed before drawing,
reversed (17/24 -> 15/24); pooled 48 v 48 the mode is 28/48 -> 32/48
(p = 0.26) and refusals 1/49 v 1/49. Rule 8 ships alone; against the
pooled control, rule 12 alone stays worse (refusals 1/49 -> 7/31,
p = 0.005; mode 28/48 -> 20/24, p = 0.029).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmcky mmcky changed the title ml: rule 12 keeps short label bullets English; rule 8 takes "now" by sense (held for a 12-draw arm) ml: rule 8 takes "now" by sense and keeps "In essence" / "In practice" English (measured; rule-12 edit withdrawn) Oct 21, 2026
…ers log

The CHANGELOG and STATE cite D-2026-10-21-ml-short-label-bullets-stay-english,
but no record carried the ID. The log that encodes the ruling now does, with
the prompt edit's withdrawal (this PR's arm) and the unruled case: lists that
complete their lead-in's sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmcky

mmcky commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Measured on 2026-10-21: rule 8 passes, and the rule-12 edit is withdrawn.

Design. It was revised before any draw (b5c1f10):

Draws. 193 raw drafts with claude-sonnet-5, all against English at b0c58ab:

Run Drafts
Main arm (pandas, numpy, functions) 96
Rule-12 / rule-8 ablation on functions 48 (+1 refill)
Rule 8's second functions round, pre-registered before drawing 48

The arm is experiments/ml-benchmark/arms/2026-10-21-held-rule-edits/ in this PR.

functions Control Rule 12 only Rule 8 only
Parity refusals ({raw} head dropped), attempts 1/49 7/31 (p = 0.005) 1/49
Bare-endings mode 28/48 20/24 (p = 0.03) 32/48 (p = 0.26)

Rule 8 moves its targets:

  • "next" → ഇനി on pandas: p = 0.016;
  • "at this moment" → ഇപ്പോൾ on held-out numpy: p = 0.036;
  • In essence / In practice kept on pandas: 0/24 → 14/24.

Its first functions round sat on the 25-point flag line (11/24 → 17/24, p = 0.071). The second round reversed (17/24 → 15/24), so the pooled result above does not worsen.

Rule 12 reaches its target only on the pandas list its examples quote (0/12 → 12/12).

  • On its own it causes the functions regression.
  • It leaves the pandas axis bullets under the lead-in in English in 12/12 drafts, though the editor translated them.
  • Withdrawn in fdf83ac: rule 12 is back to main's text, and a test pins it there.
  • The ml#57 ruling stays in code (ml_repair.py repair 6). The prompt edit waits on the editor's answer about lists that complete their lead-in's sentence.

The original design would have passed the bundle: every regression showed on functions, none on pandas or numpy.

@mmcky
mmcky marked this pull request as ready for review October 21, 2026 02:58
Copilot AI balanced review requested due to automatic review settings October 21, 2026 02:58
@mmcky

mmcky commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Marked ready for review. CI passes at 25e181c: Jest 1639/1639, lint, format, .qe references, and dist-action/ up to date.

To review:

  • Rule 8's text in src/language-config.ts. It is the only prompt change against main; the bundle differs only there.
  • The arm's README: its results and reading, in experiments/ml-benchmark/arms/2026-10-21-held-rule-edits/.
  • The verdict in .qe/dev/log/2026-10-21-ml-held-rule-edits-handover.md.
  • The decision-record ID added to .qe/dev/log/2026-10-21-ml57-answers.md. The CHANGELOG and STATE cited it, but no record carried it.

After merging:

Not in this PR: the rule-12 label-bullet edit, and the rule-2 arm.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The sole code change is a one-line, in-place prompt-string edit with matching tests, a dist bundle verified byte-for-byte in sync, correct CHANGELOG/STATE placement, and no future dates or logic changes.

No open issues 🎉

What changed in this PR

This PR applies a single measured edit to rule 8 of the Malayalam (ml) translation prompt in src/language-config.ts: "now" meaning "next, let's move on" now maps to ഇനി mid-sentence as well as sentence-initially (reserving ഇപ്പോൾ for "at this moment" senses), and In essence, / In practice, are added to the sentence-initial discourse formulas that stay in English. It fits the repo's established "measured prompt-tuning" workflow: the change is backed by a committed benchmark arm, and a companion rule-12 edit that was trialled alongside it is explicitly withdrawn because it regressed functions. The bulk of the diff is experiment evidence and documentation, not code.

Changes:

  • Edit ml rule 8 for now-by-sense and keep In essence,/In practice, English; rebuild the dist-action/ bundle in sync.
  • Add Jest tests pinning the new rule-8 wording and asserting rule 12 (the withdrawn edit) is unchanged.
  • Add the benchmark arm (2026-10-21-held-rule-edits) plus CHANGELOG, STATE, and dev-log updates recording the verdict.
File Description
src/​language-config.ts Rewords ml rule 8; adds a round-5 comment block explaining the measured edit and the withdrawn rule-12 change.
dist-action/​index.js Rebuilt action bundle; rule-8 string verified byte-for-byte identical to source.
src/​__tests__/​language-config.test.ts New describe block pinning rule-8 wording, rule-12 immutability, and the 28-rule count.
CHANGELOG.md Adds an ### Changed entry under [Unreleased] for the rule-8 edit and the withdrawal.
.qe/​dev/​STATE.md Updates the ml-calibration roadmap; freshness marker left unchanged.
.qe/​dev/​log/​2026-10-21-ml-held-rule-edits-handover.md, ...ml57-answers.md Handover/verdict notes and decision-record reference.
experiments/​ml-benchmark/​arms/​2026-10-21-held-rule-edits/​* Benchmark scripts, raw records, summaries, and README documenting the measurement.

Review effort: Balanced

@mmcky
mmcky merged commit 88c132c into main Oct 21, 2026
2 checks passed
@mmcky
mmcky deleted the ml/held-rule-edits branch October 21, 2026 03:15
@mmcky mmcky mentioned this pull request Oct 21, 2026
mmcky added a commit that referenced this pull request Oct 21, 2026
Promote [Unreleased] to [0.29.6] - 2026-10-21: #404 (ml rule 8 takes "now"
by sense and keeps "In essence" / "In practice" English, measured before
merge; the rule-12 edit measured with it was withdrawn) and #403 (the ml#57
answers in ml_metrics / ml_repair, experiment tooling only). Version bumped
in package.json and package-lock.json; STATE.md entry, including Matt's
ruling that round 6 (ml#58) is not re-seeded. No source change;
dist-action/ rebuilds byte-identical.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Oct 21, 2026
§4a passed at v0.29.6 (28/28 verdicts per lane at engineVersion 0.29.6; one
WARN, #375's zh-cn scenario 22, pre-existing); §4b zh-cn 1/12, fa 0/12,
ml 0/12; v0.29 and v0 moved to 4151c08; @v0 smoke PASS on all three lanes;
GitHub release published. STATE's release pointer and the #404 entries say
shipped.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Oct 21, 2026
Brings in v0.29.6 (#404, #405), its close-out log (#406), the Claude 5.5
handover (#402) and the ml round-6 arm (#393).

- CHANGELOG.md: this PR's Added and Fixed entries sit under the empty
  [Unreleased] header that v0.29.6 left. [0.29.6] and everything below it
  are main's, byte for byte.
- dist-action/: rebuilt with npm ci and npm run build, not hand-merged.
  index.js is byte-identical to git's own merge of it; the map is the
  rebuild's. Both are stable on a second build and hold no local paths.

lint, format:check, check-dev-refs (194 references) and npm test
(70 suites, 1,843 tests) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Oct 21, 2026
Brings in v0.29.6 (#404, #405), its close-out log (#406), the Claude 5.5
handover and its decision record (#402) and the ml round-6 arm (#393).

- CHANGELOG.md: this PR's Added, Changed and Fixed entries sit under the
  empty [Unreleased] header that v0.29.6 left. [0.29.6] and everything
  below it are main's, byte for byte.
- dist-action/: rebuilt with npm ci and npm run build, not hand-merged.
  index.js is byte-identical to git's own merge of it; the map is the
  rebuild's. Both are stable on a second build and hold no local paths.
- package.json and the lockfile merged cleanly: version 0.29.6, SDK
  0.131.0.

lint, format:check, check-dev-refs (194 references) and npm test
(70 suites, 1,802 tests) pass.

Co-Authored-By: Claude Opus 5.5 <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.

2 participants