TERSE: A Token-Efficient Serialization Format for LLM Input

TERSE (Token-Efficient Recursive Serialization Encoding) is a text-based data serialization format designed to represent the complete JSON data model with substantially fewer tokens, making it significantly more cost-efficient for use as input to Large Language Models (LLMs). Unlike existing token-efficient formats such as TOON, TERSE fully supports the entire JSON value space — including arbitrarily nested objects, heterogeneous arrays, all primitive types, and empty collections — while achieving 30–55% token reduction compared to JSON across representative document types. This document presents the TERSE format specification v0.5, including formal ABNF grammar, serialization and parsing rules, conformance requirements, security considerations, and token efficiency benchmarks. Reference implementations are available for TypeScript (terse-js) and Python (terse-py) at https://github.com/RudsonCarvalho/terse-format

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-03-17
DOI
https://doi.org/10.5281/zenodo.19058364
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

TERSE: A Token-Efficient Serialization Format for LLM Input

Rudson Kiyoshi Souza Carvalho
Zenodo (CERN European Organization for Nuclear Research)
Natural Language Processing Techniques
article

TERSE: A Token-Efficient Serialization Format for LLM Input

Rudson Kiyoshi Souza Carvalho
article en

Abstract

TERSE (Token-Efficient Recursive Serialization Encoding) is a text-based data serialization format designed to represent the complete JSON data model with substantially fewer tokens, making it significantly more cost-efficient for use as input to Large Language Models (LLMs). Unlike existing token-efficient formats such as TOON, TERSE fully supports the entire JSON value space — including arbitrarily nested objects, heterogeneous arrays, all primitive types, and empty collections — while achieving 30–55% token reduction compared to JSON across representative document types. This document presents the TERSE format specification v0.5, including formal ABNF grammar, serialization and parsing rules, conformance requirements, security considerations, and token efficiency benchmarks. Reference implementations are available for TypeScript (terse-js) and Python (terse-py) at https://github.com/RudsonCarvalho/terse-format

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 22%
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.