Til: Toon
TOON: Token Oriented Object Notation
Toon is the new data format to work with modern days LLM considering token usage and performance in the mind. With this new format, you can minimize the usage of token count up-to 30-60% compared to usual JSON format.
Basically your application will use JSON within the app and it will be converted into Toon format when you’re providing your input to LLMs, later output can be expected as JSON back to the application.
How this is effective?
Minimized syntax: No brackets, curly braces or comma. Simple
key:valueformat.Indentation based: To maintain the hierarchy, it uses indentation like YAML.
Array representation is optimized using Tabular way.
Currently all the primary programming languages like Python, JS, PHP have libraries supporting Toon serialization.
Benefits:
Lower API cost due to lower token usage.
Faster performance compared other formats like JSON, Markdown
Option to provide more context to the query
Avoid Using TOON, If:
Having irregular data and deeply nested data.
Making occasional call to LLM.
Human readability of raw data is important.
Note: Toon is only for processing input, not suitable for output.