Skip to content

Benchmarks

The benchmarks on this page measure TOON's performance across two key dimensions:

  • Retrieval Accuracy: How well LLMs understand and extract information from different input formats.
  • Token Efficiency: How many tokens each format requires to represent the same data.

Benchmarks are organized into two tracks to ensure fair comparisons:

  • Mixed-Structure Track: Datasets with nested or semi-uniform structures (TOON vs JSON, YAML, XML). CSV excluded as it cannot properly represent these structures.
  • Flat-Only Track: Datasets with flat tabular structures where CSV is applicable (CSV vs TOON vs JSON, YAML, XML).

Retrieval Accuracy

Benchmarks test LLM comprehension across different input formats using 209 data retrieval questions on 4 models.

Show Dataset Catalog

Dataset Catalog

DatasetRowsStructureCSV SupportEligibility
Uniform employee records100uniform100%
E-commerce orders with nested structures50nested33%
Time-series analytics data60uniform100%
Top 100 GitHub repositories100uniform100%
Semi-uniform event logs75semi-uniform50%
Deeply nested configuration11deep0%
Valid complete dataset (control)20uniform100%
Array truncated: 3 rows removed from end17uniform100%
Extra rows added beyond declared length23uniform100%
Inconsistent field count (missing salary in row 10)20uniform100%
Missing required fields (no email in multiple rows)20uniform100%

Structure classes:

  • uniform: All objects have identical fields with primitive values
  • semi-uniform: Mix of uniform and non-uniform structures
  • nested: Objects with nested structures (nested objects or arrays)
  • deep: Highly nested with minimal tabular eligibility

CSV Support: ✓ (supported), ✗ (not supported – would require lossy flattening)

Eligibility: Percentage of arrays that qualify for TOON's tabular format (uniform objects with primitive values)

Efficiency Ranking (Accuracy per 1K Tokens)

Each format ranked by efficiency (accuracy percentage per 1,000 tokens):

TOON           ████████████████████   27.7 acc%/1K tok  │  76.4% acc  │  2,759 tokens
JSON compact   █████████████████░░░   23.7 acc%/1K tok  │  73.7% acc  │  3,104 tokens
YAML           ██████████████░░░░░░   19.9 acc%/1K tok  │  74.5% acc  │  3,749 tokens
JSON           ████████████░░░░░░░░   16.4 acc%/1K tok  │  75.0% acc  │  4,587 tokens
XML            ██████████░░░░░░░░░░   13.8 acc%/1K tok  │  72.1% acc  │  5,221 tokens

Efficiency score = (Accuracy % ÷ Tokens) × 1,000. Higher is better.

TIP

TOON achieves 76.4% accuracy (vs JSON's 75.0%) while using 39.9% fewer tokens.

Note on CSV: Excluded from ranking as it only supports 109 of 209 questions (flat tabular data only). While CSV is highly token-efficient for simple tabular data, it cannot represent nested structures that other formats handle.

Per-Model Accuracy

Accuracy across 4 LLMs on 209 data retrieval questions:

claude-haiku-4-5-20251001
→ TOON           ████████████░░░░░░░░    59.8% (125/209)
  JSON           ███████████░░░░░░░░░    57.4% (120/209)
  YAML           ███████████░░░░░░░░░    56.0% (117/209)
  XML            ███████████░░░░░░░░░    55.5% (116/209)
  JSON compact   ███████████░░░░░░░░░    55.0% (115/209)
  CSV            ██████████░░░░░░░░░░    50.5% (55/109)

gemini-3-flash-preview
  XML            ████████████████████    98.1% (205/209)
  JSON           ███████████████████░    97.1% (203/209)
  YAML           ███████████████████░    97.1% (203/209)
→ TOON           ███████████████████░    96.7% (202/209)
  JSON compact   ███████████████████░    96.7% (202/209)
  CSV            ███████████████████░    96.3% (105/109)

gpt-5-nano
→ TOON           ██████████████████░░    90.9% (190/209)
  JSON compact   ██████████████████░░    90.9% (190/209)
  JSON           ██████████████████░░    89.0% (186/209)
  CSV            ██████████████████░░    89.0% (97/109)
  YAML           █████████████████░░░    87.1% (182/209)
  XML            ████████████████░░░░    80.9% (169/209)

grok-4-1-fast-non-reasoning
→ TOON           ████████████░░░░░░░░    58.4% (122/209)
  YAML           ████████████░░░░░░░░    57.9% (121/209)
  JSON           ███████████░░░░░░░░░    56.5% (118/209)
  XML            ███████████░░░░░░░░░    54.1% (113/209)
  JSON compact   ██████████░░░░░░░░░░    52.2% (109/209)
  CSV            ██████████░░░░░░░░░░    51.4% (56/109)

TIP

TOON achieves 76.4% accuracy (vs JSON's 75.0%) while using 39.9% fewer tokens on these datasets.

Performance by dataset, model, and question type

Performance by Question Type

Question TypeTOONJSONYAMLJSON compactXMLCSV
Field Retrieval99.6%99.3%98.5%98.5%98.9%100.0%
Aggregation61.9%61.9%59.9%58.3%54.4%50.9%
Filtering56.8%53.1%56.3%55.2%51.6%50.9%
Structure Awareness89.0%87.0%84.0%84.0%81.0%85.9%
Structural Validation70.0%60.0%60.0%55.0%85.0%80.0%

Performance by Dataset

Uniform employee records
FormatAccuracyTokensCorrect/Total
csv73.2%2,334120/164
toon73.2%2,498120/164
json-compact73.8%3,924121/164
yaml73.8%4,959121/164
json-pretty73.8%6,331121/164
xml74.4%7,296122/164
E-commerce orders with nested structures
FormatAccuracyTokensCorrect/Total
toon82.3%7,458135/164
json-compact78.7%7,110129/164
yaml79.9%8,755131/164
json-pretty79.3%11,234130/164
xml77.4%12,649127/164
Time-series analytics data
FormatAccuracyTokensCorrect/Total
csv75.0%1,41190/120
toon78.3%1,55394/120
json-compact74.2%2,35489/120
yaml75.8%2,95491/120
json-pretty75.0%3,68190/120
xml72.5%4,38987/120
Top 100 GitHub repositories
FormatAccuracyTokensCorrect/Total
csv65.9%8,52787/132
toon66.7%8,77988/132
yaml65.2%13,14186/132
json-compact59.8%11,46479/132
json-pretty63.6%15,15784/132
xml56.1%17,10574/132
Semi-uniform event logs
FormatAccuracyTokensCorrect/Total
json-compact68.3%4,83982/120
toon65.0%5,81978/120
json-pretty69.2%6,81783/120
yaml61.7%5,84774/120
xml58.3%7,72970/120
Deeply nested configuration
FormatAccuracyTokensCorrect/Total
json-compact90.5%568105/116
toon94.8%655110/116
yaml93.1%675108/116
json-pretty92.2%924107/116
xml91.4%1,013106/116
Valid complete dataset (control)
FormatAccuracyTokensCorrect/Total
toon100.0%5354/4
json-compact100.0%7874/4
yaml100.0%9924/4
json-pretty100.0%1,2744/4
xml25.0%1,4621/4
csv0.0%4830/4
Array truncated: 3 rows removed from end
FormatAccuracyTokensCorrect/Total
csv100.0%4134/4
xml100.0%1,2434/4
toon0.0%4620/4
json-pretty0.0%1,0850/4
yaml0.0%8430/4
json-compact0.0%6700/4
Extra rows added beyond declared length
FormatAccuracyTokensCorrect/Total
csv100.0%5504/4
toon75.0%6053/4
json-compact75.0%9013/4
xml100.0%1,6784/4
yaml75.0%1,1383/4
json-pretty50.0%1,4602/4
Inconsistent field count (missing salary in row 10)
FormatAccuracyTokensCorrect/Total
csv100.0%4804/4
json-compact100.0%7824/4
yaml100.0%9854/4
toon100.0%1,0084/4
json-pretty100.0%1,2664/4
xml100.0%1,4534/4
Missing required fields (no email in multiple rows)
FormatAccuracyTokensCorrect/Total
csv100.0%3404/4
xml100.0%1,4094/4
toon75.0%9743/4
json-pretty50.0%1,2252/4
yaml25.0%9511/4
json-compact0.0%7500/4

Performance by Model

claude-haiku-4-5-20251001
FormatAccuracyCorrect/Total
toon59.8%125/209
json-pretty57.4%120/209
yaml56.0%117/209
xml55.5%116/209
json-compact55.0%115/209
csv50.5%55/109
gemini-3-flash-preview
FormatAccuracyCorrect/Total
xml98.1%205/209
json-pretty97.1%203/209
yaml97.1%203/209
toon96.7%202/209
json-compact96.7%202/209
csv96.3%105/109
gpt-5-nano
FormatAccuracyCorrect/Total
toon90.9%190/209
json-compact90.9%190/209
json-pretty89.0%186/209
csv89.0%97/109
yaml87.1%182/209
xml80.9%169/209
grok-4-1-fast-non-reasoning
FormatAccuracyCorrect/Total
toon58.4%122/209
yaml57.9%121/209
json-pretty56.5%118/209
xml54.1%113/209
json-compact52.2%109/209
csv51.4%56/109

What's Being Measured

This benchmark tests LLM comprehension and data retrieval accuracy across different input formats. Each LLM receives formatted data and must answer questions about it. This does not test the model's ability to generate TOON output – only to read and understand it.

Datasets Tested

Eleven datasets designed to test different structural patterns and validation capabilities:

Primary datasets:

  1. Tabular (100 employee records): Uniform objects with identical fields – optimal for TOON's tabular format.
  2. Nested (50 e-commerce orders): Complex structures with nested customer objects and item arrays.
  3. Analytics (60 days of metrics): Time-series data with dates and numeric values.
  4. GitHub (100 repositories): Real-world data from top GitHub repos by stars.
  5. Event Logs (75 logs): Semi-uniform data with ~50% flat logs and ~50% with nested error objects.
  6. Nested Config (1 configuration): Deeply nested configuration with minimal tabular eligibility.

Structural validation datasets:

  1. Control: Valid complete dataset (baseline for validation)
  2. Truncated: Array with 3 rows removed from end (tests [N] length detection)
  3. Extra rows: Array with 3 additional rows beyond declared length
  4. Width mismatch: Inconsistent field count (missing salary in row 10)
  5. Missing fields: Systematic field omissions (no email in multiple rows)

Question Types

209 questions are generated dynamically across five categories:

  • Field retrieval (33%): Direct value lookups or values that can be read straight off a record (including booleans and simple counts such as array lengths)

    • Example: "What is Alice's salary?" → 75000
    • Example: "How many items are in order ORD-0042?" → 3
    • Example: "What is the customer name for order ORD-0042?" → John Doe
  • Aggregation (30%): Dataset-level totals and averages plus single-condition filters (counts, sums, min/max comparisons)

    • Example: "How many employees work in Engineering?" → 17
    • Example: "What is the total revenue across all orders?" → 45123.50
    • Example: "How many employees have salary > 80000?" → 23
  • Filtering (23%): Multi-condition queries requiring compound logic (AND constraints across fields)

    • Example: "How many employees in Sales have salary > 80000?" → 5
    • Example: "How many active employees have more than 10 years of experience?" → 8
  • Structure awareness (12%): Tests format-native structural affordances (TOON's [N] count and {fields}, CSV's header row)

    • Example: "How many employees are in the dataset?" → 100
    • Example: "List the field names for employees" → id, name, email, department, salary, yearsExperience, active
    • Example: "What is the department of the last employee?" → Sales
  • Structural validation (2%): Tests ability to detect incomplete, truncated, or corrupted data using structural metadata

    • Example: "Is this data complete and valid?" → YES (control dataset) or NO (corrupted datasets)
    • Tests TOON's [N] length validation and {fields} consistency checking
    • Demonstrates CSV's lack of structural validation capabilities

Evaluation Process

  1. Format conversion: Each dataset is converted to all 6 formats (TOON, JSON, YAML, JSON compact, XML, CSV).
  2. Query LLM: Each model receives formatted data + question in a prompt and extracts the answer.
  3. Validate deterministically: Answers are validated using type-aware comparison (e.g., 50000 = $50,000, Engineering = engineering, 2025-01-01 = January 1, 2025) without requiring an LLM judge.

Models & Configuration

  • Models tested: claude-haiku-4-5-20251001, gemini-3-flash-preview, gpt-5-nano, grok-4-1-fast-non-reasoning
  • Token counting: Using gpt-tokenizer with o200k_base encoding (GPT-5 tokenizer)
  • Temperature: Not set (models use their defaults)
  • Total evaluations: 209 questions × 6 formats × 4 models = 5,016 LLM calls

Token Efficiency

Token counts are measured using the GPT-5 o200k_base tokenizer via gpt-tokenizer. Savings are calculated against formatted JSON (2-space indentation) as the primary baseline, with additional comparisons to compact JSON (minified), YAML, and XML. Actual savings vary by model and tokenizer.

The benchmarks test datasets across different structural patterns (uniform, semi-uniform, nested, deeply nested) to show where TOON excels and where other formats may be better.

Mixed-Structure Track

Datasets with nested or semi-uniform structures. CSV excluded as it cannot properly represent these structures.

🛒 E-commerce orders with nested structures  ┊  Tabular: 33%

   TOON                █████████████░░░░░░░    73,126 tokens
   ├─ vs JSON          (−33.3%)               109,599 tokens
   ├─ vs JSON compact  (+5.3%)                 69,459 tokens
   ├─ vs YAML          (−14.4%)                85,415 tokens
   └─ vs XML           (−40.7%)               123,344 tokens

🧾 Semi-uniform event logs  ┊  Tabular: 50%

   TOON                █████████████████░░░   154,084 tokens
   ├─ vs JSON          (−15.0%)               181,201 tokens
   ├─ vs JSON compact  (+19.9%)               128,529 tokens
   ├─ vs YAML          (−0.8%)                155,397 tokens
   └─ vs XML           (−25.2%)               205,859 tokens

🧩 Deeply nested configuration  ┊  Tabular: 0%

   TOON                ██████████████░░░░░░       620 tokens
   ├─ vs JSON          (−31.9%)                   911 tokens
   ├─ vs JSON compact  (+11.1%)                   558 tokens
   ├─ vs YAML          (−6.3%)                    662 tokens
   └─ vs XML           (−38.2%)                 1,003 tokens

──────────────────────────────────── Total ────────────────────────────────────
   TOON                ████████████████░░░░   227,830 tokens
   ├─ vs JSON          (−21.9%)               291,711 tokens
   ├─ vs JSON compact  (+14.7%)               198,546 tokens
   ├─ vs YAML          (−5.7%)                241,474 tokens
   └─ vs XML           (−31.0%)               330,206 tokens

Flat-Only Track

Datasets with flat tabular structures where CSV is applicable.

👥 Uniform employee records  ┊  Tabular: 100%

   CSV                 ███████████████████░    47,102 tokens
   TOON                ████████████████████    49,919 tokens   (+6.0% vs CSV)
   ├─ vs JSON          (−60.7%)               127,063 tokens
   ├─ vs JSON compact  (−36.9%)                79,059 tokens
   ├─ vs YAML          (−50.1%)               100,011 tokens
   └─ vs XML           (−65.9%)               146,579 tokens

📈 Time-series analytics data  ┊  Tabular: 100%

   CSV                 ██████████████████░░     8,383 tokens
   TOON                ████████████████████     9,115 tokens   (+8.7% vs CSV)
   ├─ vs JSON          (−59.0%)                22,245 tokens
   ├─ vs JSON compact  (−35.9%)                14,211 tokens
   ├─ vs YAML          (−49.0%)                17,858 tokens
   └─ vs XML           (−65.8%)                26,616 tokens

⭐ Top 100 GitHub repositories  ┊  Tabular: 100%

   CSV                 ███████████████████░     8,512 tokens
   TOON                ████████████████████     8,744 tokens   (+2.7% vs CSV)
   ├─ vs JSON          (−42.3%)                15,144 tokens
   ├─ vs JSON compact  (−23.7%)                11,454 tokens
   ├─ vs YAML          (−33.4%)                13,128 tokens
   └─ vs XML           (−48.9%)                17,095 tokens

──────────────────────────────────── Total ────────────────────────────────────
   CSV                 ███████████████████░    63,997 tokens
   TOON                ████████████████████    67,778 tokens   (+5.9% vs CSV)
   ├─ vs JSON          (−58.8%)               164,452 tokens
   ├─ vs JSON compact  (−35.3%)               104,724 tokens
   ├─ vs YAML          (−48.3%)               130,997 tokens
   └─ vs XML           (−64.4%)               190,290 tokens
Show detailed examples

📈 Time-series analytics data

Savings: 13,130 tokens (59.0% reduction vs JSON)

JSON (22,245 tokens):

json
{
  "metrics": [
    {
      "date": "2025-01-01",
      "views": 6138,
      "clicks": 174,
      "conversions": 12,
      "revenue": 2712.49,
      "bounceRate": 0.35
    },
    {
      "date": "2025-01-02",
      "views": 4616,
      "clicks": 274,
      "conversions": 34,
      "revenue": 9156.29,
      "bounceRate": 0.56
    },
    {
      "date": "2025-01-03",
      "views": 4460,
      "clicks": 143,
      "conversions": 8,
      "revenue": 1317.98,
      "bounceRate": 0.59
    },
    {
      "date": "2025-01-04",
      "views": 4740,
      "clicks": 125,
      "conversions": 13,
      "revenue": 2934.77,
      "bounceRate": 0.37
    },
    {
      "date": "2025-01-05",
      "views": 6428,
      "clicks": 369,
      "conversions": 19,
      "revenue": 1317.24,
      "bounceRate": 0.3
    }
  ]
}

TOON (9,115 tokens):

metrics[5]{date,views,clicks,conversions,revenue,bounceRate}:
  2025-01-01,6138,174,12,2712.49,0.35
  2025-01-02,4616,274,34,9156.29,0.56
  2025-01-03,4460,143,8,1317.98,0.59
  2025-01-04,4740,125,13,2934.77,0.37
  2025-01-05,6428,369,19,1317.24,0.3

⭐ Top 100 GitHub repositories

Savings: 6,400 tokens (42.3% reduction vs JSON)

JSON (15,144 tokens):

json
{
  "repositories": [
    {
      "id": 28457823,
      "name": "freeCodeCamp",
      "repo": "freeCodeCamp/freeCodeCamp",
      "description": "freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming,…",
      "createdAt": "2014-12-24T17:49:19Z",
      "updatedAt": "2025-10-28T11:58:08Z",
      "pushedAt": "2025-10-28T10:17:16Z",
      "stars": 430886,
      "watchers": 8583,
      "forks": 42146,
      "defaultBranch": "main"
    },
    {
      "id": 132750724,
      "name": "build-your-own-x",
      "repo": "codecrafters-io/build-your-own-x",
      "description": "Master programming by recreating your favorite technologies from scratch.",
      "createdAt": "2018-05-09T12:03:18Z",
      "updatedAt": "2025-10-28T12:37:11Z",
      "pushedAt": "2025-10-10T18:45:01Z",
      "stars": 430877,
      "watchers": 6332,
      "forks": 40453,
      "defaultBranch": "master"
    },
    {
      "id": 21737465,
      "name": "awesome",
      "repo": "sindresorhus/awesome",
      "description": "😎 Awesome lists about all kinds of interesting topics",
      "createdAt": "2014-07-11T13:42:37Z",
      "updatedAt": "2025-10-28T12:40:21Z",
      "pushedAt": "2025-10-27T17:57:31Z",
      "stars": 410052,
      "watchers": 8017,
      "forks": 32029,
      "defaultBranch": "main"
    }
  ]
}

TOON (8,744 tokens):

repositories[3]{id,name,repo,description,createdAt,updatedAt,pushedAt,stars,watchers,forks,defaultBranch}:
  28457823,freeCodeCamp,freeCodeCamp/freeCodeCamp,"freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming,…","2014-12-24T17:49:19Z","2025-10-28T11:58:08Z","2025-10-28T10:17:16Z",430886,8583,42146,main
  132750724,build-your-own-x,codecrafters-io/build-your-own-x,Master programming by recreating your favorite technologies from scratch.,"2018-05-09T12:03:18Z","2025-10-28T12:37:11Z","2025-10-10T18:45:01Z",430877,6332,40453,master
  21737465,awesome,sindresorhus/awesome,😎 Awesome lists about all kinds of interesting topics,"2014-07-11T13:42:37Z","2025-10-28T12:40:21Z","2025-10-27T17:57:31Z",410052,8017,32029,main