A 1.2 MB pure-Rust rewrite of headless Blender built for AI agents — 3D B-rep modeling engine, CLI, and MCP server
[!NOTE] Archived benchmark snapshot (v0.1 dialect ablation study). Token counts and specs reflect the v0.1 ablation experiment; for current
Forma-Pipeand MCP specs, see docs/reference/language-and-formats.md and docs/reference/apis.md.
Phase 2.4 — Empirical Command Language Ablation & Pareto Frontier Report
1. Hypothesis Tested
Does inventing a compressed, out-of-distribution (OOD) positional DSL (Forma-DSL / compact, formal EBNF) beat an in-distribution declarative/pipeline notation (Forma-Pipe) and stock Blender bpy on total end-to-end tokens to a valid mesh (system prompt + tool schema + outputs + compact feedback + error-recovery turns) across 4 distinct LLM families with zero fine-tuning?
Candidates Evaluated
- Baseline (
bpy): Stock headless Blender 5.3.0 (--background --factory-startup), system prompt = 115o200ktokens. - Candidate A (
Forma-Pipe): In-distribution declarative pipeline (name = prim(...) | op(...), bare semantic selectors, functional call fallback, last-assigned-part auto-export), zero-shot spec = 450o200ktokens (full prompt = 483 tokens). - Candidate B (
Forma-DSL/compact): Compact EBNF line-oriented positional DSL (new f box 4 2 .4/sub f cyl .5 1 @ ...), zero-shot spec = 405o200ktokens (full prompt = 438 tokens).
2. Iterative Refinement Guided by Raw Transcripts (Pipe v1 → Pipe v2)
An initial 48-trial run of Forma-Pipe v1 (bench/results/ablation_pipe_v1.json) revealed three exact, empirical OOD friction points:
- Quoted vs. bare selectors: Opus 5.5 (4/4 fails) and Astra 6.2 (3/3 fails) naturally wrote
bevel(top_rim, 0.1)without quotes. Accepting bare selector identifiers immediately lifted Opus 5.5 from8/12→12/12Pass@1. - Leaked intermediate variables & functional call preference:
tencent/hy4-flashnaturally wroteplate = cut(plate, cyl(...))and bound temporary cutter variables (slot = ...). Exporting the last-assigned part by default and supporting prefix functional calls alongside|liftedhy4-flashPass@3 from5/12→11/12(Mean IoU0.415→0.959). - High-segment BSP blowup: Astra 6.2 passed
segs=96..128on booleans. Clamping primitive tessellation to<= 48cut median latency from 40 ms to 24 ms with zero geometric loss.
3. Complete 144-Trial Head-to-Head Results (4 Model Families × 12 Tasks × 3 Conditions)
3.1 Aggregate Across All 4 Model Families (N = 48 trials per condition)
| Condition | Pass@1 | Pass@3 | Total API Tok (All 48) | Completion Tok (All 48) | Med Code Tok (o200k, Pass) |
Mean IoU (All 48) | Median Engine Latency |
|---|---|---|---|---|---|---|---|
Baseline: Blender 5.3 (bpy) |
33/48 (68.8%) | 41/48 (85.4%) | 165,523 (mean 3,448) | 94,085 (mean 1,960) | 644 | 0.8421 | 1,306.8 ms |
Candidate A: Forma-Pipe |
39/48 (81.2%) | 47/48 (97.9%) | 66,724 (mean 1,390) | 19,393 (mean 404) | 115 | 0.9814 | 25.9 ms |
Candidate B: Forma-DSL |
35/48 (72.9%) | 46/48 (95.8%) | 71,677 (mean 1,493) | 22,344 (mean 466) | 88 | 0.9643 | 23.6 ms |
3.2 Per-Model Breakdown (bpy → Forma-Pipe vs Forma-DSL)
| Model Family | Condition | Pass@1 | Pass@3 | Total API Tok (Sum / Mean Pass) | Completion Tok Sum (bpy/cand) |
Med Code Tok | Mean IoU | Med Latency |
|---|---|---|---|---|---|---|---|---|
anthropic/claude-opus-5.5 |
bpy |
10/12 | 12/12 | 22,921 / 1,910 | 14,324 (1.0×) | 505 | 0.986 | 2,263.0 ms |
Forma-Pipe |
12/12 | 12/12 | 12,643 / 1,054 | 1,605 (8.92×) | 104 | 0.990 | 22.2 ms | |
Forma-DSL |
10/12 | 12/12 | 14,606 / 1,217 | 1,852 (7.73×) | 90 | 0.992 | 28.7 ms | |
google/gemini-4-neon |
bpy |
10/12 | 12/12 | 42,539 / 3,545 | 32,785 (1.0×) | 762 | 0.985 | 1,110.6 ms |
Forma-Pipe |
11/12 | 12/12 | 23,382 / 1,948 | 13,360 (2.45×) | 128 | 0.987 | 22.0 ms | |
Forma-DSL |
10/12 | 12/12 | 25,489 / 2,124 | 15,826 (2.07×) | 87 | 0.987 | 23.6 ms | |
openai/gpt-6.2-astra |
bpy |
10/12 | 12/12 | 15,038 / 1,253 | 9,041 (1.0×) | 506 | 0.984 | 1,273.2 ms |
Forma-Pipe |
10/12 | 12/12 | 11,538 / 962 | 1,654 (5.47×) | 115 | 0.989 | 24.0 ms | |
Forma-DSL |
10/12 | 12/12 | 9,996 / 833 | 1,238 (7.30×) | 87 | 0.991 | 21.8 ms | |
tencent/hy4-flash |
bpy |
3/12 | 5/12 | 85,025 / 2,692 | 37,935 (1.0×) | 1,139 | 0.413 | 1,028.6 ms |
Forma-Pipe |
6/12 | 11/12 | 19,161 / 1,422 | 2,774 (13.68×) | 151 | 0.959 | 39.8 ms | |
Forma-DSL |
5/12 | 10/12 | 21,586 / 1,508 | 3,428 (11.07×) | 204 | 0.887 | 23.7 ms |
4. Pareto Frontier Verdict: Ship Forma-Pipe
The empirical data directly confirms the compression–entropy (OOD) trade-off:
- Although
Forma-DSLproduces 23% shorter single-turn scripts (88 vs. 115 median code tokens), its out-of-distribution positional syntax causes lower Pass@1 (35/48vs.39/48), lower Pass@3 (46/48vs.47/48), lower Mean IoU (0.9643vs.0.9814), and higher total end-to-end tokens on 3 of 4 model families (Opus 5.5, Neon 4, Hy4 flash) due to extra repair turns. Forma-Pipestrictly dominates on the Pareto frontier:- 2.48× reduction in total uncached API tokens across all 48 trials (
165,523 → 66,724) - 4.85× reduction in completion/generation tokens (
94,085 → 19,393; up to 8.92× on Opus 5.5 and 13.68× on Hy4 flash) - 5.60× reduction in median generated code tokens (
644 → 115) - +12.5 pp Pass@1 (
68.8% → 81.2%) and +12.5 pp Pass@3 (85.4% → 97.9%) - 50.4× lower median engine latency (
1,306.8 ms → 25.9 ms)
- 2.48× reduction in total uncached API tokens across all 48 trials (
Accordingly, forma-mcp ships Forma-Pipe exclusively as its canonical interface (total MCP tools/list schema = 722 o200k tokens, well below the 800-token cap).