File size: 14,518 Bytes
18de23f 36fe364 18de23f 36fe364 18de23f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | # Command and real Emacs task benchmarks
LispM measures two different outcomes: whether a request produces the expected
bounded program, and whether executing a proposal reaches a reviewed Emacs goal
state. Keep these outcomes separate. A syntactically valid proposal can be wrong;
a correct proposal can still encounter an execution error.
The final November 28 candidate improves aggregate composition and independent
blind results, but fails several historical nonregression gates. The default
therefore remains `python-reference/`; `semantic-trained/` is opt-in.
## Frozen command benchmark
`data/benchmark.json` keeps all three historical single-action corpora and adds
2,256 ordered pairs: 552 Emacs pairs, 552 LispM pairs and 1,152 cross-domain pairs.
Each pair contains two different supported actions, preserves operation order,
and carries distinct literal arguments when both actions accept strings.
These are deterministic recombinations of already exposed wording. They measure
composition regression, not a new blind natural-language or planning benchmark.
The original `data/evaluation.json` and its published reports remain available
with their original hashes. Reproduce the expanded dataset into a fresh path:
```sh
cargo run --release --locked -- prepare-benchmark \
--data data/evaluation.json --output experiments/benchmark.json
cargo run --release --locked -- evaluate \
--model . --data data/benchmark.json --output experiments/commands-default.json
cargo run --release --locked -- evaluate \
--model rust-trained --data data/benchmark.json --output experiments/commands-candidate.json
```
`evaluate` defaults to `data/benchmark.json`. Supported correctness requires the
entire rendered program to match: actions, order and literal arguments. Refusals
remain separate from both correct and wrong accepted predictions. Pair cases
declare both action labels; per-action counts include each participating action
and therefore must not be summed to obtain the number of requests.
## Executed Emacs tasks
`data/emacs-tasks.json` binds each instruction to a reviewed scenario, expected
step count and typed oracle actions. `emacs/lispm-llm-benchmark.el` constructs
fresh buffers, windows and temporary files, executes allowed core Emacs actions,
and compares the resulting state with the scenario's goal. It does not evaluate
model-generated Lisp. Unsupported applications and arguments outside the fixture
are blocked before any predicted action executes.
Before scoring proposals, the runner checks every expected oracle program in a
fresh fixture. An invalid fixture aborts the benchmark instead of becoming a
model failure. The model never receives oracle actions or goal predicates.
```sh
cargo run --release --locked -- task-benchmark \
--model . --data data/emacs-tasks.json \
--emacs /absolute/path/to/emacs \
--runner emacs/lispm-llm-benchmark.el \
--timeout-seconds 60 --output experiments/tasks-default.json
```
Run the same command with the candidate model and a new output path. The native
adapter loads each model once and starts a clean `emacs -Q --batch` child. Each
fixture owns its temporary files and buffers. Cancellation or timeout kills and
reaps the child; infrastructure failures abort the report rather than count as
refusals. The interactive user's Emacs session is not the execution environment.
Each completed task has one outcome:
| Outcome | Meaning |
| --- | --- |
| `success` | Execution reached the complete expected goal state |
| `wrong_state` | Execution completed, but the goal state did not match |
| `rejected` | The model refused a supported task |
| `execution_error` | An allowed predicted action raised an Emacs error |
| `blocked_action` | The proposal exceeded the fixture's operation/argument boundary |
Task success rate is `success / total`; refusal is not success. Reports retain
each task's result, completed action count, observed state and a breakdown by
one-step/two-step tasks. Reports bind model weights, configuration, task data,
runner, Emacs executable and Emacs version. Compare identical suites and runtime
identities; do not treat a changed fixture or runtime as a model improvement.
These tasks exercise real core Emacs behavior. They do not measure installed
LispM application behavior, external services, three-or-more-step planning,
conditions, loops or dynamic recovery. Those remain separate future benchmark
and capability requirements.
## November 28 final candidate
Both models use probability **0.8** and margin **0.0**. For supported requests,
the following triples are **correct / wrong accepted / refused**. Unsupported
acceptance is always an error. Exact-match rate is `correct / total`, supported
refusal rate is `refused / total`, and false-acceptance rate is
`accepted unsupported / unsupported total`.
| Frozen cohort | Retained default | Final `semantic-trained/` |
| --- | ---: | ---: |
| All ordered two-action programs (2,256) | 2,028 / 19 / 209 | 2,071 / 8 / 177 |
| Existing robustness supported (286) | 266 / 6 / 14 | 271 / 6 / 9 |
| Existing robustness unsupported accepts (126) | 11 | 6 |
| Historical LispM supported (182) | 176 / 0 / 6 | 175 / 0 / 7 |
| LispM-only ordered pairs (552) | 519 / 0 / 33 | 514 / 0 / 38 |
| Historical Emacs unsupported accepts (56) | 0 | 1 |
| Existing duplicate-tab family false accepts (24) | 3 | 4 |
| Real Emacs goals reached (30) | 30 | 30 |
The larger aggregate gains came with fewer supported refusals, without increasing
the confidence thresholds. They still do not establish uniform improvement:
the LispM subsets, historical Emacs unsupported cohort and duplicate-tab family
regressed. In particular, **tab duplication is not solved** by this candidate.
Default promotion checks every supported cohort and novel-word subset for
nondecreasing correct counts and nonincreasing wrong/refused counts. It also
checks unsupported totals and each unsupported family, then task success and
each failure category overall, by step count and by scenario. The separately
frozen blind cohorts must pass too. A better aggregate cannot cancel a failed
subgroup gate. Candidate artifacts and their failures can be published while
the incumbent remains default.
Bound evidence: [default commands](../benchmark-evaluation.json),
[final candidate commands](../semantic-benchmark-evaluation.json),
[default tasks](../emacs-task-evaluation.json) and
[final candidate tasks](../semantic-task-evaluation.json). Both reached all
21 single-step and 9 two-step task goals; this small familiar fixture suite
does not establish long-horizon planning or external LispM application behavior.
## Three recorded training attempts
All runs used seed 42 and two CPU threads. Checkpoints were selected with the
unchanged calibration/reference constraints; the existing regression suites
informed the next training iteration. The independent blind suite was held
back until the final candidate had been selected.
| Artifact | Initialization and training data | Updates / selected step | Two-action correct / wrong / refused | Promotion outcome |
| --- | --- | ---: | ---: | --- |
| `semantic-from-scratch/` | Fresh weights; `semantic-training.json` | 6,400 / 4,700 | 2,078 / 8 / 170 | Failed historical unsupported gates |
| `semantic-warm-start/` | `python-reference/`; same data | 3,200 / 2,300 | 2,061 / 31 / 164 | Increased wrong programs and robustness refusals |
| `semantic-trained/` | `semantic-from-scratch/`; `refined-semantic-training.json` | 1,600 / 400 | 2,071 / 8 / 177 | Failed the historical subgroup gates above |
The first input preserves the original rows and adds 593 examples; the refined
input appends another 235. All 1,182 calibration rows and the selection reference
remain unchanged. The native training reports bind each run to its actual input
and initialization bytes. See the [training guide](rust.md) for rates, durations
and reproduction commands. Expanded reports for the earlier attempts are
[scratch](../semantic-from-scratch-benchmark-evaluation.json) and
[historical-model fine-tuning](../semantic-warm-start-benchmark-evaluation.json).
## Independently authored November 28 audit
The [raw source](../data/nov28-blind-source.json) contains 312 synthetic requests
written by a separate agent from the action contracts. They are **not
human-validated or real-user samples**. Authoring overlapped initial training;
the source was frozen before final checkpoint selection and blind inference. The raw
policy's earlier claim that authoring preceded the training run is explicitly
superseded by the [audit notice](../data/nov28-blind-audit.json).
After the final training input was frozen, native NFKC, parsing and tokenization
excluded 34 requests whose whole request or any constituent clause overlapped
either baseline or final training/calibration data, with literal arguments
masked. Independent semantic review excluded one ambiguous label before any
blind inference. No requests were added or rephrased, and no blind outcome
informed training, thresholds, checkpoint selection or exclusions.
The [final v4 cohort](../data/nov28-blind.json) has 118 supported singles, 71
supported pairs and 88 unsupported requests. Of the unsupported requests, 61
are parseable singles, 17 mix a supported action with an unsupported operation,
and 10 fail the input grammar. Report syntax boundaries separately from semantic
false acceptance; both models rejected all 17 mixtures and all 10 grammar
boundaries in this suite.
| Final blind cohort | Retained default | Final candidate |
| --- | ---: | ---: |
| Supported singles (118), correct / wrong / refused | 107 / 1 / 10 | 114 / 1 / 3 |
| Supported pairs (71), correct / wrong / refused | 54 / 2 / 15 | 62 / 0 / 9 |
| Supported novel-word subset (13), correct / wrong / refused | 10 / 0 / 3 | 11 / 0 / 2 |
| Unsupported accepts (88) | 2 | 1 |
| Parseable unsupported accepts (78) | 2 | 1 |
`novel_to_both` means a parsed instruction token absent from the union of words
in the baseline and refined **training rows**. Calibration and quoted literal
contents are excluded. It does not mean absence from word-embedding IDs: the
warm-start model retains its source vocabulary while learning from new words
through character features. The final suite has 35 novel-word requests overall,
of which 13 are supported: 11 singles and two pairs. The other 22 annotations are
unsupported requests. Supported novel-word correctness rose from 10/13 to 11/13;
the pair subset stayed at 1/2 correct. These small denominators limit conclusions
about novel-word composition.
The [baseline blind report](../blind-baseline-evaluation.json) and
[candidate blind report](../blind-semantic-evaluation.json) bind the same final
data SHA-256, each artifact's weights/configuration hashes and unchanged
thresholds. The audit preserves source/final identities, all three training-data
hashes, the two actual comparison inputs, exclusions and chronology. Task reports
add runner and Emacs runtime identities. No further training followed this audit.
Now that the cases and outcomes are public, reuse measures **regression**;
another adaptation cycle needs a newly reserved independent audit.
## Earlier Rust migration candidate
These measurements use the existing default weights and the separately included
`rust-trained/` candidate. Adding the benchmark did not retrain either model.
The command benchmark was regenerated with Rust and both artifacts were scored
on its exact bytes; historical Python combination reports remain separate.
| Measurement | Default | Rust candidate |
| --- | ---: | ---: |
| Supported robustness correct / wrong / refused (286) | 266 / 6 / 14 | 257 / 4 / 25 |
| Unsupported robustness false accepts (126) | 11 | 10 |
| Two-action exact correct / wrong / refused (2,256) | 2,028 / 19 / 209 | 1,996 / 54 / 206 |
| Real Emacs goals reached (30) | 30 | 30 |
| Single-action task goals (21) | 21 | 21 |
| Two-action task goals (9) | 9 | 9 |
The default's two-action exact-match rate is 89.89%; the Rust candidate's is
88.48%. All task oracles passed on Emacs 31.1 before the model proposals were
scored. Neither model had a refused, wrong-state, blocked or errored task in this
small fixed suite. Familiar fixture wording and a 30-task denominator limit
what this says about new instructions and more complex tasks. A perfect task
score does not compensate for the candidate's command-coverage regressions.
Bound reports: [default commands](../benchmark-evaluation.json),
[Rust candidate commands](../benchmark-rust-training-evaluation.json),
[default execution](../emacs-task-evaluation.json), and
[Rust candidate execution](../emacs-task-rust-training-evaluation.json).
## Every retraining iteration
New Emacs training projects default to the expanded command benchmark and real
task suite. Press **b** to score baseline and candidate on both; **r** shows the
combined durable report. Finalization requires no regression in each command
corpus and in the task comparison, including supported refusals. Missing task
evidence, runner failure or altered frozen inputs cannot pass the task gate.
The project freezes task JSON and the runner, and reserves task instructions and
their clauses against authored-data imports. Native C callers enable this with
the optional `task_suite` object on `project-create`; see the
[workflow contract](training-workflow.md#c-ffi-contract). Omitting it explicitly
creates a command-only project. Emacs exposes the same choice through
`lispm-llm-train-enable-task-benchmark`, which defaults to non-nil.
Existing projects retain their original frozen inputs. To adopt the new suite,
create a new project with the intended baseline and import the old project's
reviewed authored examples. Resolve any overlap with the new benchmark rather
than editing frozen files or their hashes. The dashboard states whether the
real-task gate is configured.
## Keep collecting without contaminating the benchmark
Use failure families to guide fresh real-use observations. Human-label supported
new wording with its actual action, even when the model refused it; collect
successful unfamiliar wording as well as mistakes and unsupported false accepts.
Keep reported test sentences and trivial rewrites out of training. Frozen
benchmarks reused across iterations are regression evidence. A genuinely new
blind evaluation needs independently collected, reserved examples and a new
project. Do not tune thresholds or choose seeds against the final test results.
|