@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.
- package/README.md +13 -11
- 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
|
|
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
|
-
|
|
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%** (
|
|
177
|
-
| TOON |
|
|
178
|
-
| JSON |
|
|
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
|
-
|
|
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) |
|
|
189
|
-
| Flat-only (tabular) | 66,
|
|
190
|
-
| Semi-uniform event logs |
|
|
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
|
|
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
|
-
|
|
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