Tabular TOON Compressor
Serialize row-column database outputs and arrays into tabular TOON format. Minimize overhead tokens in multi-agent system requests.
Official TOON: Tabular Array Compression for LLM Prompts
Official TOON introduces structural indentation and tabular array compression to minimize token overhead in dataset-heavy LLM prompts. By representing repeating records under a single schema header, repetitive JSON keys are eliminated entirely.
| Payload Type | Raw JSON Tokens | Official TOON Tokens | Token Savings (%) |
|---|---|---|---|
| 10 User Records (Small) | ~380 tokens | ~220 tokens | ~42% |
| 50 Product Objects (Medium) | ~2,850 tokens | ~1,590 tokens | ~44% |
| 200 Data Rows (Large) | ~12,400 tokens | ~6,450 tokens | ~48% |
How Tabular Serialization Maximizes Context Windows
When feeding database query results or API lists into models like Claude 3.5 Sonnet, GPT-4o, or Gemini 1.5 Pro, tabular TOON defines columns once (e.g. [N]{id,name,role}:) and streams subsequent records as concise rows. This frees up to half of your model's context window for actual reasoning and generation.