mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 15:24:10 +08:00
test: update retrieval accuracy benchmarks
This commit is contained in:
79
README.md
79
README.md
@@ -55,7 +55,7 @@ users[2]{id,name,role}:
|
||||
🛒 E-commerce Order ███████████████░░░░░░░░░░ 203 tokens (JSON: 338) 💰 39.9% saved
|
||||
```
|
||||
|
||||
**Total:** 15,172 tokens (TOON) vs 29,096 tokens (JSON) → 47.9% savings
|
||||
**Total:** 15,172 tokens (TOON) vs 29,096 tokens (JSON) → **47.9% savings**
|
||||
|
||||
<details>
|
||||
<summary><strong>View detailed examples</strong></summary>
|
||||
@@ -200,19 +200,22 @@ metrics[5]{date,views,clicks,conversions,revenue}:
|
||||
Tested across **2 LLMs** with data retrieval tasks:
|
||||
|
||||
```
|
||||
gpt-4o-mini ██████████████░░░░░░ 72.3% accuracy
|
||||
claude-haiku-4-5 ███████████████░░░░░ 76.7% accuracy
|
||||
gpt-5-nano
|
||||
toon ███████████████████░ 97.5% (155/159)
|
||||
markdown-kv ███████████████████░ 95.6% (152/159)
|
||||
yaml ███████████████████░ 94.3% (150/159)
|
||||
json ███████████████████░ 93.7% (149/159)
|
||||
csv ███████████████████░ 93.7% (149/159)
|
||||
|
||||
claude-haiku-4-5
|
||||
markdown-kv ███████████████░░░░░ 76.7% (122/159)
|
||||
toon ███████████████░░░░░ 75.5% (120/159)
|
||||
json ███████████████░░░░░ 75.5% (120/159)
|
||||
csv ███████████████░░░░░ 75.5% (120/159)
|
||||
yaml ███████████████░░░░░ 74.8% (119/159)
|
||||
```
|
||||
|
||||
**TOON achieves 73.9% accuracy (vs JSON's 73.6%) while using 46.3% fewer tokens.**
|
||||
|
||||
| Format | Accuracy | Average Tokens |
|
||||
| ------ | -------- | -------------- |
|
||||
| `toon` | 73.9% | 4.678 |
|
||||
| `json` | 73.6% | 8.713 |
|
||||
| `markdown-kv` | 73.6% | 8.649 |
|
||||
| `csv` | 72.3% | 4.745 |
|
||||
| `yaml` | 71.7% | 7.091 |
|
||||
**Tradeoff:** TOON achieves 86.5% accuracy (vs JSON's 84.6%) while using 46.3% fewer tokens.
|
||||
|
||||
<details>
|
||||
<summary><strong>View detailed breakdown by dataset and model</strong></summary>
|
||||
@@ -223,53 +226,53 @@ claude-haiku-4-5 ███████████████░░░░
|
||||
|
||||
| Format | Accuracy | Tokens | Correct/Total |
|
||||
|--------|----------|--------|---------------|
|
||||
| `toon` | 72.4% | 2.483 | 84/116 |
|
||||
| `csv` | 69.0% | 2.337 | 80/116 |
|
||||
| `yaml` | 68.1% | 4.969 | 79/116 |
|
||||
| `markdown-kv` | 68.1% | 6.270 | 79/116 |
|
||||
| `json` | 68.1% | 6.347 | 79/116 |
|
||||
| `toon` | 86.2% | 2.483 | 100/116 |
|
||||
| `csv` | 80.2% | 2.337 | 93/116 |
|
||||
| `yaml` | 82.8% | 4.969 | 96/116 |
|
||||
| `markdown-kv` | 84.5% | 6.270 | 98/116 |
|
||||
| `json` | 84.5% | 6.347 | 98/116 |
|
||||
|
||||
##### E-commerce orders with nested structures
|
||||
|
||||
| Format | Accuracy | Tokens | Correct/Total |
|
||||
|--------|----------|--------|---------------|
|
||||
| `toon` | 84.1% | 5.967 | 74/88 |
|
||||
| `csv` | 83.0% | 6.735 | 73/88 |
|
||||
| `yaml` | 81.8% | 7.328 | 72/88 |
|
||||
| `markdown-kv` | 86.4% | 9.110 | 76/88 |
|
||||
| `json` | 84.1% | 9.694 | 74/88 |
|
||||
| `toon` | 90.9% | 5.967 | 80/88 |
|
||||
| `csv` | 90.9% | 6.735 | 80/88 |
|
||||
| `yaml` | 89.8% | 7.328 | 79/88 |
|
||||
| `markdown-kv` | 90.9% | 9.110 | 80/88 |
|
||||
| `json` | 89.8% | 9.694 | 79/88 |
|
||||
|
||||
##### Time-series analytics data
|
||||
|
||||
| Format | Accuracy | Tokens | Correct/Total |
|
||||
|--------|----------|--------|---------------|
|
||||
| `csv` | 72.4% | 1.393 | 42/58 |
|
||||
| `toon` | 70.7% | 1.515 | 41/58 |
|
||||
| `yaml` | 72.4% | 2.938 | 42/58 |
|
||||
| `json` | 74.1% | 3.665 | 43/58 |
|
||||
| `markdown-kv` | 70.7% | 3.779 | 41/58 |
|
||||
| `csv` | 87.9% | 1.393 | 51/58 |
|
||||
| `toon` | 86.2% | 1.515 | 50/58 |
|
||||
| `yaml` | 86.2% | 2.938 | 50/58 |
|
||||
| `json` | 87.9% | 3.665 | 51/58 |
|
||||
| `markdown-kv` | 86.2% | 3.779 | 50/58 |
|
||||
|
||||
##### Popular GitHub repositories
|
||||
|
||||
| Format | Accuracy | Tokens | Correct/Total |
|
||||
|--------|----------|--------|---------------|
|
||||
| `toon` | 64.3% | 8.745 | 36/56 |
|
||||
| `csv` | 62.5% | 8.513 | 35/56 |
|
||||
| `json` | 67.9% | 15.145 | 38/56 |
|
||||
| `markdown-kv` | 67.9% | 15.436 | 38/56 |
|
||||
| `yaml` | 62.5% | 13.129 | 35/56 |
|
||||
| `csv` | 80.4% | 8.513 | 45/56 |
|
||||
| `toon` | 80.4% | 8.745 | 45/56 |
|
||||
| `yaml` | 78.6% | 13.129 | 44/56 |
|
||||
| `markdown-kv` | 82.1% | 15.436 | 46/56 |
|
||||
| `json` | 73.2% | 15.145 | 41/56 |
|
||||
|
||||
#### Performance by Model
|
||||
|
||||
##### gpt-4o-mini
|
||||
##### gpt-5-nano
|
||||
|
||||
| Format | Accuracy | Correct/Total |
|
||||
|--------|----------|---------------|
|
||||
| `toon` | 72.3% | 115/159 |
|
||||
| `json` | 71.7% | 114/159 |
|
||||
| `markdown-kv` | 70.4% | 112/159 |
|
||||
| `csv` | 69.2% | 110/159 |
|
||||
| `yaml` | 68.6% | 109/159 |
|
||||
| `toon` | 97.5% | 155/159 |
|
||||
| `markdown-kv` | 95.6% | 152/159 |
|
||||
| `yaml` | 94.3% | 150/159 |
|
||||
| `json` | 93.7% | 149/159 |
|
||||
| `csv` | 93.7% | 149/159 |
|
||||
|
||||
##### claude-haiku-4-5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user