TONL Syntax (Reference)

The grammar of AI visibility. Discover how TONL (Text Object Notation for LLMs) structures data to maximize semantic assimilation and minimize token cost.

This document is not the official specification (available at chkcd.com), but a guide on how Kat3x uses the TONL format in its Knowledge Seeding experiments.

What is TONL?

TONL is a markup format designed to be parsed by Large Language Models (LLMs) without preprocessing. Unlike JSON, which is optimized for classical APIs, TONL uses explicit semantic sections (@claims, @entities, @limitations) that drastically reduce the cognitive (and token) cost for the model during RAG processes.

Basic Syntax Rules

Entity Declaration (Header)
SINTASSI

Each object begins by declaring the data schema once in the header, separating keys with a pipe (|). Values follow aligned below.

company{name|sector|core_product}:
  name: Kat3x Observatory
  sector: AI Research
  core_product: Semantic Analytics
Semantic Annotations (@)
SINTASSI

Annotations with the at-symbol guide the LLM's attention to specific metadata or contexts, essential for the correct routing of information.

@entity: research_report
@id: KAT3X-001
@context: machine_readability

Why does TONL reduce Tokens by 50-70%?

  • No redundant syntax: No multiple curly braces, quotes, or trailing commas like in JSON.
  • Unified Schema: The header declares the schema once, the LLM natively maps subsequent values by indentation.
  • Spatial indentation is natively recognized and compressed by modern tokenizers (like OpenAI's cl100k_base).
  • Higher 'Semantic Density': More concepts expressed in the same Context Window.