Skip to main content
TOON benchmarks measure two critical metrics: token efficiency (how much data can be compressed) and retrieval accuracy (how well LLMs understand the format). These benchmarks provide empirical evidence for TOON’s effectiveness across different data structures and use cases.

Benchmark Methodology

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).

Token Counting

All token counts use 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 token savings vary by model and tokenizer. The o200k_base encoding is used as a standardized reference point across all measurements.

Retrieval Accuracy Benchmark

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 as input.

Overall Results

Tested across 4 models with 209 questions on 11 datasets (5,016 total LLM calls):