Problem
Real API payloads (Stripe / Shopify / GitHub / logs) are dominated by columns where 80%+ of rows share the same value — status: "active", currency: "usd", is_deleted: false, null in a hundred optional fields. SOON currently spends full tokens on every cell of every one of those columns.
Proposal
Add an ELIDE column mechanism to table headers. If a column's dominant value covers ≥ threshold of rows, hoist it into the header and emit per-row overrides:
SHAPE orders = {id,status,currency}
orders[100]<orders | status=active,currency=usd>:
(1,,)
(2,,cancelled) # override on second column
(3,,)
...
Semantics:
- Header
| f=v,f=v binds default values, matched by field name.
- An empty positional cell means "use the default".
- Any non-empty cell overrides the default for that row.
null remains explicit (null), distinct from empty.
Column selection is deterministic and cost-driven: compute per-column
saving = repetitions * len(value) - override_syntax_overhead with the token-aware cost function (#1); emit iff net-positive.
Acceptance criteria
Risk / open questions
- Retrieval accuracy: models may miss elided defaults. Ship gated behind an encoder option initially; enable by default only after the accuracy harness passes.
- Interaction with
? optional fields: an optional field can also carry a default — need to define precedence (default applies only when the field is present; _ still means absent).
Problem
Real API payloads (Stripe / Shopify / GitHub / logs) are dominated by columns where 80%+ of rows share the same value —
status: "active",currency: "usd",is_deleted: false,nullin a hundred optional fields. SOON currently spends full tokens on every cell of every one of those columns.Proposal
Add an ELIDE column mechanism to table headers. If a column's dominant value covers ≥ threshold of rows, hoist it into the header and emit per-row overrides:
Semantics:
| f=v,f=vbinds default values, matched by field name.nullremains explicit (null), distinct from empty.Column selection is deterministic and cost-driven: compute per-column
saving = repetitions * len(value) - override_syntax_overheadwith the token-aware cost function (#1); emit iff net-positive.Acceptance criteria
| defaults …header and the empty-cell semantics.null.benchmarks/datasets.py: a sparse API-response shape (many optional nulls, dominant-value fields) — SOON+ELIDE ≥ +15pt over the current v0.1 encoding.Risk / open questions
?optional fields: an optional field can also carry a default — need to define precedence (default applies only when the field is present;_still means absent).