@blackwell-systems/gcf 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  TypeScript implementation of [GCF (Graph Compact Format)](https://gcformat.com/) — the most token-efficient wire format for LLMs. A drop-in alternative to JSON and TOON for any structured data.
10
10
 
11
- **79% fewer input tokens than JSON. 75% fewer output tokens. 52% smaller than TOON. 100% LLM comprehension at 500 symbols, where JSON fails at 66.7%.**
11
+ **79% fewer input tokens than JSON. 75% fewer output tokens. 52% smaller than TOON. 100% LLM comprehension at 500 symbols, where JSON scores 76.9% and TOON scores 92.3%.**
12
12
 
13
13
  Docs: [gcformat.com](https://gcformat.com/) · [Playground](https://gcformat.com/playground.html) · [GCF vs TOON](https://gcformat.com/guide/vs-toon.html)
14
14
 
@@ -169,15 +169,17 @@ Works on objects, arrays, and primitives. Arrays of uniform objects get tabular
169
169
 
170
170
  ## Comprehension Eval
171
171
 
172
- A rigorous 3-way benchmark (GCF vs TOON vs JSON) at 500 symbols, 200 edges. Six structured extraction questions sent to an LLM:
172
+ Rigorous 3-way benchmark (GCF vs TOON vs JSON) at 500 symbols, 200 edges. 13 structured extraction questions sent to an LLM with zero format instructions:
173
173
 
174
174
  | Format | Accuracy | Tokens | vs JSON |
175
175
  |--------|----------|--------|---------|
176
- | **GCF** | **100%** (6/6) | **11,090** | **79% fewer** |
177
- | TOON | 100% (6/6) | 16,378 | 69% fewer |
178
- | JSON | 66.7% (4/6) | 53,341 | baseline |
176
+ | **GCF** | **100%** (13/13) | **11,090** | **79% fewer** |
177
+ | TOON | 92.3% (12/13) | 16,378 | 69% fewer |
178
+ | JSON | 76.9% (10/13) | 53,341 | baseline |
179
179
 
180
- JSON failed on counting tasks. GCF and TOON both achieved perfect accuracy. GCF does it in 32% fewer tokens.
180
+ GCF is the only format with perfect accuracy at scale, at 32% fewer tokens than TOON.
181
+
182
+ Reproduce: `git clone https://github.com/blackwell-systems/gcf-go && cd gcf-go/eval && GOWORK=off go test -run TestComprehension -v -timeout 0`
181
183
 
182
184
  ## Token Efficiency (TOON's Own Benchmark)
183
185
 
@@ -185,13 +187,13 @@ Running [TOON's benchmark harness](https://github.com/blackwell-systems/toon/tre
185
187
 
186
188
  | Track | GCF | TOON | Result |
187
189
  |-------|-----|------|--------|
188
- | Mixed-structure (nested, semi-uniform) | 169,554 | 227,896 | **GCF 34% smaller** |
189
- | Flat-only (tabular) | 66,026 | 67,837 | **GCF 3% smaller** |
190
- | Semi-uniform event logs | 107,269 | 154,032 | **GCF 44% smaller** |
190
+ | Mixed-structure (nested, semi-uniform) | 170,367 | 227,896 | **GCF 34% smaller** |
191
+ | Flat-only (tabular) | 66,029 | 67,837 | **GCF 3% smaller** |
192
+ | Semi-uniform event logs | 108,158 | 154,032 | **GCF 42% smaller** |
191
193
 
192
- GCF wins on every dataset except deeply nested config (75 tokens on a 618-token payload). On semi-uniform data, GCF uses 44% fewer tokens than TOON.
194
+ GCF wins all 6 datasets. On semi-uniform data (the most common real-world pattern), GCF uses 42% fewer tokens than TOON.
193
195
 
194
- Reproducible: [blackwell-systems/toon@gcf-comparison](https://github.com/blackwell-systems/toon/tree/gcf-comparison)
196
+ Reproduce: `git clone https://github.com/blackwell-systems/toon && cd toon && git checkout gcf-comparison && cd benchmarks && pnpm install && pnpm benchmark:tokens`
195
197
 
196
198
  ## Links
197
199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blackwell-systems/gcf",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "TypeScript implementation of GCF (Graph Compact Format) - token-optimized wire format for LLM tool responses",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",