Messy input, small menu, local transformer gate
But many software decisions are much smaller than an LLM.
show me the failed builds from yesterday5 actions x 4 statuses x 4 date buckets
= about 80 structured outputs
if text has "failed" and "build":
action = search_builds
if text has "yesterday":
date = yesterday
Every new phrase becomes another pattern, exception, or bug.
5 actions
x 10 common phrasings
x 4 statuses
x 8 time phrasings
= 1,600-ish rule cases
One prompt can replace a pile of brittle phrase rules.
choosing from a tiny application menu.
| Model | Input | Output |
|---|---|---|
| GPT-4.1 | $2 / 1M tokens | $8 / 1M tokens |
| GPT-4.1 mini | $0.40 / 1M tokens | $1.60 / 1M tokens |
| GPT-4.1 nano | $0.10 / 1M tokens | $0.40 / 1M tokens |
| Fine-tuned model | Training | Runtime input | Runtime output |
|---|---|---|---|
| GPT-4.1 mini | $5 / 1M tokens | $0.80 / 1M | $3.20 / 1M |
| GPT-4.1 nano | $1.50 / 1M tokens | $0.20 / 1M | $0.80 / 1M |
Adapt a small language model to WhetstoneDSL decisions.
AST-first programming and universal transpiling
prereq_op_selectorpicks the prerequisite operations for a taskitem
Keep the output menu fixed.
per transformer gate
one specialist per small gate
Use it to bootstrap examples, not to sit in every runtime decision.
needs_validate_intakewas always true: 1297 / 1297
| Gate | Accuracy | Training |
|---|---|---|
| resolve dependencies | 69.4% | 3-5 min on 3060 |
| architect review | 75.0% | 3-5 min on 3060 |
There were only about 17 unique text templates.
| Approach | Input handling | Runtime | Output control |
|---|---|---|---|
| Regex | manual enumeration | tiny | excellent |
| LLM / SLM + LoRA | easy | base model still runs | needs guardrails |
| Tiny gate transformer | learned | ~800KB specialist | fixed output head |