v1.0 spec · CC0 public domain · MIT parsers

ASHRU
Atomic Semantic
Hyper-Relational Unit.

The deterministic semantic transport protocol for AI. JSON was designed for humans writing APIs. ASHRU is designed for machines generating semantics.

Coming from JSON? ASHRU drops 60–80% of your output tokens by killing the brackets, quotes, and repeated field names. Coming from TOON? ASHRU keeps the pipe compression and adds the six grammatical slots TOON leaves on the table — so retrieval is structural, not just compressed.

Built on the case roles Pāṇini formalized in Sanskrit 2,500 years ago, and the AI-knowledge-representation thesis Rick Briggs published at NASA in 1985. Public domain. Drop-in compatible with every LLM you already use.

JSON output · ~120 tokens $0.000048/record
{
  "verbs": [{
    "verb_lemma": "buy",
    "kartā": "Suman",
    "karma": "Tesla",
    "karaṇa": "$60000",
    "apādāna": "John",
    "adhikaraṇa": "SF",
    "tense": "past",
    "is_negated": false
  }]
}
ASHRU output · ~25 tokens $0.000010/record
ASHRU/1
V|buy|Suman|Tesla|$60000||John|SF|p|0|
79.2% smaller
Output side. Same fact. Math below.
4.8×
smaller per record
~80%
output token savings
0
runtime dependencies
2,500
years old (Pāṇini)
Watch the cost in real time

Same fact. Two formats. Different bills.

An LLM extracting 8 kāraka facts. Token counters tick at the published Gemini Flash output rate (~250 tok/s). Press play.

json — gemini-flash output 0 tokens
ashru — gemini-flash output 0 tokens
ASHRU finishes 3.4× faster · saves $— per 1M docs
Real numbers from benchmarks/run_benchmark.py --records 1000 with tiktoken cl100k_base: ASHRU = 0.29× JSON tokens.
5 minutes to your first ASHRU row

How to use it.

Three steps. Bring your own LLM key. No SDK to install beyond a single 250-LOC parser. Works with any model that can follow instructions.

1
Install parser

Pick your language

# Python
git clone github.com/ashru-format/\
  ashru-format
cp ashru-format/parsers/python/\
  ashru.py your_project/

# JavaScript
cp ashru-format/parsers/javascript/\
  ashru.js your_project/

Zero runtime dependencies. Single file, ~250 LOC each. MIT-licensed.

2
Update your prompt

One line swap

# BEFORE (JSON)
"Return JSON with verb, kartā,
karma fields"

# AFTER (ASHRU)
"Return ASHRU/1 — one V| line
per fact. 10 columns:
V|verb|kartā|karma|karaṇa|
sampradāna|apādāna|adhikaraṇa|
tense|negated|attributes"

The model already knows how to follow column-position instructions. No fine-tuning required.

3
Parse the response

Replace JSON.parse

# BEFORE
import json
data = json.loads(llm_response)

# AFTER
from ashru import parse
doc = parse(llm_response)
for verb in doc.verbs:
    print(verb.verb_lemma,
          verb.karta,
          verb.karma)

Tolerant by design — malformed rows logged + skipped, not raised.

Or skip the steps

Use the drop-in batch extractor

examples/extract_batch.py — pipe prose in, get an ASHRU document out. Bring your own key (Gemini, OpenAI, or Anthropic). Already on GitHub, ready to run.

$ cat my_text.txt | \
    GEMINI_API_KEY=... python extract_batch.py
→ ASHRU/1
→ V|buy|Suman|Tesla|$60000||John|SF|p|0|
→ V|deploy|engineer|api||||staging|f|0|
→ ... (one V| per fact)
View script on GitHub →
Why this exists

The next scaling bottleneck isn't compute.
It's semantic inefficiency.

1990s
XML standardized documents

Verbose. Heavy. Designed for parsing by machines that had cycles to spare.

2000s
JSON standardized APIs

Lighter. Human-readable. Optimized for engineers writing endpoints.

2026 →
ASHRU standardizes semantics

For machines generating structured meaning under token-billed constraints. The protobuf moment for AI semantics.

Every brace, every quote, every repeated field name in your LLM's output is billable token waste. At one record it doesn't matter. At a million records, it's economically catastrophic.

ASHRU is a positional, schema-implicit, deterministic semantic transport protocol — the protocol gets out of the way so the model can spend tokens on data, not punctuation. Compatible with every LLM you already use — change one line of your prompt's output instruction, replace JSON.parse with ashru.parse.

The change

Change one line of your prompt.

You don't migrate to ASHRU. You don't rewrite anything. You change the line of your existing extraction prompt that says "return JSON" to "return ASHRU/1". The LLM you already pay for emits the new format. Your output bill drops by ~80% the same hour.

BEFORE — what most extraction prompts look like
# in your existing extraction prompt
prompt = """
You are an entity extractor. Return JSON in this shape:
{
  "verbs": [
    { "verb": "...", "subject": "...", "object": "..." }
  ]
}

Now extract from: {text}
"""
→ output is 120 tokens / record. You pay for every {, ", and the field name "verb_lemma" repeated 1,000 times.
AFTER — drop-in ASHRU swap
# the same prompt, ASHRU edition
prompt = """
You are an entity extractor. Return ASHRU/1 format —
one V| line per fact:
V|verb|kartā|karma|||apādāna|adhikaraṇa|p|0|

Now extract from: {text}
"""
→ output is ~25 tokens / record. The schema is in column position. You pay only for actual data.
Code changed
~8 lines
just the output schema instruction
Output cost cut
~80%
same fact, same model, ¼ the tokens
Migration time
5 min
edit prompt, replace JSON parser with ashru.parse()

That's it. No new SDK to learn. No new database. Just a different output schema your LLM already knows how to follow.

The format

Ten columns. One pipe. Done.

ASHRU is positional, schema-implicit, and tiny. One line per fact. The columns map onto the six grammatical roles every human sentence has had since Pāṇini formalized them — agent, object, instrument, recipient, source, location — plus tense, negation, and a free key-value slot for anything else.

V|verb_lemma|kartā|karma|karaṇa|sampradāna|apādāna|adhikaraṇa|tense|negated|attributes
verb_lemma
The action
Atomic verb in canonical form. Always lowercased.
buy
kartā कर्ता
Agent
Who performed the action.
Suman
karma कर्म
Object
What received the action.
Tesla
karaṇa करण
Instrument
How / by what means.
$60000
sampradāna सम्प्रदान
Recipient
For whose benefit.
team_lead
apādāna अपादान
Source
From where / from whom.
John
adhikaraṇa अधिकरण
Locative
Where or when.
SF
tense
When
past · now · future · conditional.
p · n · f · c
attributes
Anything else
k=v pairs separated by ;
price=60000;currency=USD

Empty between two pipes = empty cell. No quotes. No keys. The schema is in the position.

Where ASHRU sits in your stack

The semantic transport layer
between LLMs and your knowledge graph.

Knowledge graph extraction pipeline
Gemini
OpenAI
Claude
LLM
prose in
ASHRU
v1
Transport protocol
V|verb|...
Kafka
Kinesis
Pub/Sub
Stream
batch transport
Neo4j
Postgres
+ pgvector
Knowledge graph
structured store
Agents
RAG
UI
Consumer
retrieval
📡 Semantic streaming
Multi-agent communication

Agents emit ASHRU rows on a shared Kafka topic. Each row is a typed semantic event. Consumers subscribe by verb_lemma, kartā, or sphere — no schema negotiation, no JSON-Schema coordination overhead.

🧠 Agent memory infrastructure
Long-term memory store

Each ASHRU row → one row in Postgres + pgvector embedding. Retrieval = cosine similarity × harmonic weight × tense decay. Pay once at write, read forever for free. No per-query LLM cost.

🔭 AI observability
Semantic telemetry

ASHRU is a typed schema for LLM behavior. Log every kartā/karma/verb tuple your agent emits. You get structured drift detection, anomaly surfacing, and replayable semantic traces — without invented schemas.

The hard parts, answered

Protocol guarantees, not vibes.

Two things any serious engineer attacks first: what happens when a value contains the delimiter, and what happens when the LLM emits the wrong number of columns. Both are spec-defined, both are tested.

Delimiter escaping

Spec rule §3.4

A literal pipe inside a value is escaped with a backslash. The reference parser un-escapes during column split, so the value Suman | CEO round-trips correctly without inflating column count.

# Source value
"Suman | CEO"

# On the wire
V|hire|Acme|Suman \| CEO|...

# After ashru.parse(...)
verb.karma == "Suman | CEO"   

Escape cost: 1 character per pipe. Fields containing pipes are rare in practice (titles, IDs); kāraka role values almost never collide with the delimiter.

Wrong column count

Spec rule §4.2

If a row has fewer or more than the 10 V-columns, the reference parser logs the row to a warnings list and skips it. The document does not crash. This is intentional — at million-row scale, one drift-by-one row should not lose the entire batch.

# Hallucinated 9-column row
V|buy|Suman|Tesla|$60000||John|SF|p

# Parser behaviour
doc = ashru.parse(text)
len(doc.verbs)         # good rows only
len(doc.warnings)      # 1: bad column count
doc.warnings[0].line   # source line number

Strict mode (parse(..., strict=True)) raises on the first bad row — opt in if you need fail-fast batch semantics.

Spec coverage

v1.0 spec covers: 10-column V grammar, F-line file context, S-line sphere context, comments (#), blank-line tolerance, UTF-8, escaping (\|, \\, \n), and parser warnings contract.

Reference parsers

Python and JavaScript reference parsers in the repo. Round-trip tested against the v1.0 conformance suite. ~250 LOC each, zero dependencies, MIT.

Packages (in flight)

pip install ashru and npm install @ashru/parser are this week's milestone. Until then, single-file copy. Spec is frozen and versioned (v1.0).

First questions a critic asks

Why not just use [X]?

Every alternative has a real argument. Here are the eight you should be asking — answered honestly, no hand-waving.

Why not JSON?

Different job

Designed for human-readable APIs. ASHRU is designed for machine-generated semantics. Use both, in different places.

Why not Protobuf?

LLMs can't emit it

Binary format. LLMs hallucinate magic numbers and offsets when asked to emit raw bytes. ASHRU is text — what LLMs are actually built to produce.

Why not MessagePack?

Binary, same problem

Same as Protobuf — LLMs are not reliable binary emitters. ASHRU stays text-native and BPE-friendly.

Why not YAML?

Repeats the keys

YAML is human-friendly but every key is still written out per record. At a million records, you pay for `verb_lemma:` a million times.

Why not CSV / TSV?

Flat-only

CSV is for flat tables. ASHRU supports nested file (`F|`) and contextual sphere (`S|`) markers in a single payload — semantic structure CSV can't express.

Why not JSON-Schema Structured Outputs?

Caches schema, still pays for output

OpenAI / Gemini / Claude schema caching reduces SCHEMA-PROMPT cost. They still bill you per generated output token. ASHRU attacks the more expensive side: output.

Why not NDJSON / JSONL?

Per-row JSON tax

Newline-delimited JSON gives you streaming, but every row still pays the JSON tax (braces, quotes, repeated keys). ASHRU drops both.

Why not XML?

🪦

Verbose enough that even Java engineers stopped using it for new wire formats around 2010. We will not relitigate this.

The name

Why अश्रु · ashru.

In Sanskrit, अश्रु (ashru) is most often translated as "tear". But that translation flattens what the word actually means. A tear is not just a single drop — it is the distilled essence of an entire feeling. Grief, joy, love, awe — they fall as one drop, and that drop carries the whole.

The same way grains of rice on a plate are individually tiny, but together they fill the mouth — the same way a million droplets, scattered, become an ocean — a single ashru in our format is one fact, one verb with its grammatical roles. Stack a million of them and you get something larger: the entire knowledge of a person, a project, an organization. The drop holds the whole.

That is why the format is called ASHRU — Atomic Semantic Hyper-Relational Unit. Each row is the smallest unit of meaning that still says something true. Many of them, together, become a memory.

Sanskrit is humanity's oldest continuously-studied grammar. It belongs to no one and everyone. By the time it became scripture, scholars had been arguing about it for a thousand years. We did not invent any of this. We just brought one of its oldest grammatical observations — that every action has six named participants — to a 2026-grade transport protocol.

Prior art · NASA · 1985

In 1985, Rick Briggs at NASA Ames published "Knowledge Representation in Sanskrit and Artificial Intelligence" in AI Magazine (Vol. 6, No. 1, Spring 1985). Briggs argued that Sanskrit's kāraka case system was a more direct, deterministic formalism for representing knowledge in computers than the first-order logic and semantic-network approaches dominant at the time.

That paper sat as theory for forty years. ASHRU is a practical implementation of Briggs' proposal — the transport protocol he hinted at, shipped in an era where LLMs are the bottleneck Briggs couldn't have predicted.

How you actually use it

One LLM call. Many records.

Don't extract one paragraph at a time. Send 10–50 paragraphs in a single call and ask the LLM to return one ASHRU document with one V| line per fact. The fixed prompt overhead amortizes across every record. Cost drops ~93% versus the naïve loop.

1 · Your input (paste any text)
// my-text.txt

Suman bought a Tesla in SF for $60K.
Naveen deployed the staging API yesterday.
We met John at the office last Tuesday.
The launch happens next month if QA passes.
... (12 more paragraphs)
2 · One LLM call, batch output
$ cat my-text.txt | \
  GEMINI_API_KEY=... python extract_batch.py \
  --model gemini-2.5-flash-lite

ASHRU/1
V|buy|Suman|Tesla|$60000||John|SF|p|0|
V|deploy|Naveen|staging_api|||||p|0|date=yesterday
V|meet|us|John||||office|p|0|date=last_tuesday
V|launch|us|product|||||c|0|condition=qa_passes
... (one V| per fact)
Naïve loop
15× $0.001 = $0.015
15 LLM calls. Each pays the full prompt overhead. Slow + expensive.
Batch (this is what we do)
$0.001
One call. One overhead. The LLM emits all 15 records in one document.
Net
~93% cheaper
Same output, fewer round-trips, fewer fixed-overhead charges.

Drop-in script: examples/extract_batch.py — bring your own LLM key.

The math, no bluff

Show your work.

Every number on this page is calculated from public Gemini Flash Lite rates (input $0.10/M, output $0.40/M, May 2026) and the byte counts of the rendered examples. You can verify it with a tokenizer in five minutes. No hand-waving.

Per-record output: JSON
verbose
{
  "verbs": [{
    "verb_lemma": "buy",
    "kartā": "Suman",
    "karma": "Tesla",
    "karaṇa": "$60000",
    "apādāna": "John",
    "adhikaraṇa": "SF",
    "tense": "past",
    "is_negated": false
  }]
}
~120
tokens
$0.000048
/ record output
$48
/ 1M records
Per-record output: ASHRU
positional
ASHRU/1
V|buy|Suman|Tesla|$60000||John|SF|p|0|
~25
tokens
$0.000010
/ record output
$10
/ 1M records
Savings on this example
79.2%
That is 25 tokens vs 120 tokens, output side, per record. For 1M records, that is $38 saved at Gemini Flash Lite rates.
What we are not claiming
  • — The 79% savings are output-side. Input prompt overhead is roughly the same in both formats.
  • — At very small inputs (chat messages), fixed prompt overhead dominates and the ratio compresses to ~3-4×.
  • — At large inputs (10K+ tokens), the asymptote is ~1.8× including required structured-output cost.
  • — These are real LLM-pricing math. They are not "up to 95%" hype. They are the ceiling on this example.

Every claim above is reproducible with tiktoken + a calculator.

Real numbers, not marketing

Tokens, measured. Costs, computed.

Bench script lives in the repo. Tokenizer is real (tiktoken cl100k_base). 1,000 kāraka facts encoded in JSON and ASHRU. Numbers below are reproducible.

Tokens per record (lower is cheaper)
JSON 71.6 tok ASHRU 21.0 tok ASHRU emits 29% of JSON's tokens — that's 71% fewer. Same fact, same kāraka grammar.
Output cost per 1,000,000 records (May 2026 rates)
Gemini Flash Lite $29 $8 Gemini Flash $179 $53 GPT-4o-mini $43 $13 GPT-4o $716 $210 Claude Haiku 4.5 $358 $105 Claude Sonnet 4.6 $1,074 $315
JSON ASHRU Output side only — input cost is identical between formats.
Methodology: 8 sample kāraka facts (Suman/Tesla/Acme/etc.) are repeated to fill 1000 records. JSON encoding uses pretty-printed UTF-8 with full Devanagari kāraka keys (kartā, karma, karaṇa…). ASHRU uses the v1.0 grammar from SPEC.md. Tokenizer is OpenAI's tiktoken cl100k_base. Pricing reflects published May 2026 list rates; volume discounts not applied. Source code: benchmarks/run_benchmark.py.
Run your own numbers

How much does JSON cost you at scale?

Plug in your traffic and pick your model. We compute the LLM bill for both formats at published rates, side by side. No login. No telemetry. Pure math, runs in your browser.

Prices verified May 2026 from each provider's pricing page.
100k = small SaaS extraction at moderate volume
200 = a typical chat paragraph
JSON
Input/day:
Output/day:
Cost/day:
Cost/year:
ASHRU
Input/day:
Output/day:
Cost/day:
Cost/year:
You save
Adjust the inputs above
Saved/year
Math, no hand-waving: Output side, JSON ≈ 1.0× input tokens (verbose schema, repeated keys), ASHRU ≈ 0.25× input tokens (positional, no keys). Output dominates because every model bills output 4–10× the input rate. Real numbers depend on your tokenizer specifics — verify with tiktoken or your provider's tokenizer. Pricing reflects published May 2026 list rates; volume discounts not included.
Try it now

Paste JSON. See savings instantly.

100% in your browser. No data leaves your machine. No telemetry. Auto-detects whether you pasted JSON or ASHRU and converts to the other.

JSON
0 tokens
ASHRU v1
0 tokens
Try a sample:
beta · coming soon

Live LLM extraction tester

Paste prose, watch your LLM emit ASHRU records in real time, with token counts and side-by-side cost vs JSON. Bring-your-own-key — free Google AI Studio key works. Going live next week.

Track on GitHub →
Already in your stack

Drops in next to every tool you already use.

ASHRU is a transport protocol, not a framework. It coexists with LangChain, the vendor SDKs, your message bus, your graph database, your MCP servers, your AI coding agents. Change one line of your prompt's output instruction. Replace JSON.parse with ashru.parse. Done.

Drop-in output parser

LangChain

Replace Pydantic-JSON output stage with AshruOutputParser. Same chain, ~4× fewer output tokens.

from langchain_core.output_parsers import BaseOutputParser
from ashru import parse

class AshruOutputParser(BaseOutputParser):
    def parse(self, text):
        return parse(text).verbs

chain = ASHRU_PROMPT | llm | AshruOutputParser()
Bring your own LLM

OpenAI · Claude · Gemini

One prompt instruction. Replace JSON-output schema with the ASHRU/1 column convention. Works on every major LLM.

# extract_batch.py — pipe prose in, ASHRU out
cat my_paragraphs.txt | python extract_batch.py \
    --provider gemini \
    --model gemini-2.5-flash-lite

# → ASHRU/1
# → V|buy|Suman|Tesla|$60000||John|SF|p|0|
AI-native tool calls

MCP (Model Context Protocol)

Define an MCP tool that returns ASHRU rows instead of verbose JSON. Claude / Cursor / Windsurf agents see structured semantic output, not bracket-noise.

// MCP server tool — returns ASHRU stream
{
  name: "extract_facts",
  description: "Extract kāraka facts as ASHRU/1",
  inputSchema: { type: "object", properties: { text: { type: "string" }}},
  handler: async ({ text }) => {
    const ashru = await llm.extract(text); // returns "ASHRU/1\nV|..."
    return { content: [{ type: "text", text: ashru }] };
  }
}
Direct ingest

Neo4j · Postgres · pgvector

Each ASHRU row maps to one row in your knowledge graph. No transform layer. No schema migration.

# Each ASHRU verb → one INSERT.
# kartā → :Subject, karma → :Object,
# verb_lemma → :REL_TYPE, attributes → JSON properties.

CREATE (s:Entity {name: $karta})
CREATE (o:Entity {name: $karma})
CREATE (s)-[r:RELATES {verb: $verb, tense: $tense}]->(o)
Agent memory

Cursor · Devin · Continue

Long-term agent memory store. Each agent action becomes one ashru row. Replay, audit, and retrieve every step a coding agent took without LLM-summarizing every read.

# Agent emits ashru rows on every action
agent.on('action', (event) => {
  const row = `V|${event.verb}|${agent.id}|${event.target}|||||p|0|file=${event.file}`;
  await kosha.append(row);  // one INSERT, microseconds
});

# Later: query agent's history with pure SQL
SELECT * FROM ashrus WHERE karta = 'cursor-agent-42'
  AND verb_lemma = 'edit' AND adhikarana = 'src/auth.py';
Semantic streaming

Kafka · Kinesis · Pub/Sub

Stream ASHRU rows on a topic. Subscribers filter by verb_lemma or kartā. Multi-agent semantic event bus.

// Producer (any agent emits typed semantic events)
producer.send('semantic-events',
  'V|update|order_42|paid|||||p|0|amount=99.00');

// Consumer subscribes by verb_lemma
consumer.subscribe('semantic-events').filter(
  row => row.verb_lemma === 'update');
⚠️
Honest trade-off you should know before adopting

ASHRU bypasses native JSON-Schema validation. You give up Pydantic, OpenAI Structured Outputs, Anthropic tool-use schema, and Gemini's response_schema — your application handles validation. The reference parsers are tolerant by design (skip malformed rows, log warnings), but strict shape enforcement is your responsibility. Token savings come at the cost of native validation libraries. Worth it for extraction-heavy pipelines at scale; not worth it if every single record must be schema-checked by a framework.

The longer arc

Why semantics become
infrastructure.

For thirty years, every infrastructure layer has standardized — except meaning. We standardized documents with HTTP and XML. We standardized APIs with REST and JSON. We standardized messages with Kafka and Protobuf. We standardized files with cloud object storage. Each standard moved the cost of integration from N × M down to N + M, and the entire software industry compounded on top of it.

Semantics never standardized. Every team that builds an LLM pipeline invents its own JSON schema for what an "extracted fact" looks like — and pays the LLM to render it. At one record, the cost is invisible. At a million records a day, the cost is a tax on every AI company's P&L, paid in tokens that buy nothing.

The next decade of AI will not be limited by compute.
It will be limited by how efficiently semantics move between systems.

ASHRU is a small bet on a specific claim: a deterministic transport protocol is the right abstraction layer for AI semantic exchange — not a framework, not a SaaS, not a vendor lock-in. The format must be open, deterministic, and grammatically grounded so that any LLM, any database, any stream processor, and any agent can produce and consume it without coordination.

It must be positional, not keyed — so the schema lives in the spec, not in every payload. It must be grammatically complete — so the same fact can be retrieved by who, by what, by where, by when. It must be human-readable — so debugging happens without a decoder. And it must be free — public domain, no patents, no rent.

Pāṇini wrote down those grammatical primitives in the 5th century BCE. NASA's Rick Briggs wrote in 1985 that those primitives map directly onto AI knowledge representation. ASHRU is a 21st-century transport protocol for an observation about meaning that has been right for 2,500 years. The window for it to become an infrastructure layer is now — because the LLMs that will define the next decade are being built right now, and they all need to talk to each other, and to your knowledge graph, and to the same agent two weeks from now.

We don't know which AI infrastructure standards will compound for the next thirty years. We do know that some of them will. A semantic transport layer is one of the empty slots — and ASHRU is the most defensible candidate, because it claims nothing more than what humanity already proved 2,500 years ago.

Honest answers

Questions you should be asking.

Why not just use JSON with structured outputs? +
OpenAI/Gemini/Anthropic do cache the schema you send, but you still pay token-by-token for every brace, quote, and field name the model GENERATES. Structured outputs reduce schema-prompt cost; they don't reduce output cost. ASHRU attacks the output cost — typically the more expensive side of LLM billing (Gemini Flash output is 4× input rate).
Why not Protobuf or MessagePack? +
Both are binary formats. LLMs can't reliably emit raw bytes — they hallucinate magic numbers and offsets. ASHRU is human-readable text that compresses well under byte-pair encoding (BPE), which is what tokenizers actually do.
Why not YAML? +
YAML still requires repetitive keys ("verb_lemma:" written 1,000 times in a 1,000-record document). YAML's strength is hand-editing; ASHRU's strength is machine-emission at scale. Different jobs.
Why not CSV / TSV / NDJSON? +
CSV and TSV are flat — no nested file/sphere context (F| and S| markers). NDJSON gives you one JSON object per line, which is fine but still pays the JSON tax per row. ASHRU drops both the row tax (no braces) and supports nesting via the F|/S| context lines.
What about hallucinated columns / malformed lines? +
Reference parsers tolerate them: any V| line with the wrong column count is logged and skipped, not raised. The whole document doesn't crash. This is intentional — LLMs sometimes drift by one column on long outputs, and a strict parser would lose the entire batch.
Does ASHRU work with my existing extractor (LangChain / LlamaIndex / Instructor / raw API)? +
Yes. ASHRU is a transport protocol — you change one line of your prompt's output instruction, and a few lines of your output parser. The model and the surrounding code stay the same. Drop-in replacement for the JSON output stage.
Where is the Sanskrit grammar from? Is it copyrighted? +
Pāṇini formalized the six kāraka case roles in the Aṣṭādhyāyī around the 5th century BCE. It's been public domain by virtue of being humanity's gift for ~2,500 years. We didn't invent any of this — we brought one of its oldest grammatical observations to a 2026 transport protocol. There is no IP claim on Sanskrit grammar.
Does ASHRU work with Pydantic / OpenAI Structured Outputs / native JSON-Schema validation? +
No — and this is the most important trade-off to understand before adopting. When you switch from JSON to ASHRU output, you give up native JSON-Schema validation (Pydantic, OpenAI Structured Outputs, Anthropic's tool-use schema, Gemini's response_schema). If the LLM emits a malformed pipe row, you don't get the framework's automatic retry. You handle validation at your application layer — the reference parser is tolerant by design (skips bad rows, logs warnings), but strict shape enforcement is your responsibility. ASHRU is an architectural trade-off: you sacrifice native validation libraries in exchange for ~80% output-token cost reduction at scale. For most extraction-heavy LLM pipelines that trade is worth it. For mission-critical single-record outputs where every field must be schema-checked, stay on JSON.
What's the catch? +
Two real ones: (1) The Pydantic / Structured-Output trade-off above — you do extra validation work in exchange for token savings. (2) ASHRU is optimized for kāraka-shaped data (subject-verb-object-with-modifiers). For free-form text or unstructured key-value bags, JSON is still the right tool.

Found another concern we didn't address? Open an issue.

About the author

I'm Suman Addanki — a software architect in New Jersey. ASHRU started one weekend when I noticed my Gemini bill was mostly punctuation. I went looking for prior art on grammar-native AI representations and found Rick Briggs's 1985 NASA paper sitting in AI Magazine, untouched for forty years. The kāraka mapping was already there. I just brought it to a wire.

The Sanskrit isn't a marketing layer — it's the actual technical answer. Six grammatical participants per action, formalized 2,500 years ago. The columns of the format aren't arbitrary. They're a 5th-century-BCE observation about how meaning is structured.

No company. No VC. Spec CC0, parsers MIT, RFC process in the repo. If you find a bug, file an issue. If you build on it, ship it. If you want to argue, my GitHub is open.

@sumanaddanki · GitHub · hi@ashru.dev