Menu

1 / 2

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

DEV Community·Om Kawale·7 months ago
#vKCGoUD3
#koda#when#is#json#schema
Reading 0:00
15s threshold

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" } ]

Enter fullscreen mode

Exit fullscreen mode

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…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.