Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityNighthawk M7 Pro im Test: Flexibler, aber teurer 5G-Router(21.09.2026 um 10:30 Uhr)
Sichere ProgrammierungNeue Gmail-Funktion: So sparst du jetzt Zeit bei Einmalcodes(21.09.2026 um 10:00 Uhr)
Sichere ProgrammierungYour GIF exporter is fine — the container is the problem(21.09.2026 um 10:01 Uhr)
Sichere ProgrammierungCSS, Motion, or GSAP? I Choose by Who Owns the Animation(21.09.2026 um 10:12 Uhr)
Windows Tipps & SecurityNighthawk M7 Pro im Test: Flexibler, aber teurer 5G-Router(21.09.2026 um 10:30 Uhr)
Sichere ProgrammierungNeue Gmail-Funktion: So sparst du jetzt Zeit bei Einmalcodes(21.09.2026 um 10:00 Uhr)
Sichere ProgrammierungYour GIF exporter is fine — the container is the problem(21.09.2026 um 10:01 Uhr)
Sichere ProgrammierungCSS, Motion, or GSAP? I Choose by Who Owns the Animation(21.09.2026 um 10:12 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

KODA Format: A Schema-First Data Format to Reduce LLM Token Usage ( 40%)

When building applications with large language models (LLMs), one of the most overlooked costs is how structured data is represented. Most systems use JSON. And JSON is inefficient for LLM input. What is KODA? KODA…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

When building applications with large language models (LLMs), one of the most overlooked costs is how structured data is represented.



Most systems use JSON.



And JSON is inefficient for LLM input.









What is KODA?



KODA (Knowledge-Oriented Data Abstraction) is a schema-first data format designed to reduce token usage when sending structured data to LLMs.



It works by:




  • Defining structure once (schema-first)

  • Encoding values positionally

  • Eliminating repeated keys found in JSON



KODA is optimized for:




  • RAG pipelines

  • Tool calling systems

  • Agent workflows

  • High-volume structured LLM input









The Problem with JSON in LLM Pipelines



JSON repeats field names for every record.



Example:




[
{"id": 1, "title": "Bug", "state": "open"},
{"id": 2, "title": "Fix", "state": "closed"}
]






Each object repeats:




  • id

  • title

  • state



If you send 1000 records:




  • those keys are repeated 1000 times

  • tokens are wasted

  • costs increase

  • context window shrinks









KODA Equivalent






KODA/1
@META
schemas:issue
counts:issue=3

@SCHEMA
issue:id title state

@DATA:issue
1|Bug|open
2|Fix|closed






No repeated keys.



Only structure + values.









Token Reduction Benchmark



Measured using a gpt-4o-mini tokenizer on real datasets.
































Case JSON Tokens KODA Tokens Reduction
Repetitive Logs 3202 1233 61.5%
GitHub Issues 4137 2576 37.7%
Small Dataset 26 35 -34.6%





Key insight



KODA performs best on large, repetitive structured data.



For small datasets, schema overhead can outweigh benefits.









Why This Matters



In LLM systems:




  • Tokens = cost

  • Tokens = latency

  • Tokens = context capacity



Reducing tokens by ~30–40%:




  • lowers API costs

  • increases usable context

  • improves system efficiency









How KODA Works



KODA separates:




  • Schema → defined once

  • Data → streamed positionally



This removes structural redundancy.









Quick Python Example






from koda import Schema, Field, encode

schema = Schema("user", [
Field("id"),
Field("name"),
Field("email", optional=True),
Field("active", default="true")
])

data = [
{"id": 1, "name": "Alice", "email": "[email protected]"},
{"id": 2, "name": "Bob"}
]

koda_str = encode(data, schema)
print(koda_str)












KODA vs JSON vs YAML vs TOON






































Format Token Efficiency Readability Best Use Case
JSON Low High APIs
YAML Medium Medium Config files
TOON High Medium LLM structured data
KODA High Low LLM pipelines








When to Use KODA



Use KODA if you are:




  • sending large structured datasets to LLMs

  • building RAG pipelines

  • working with tool calls or agents

  • optimizing token usage in production systems









When NOT to Use KODA



Do not use KODA for:




  • small datasets (1–2 records)

  • irregular or deeply nested JSON

  • human-authored configuration files



JSON is better in those cases.









Design Principles




  • Schema-first design

  • Positional encoding

  • Deterministic parsing

  • No repeated keys

  • Optimized for LLM input









Is KODA a JSON Replacement?



No.



KODA is a transport format for LLM pipelines.



Typical workflow:



JSON → KODA → LLM









FAQ






What is KODA?



KODA is a schema-first data format that reduces token usage for structured data in LLM systems.






Is KODA better than JSON?



For LLM input, yes. For general use, JSON is still better.






Does KODA always reduce tokens?



No. It works best on large structured datasets.






Where should I use KODA?



RAG pipelines, tool calls, and structured LLM input.









Try It



GitHub: https://github.com/Om7035/koda




pip install koda












Final Thoughts



If you're sending structured data to LLMs, you're likely wasting tokens.



KODA is a simple way to reduce that overhead.



It’s not a replacement for JSON it’s an optimization layer for LLM pipelines.






Feedback and contributions are welcome.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten KODA Format: A Schema-First Data Format to Reduce LLM Token Usage ( 40%)

Thematisch verwandte Begriffe: KODA, Format, SchemaFirst, Data · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94030 | A security vulnerability has been detected in SerenityOS up to 3d83e4509…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick