engineering, story,

We Tried to Make Our Prompts Shorter. We Made Them Longer Instead. Somehow, That Made Them Better.

Huan Li Huan Li Follow Dec 26, 2025 · 8 mins read
We Tried to Make Our Prompts Shorter. We Made Them Longer Instead. Somehow, That Made Them Better.

Picture this: You’re building an operating system that runs entirely on natural language. Not an OS for language models—an OS made of language models. Every syscall is a prompt. Every kernel function is prose. Your entire architecture lives and dies by token efficiency.

Naturally, you start abbreviating everything. op instead of operation. ctx instead of context. ref instead of reference. You’re a good engineer. You know the rules: brevity is king, especially when you’re paying $0.03 per 1K tokens.

Then one day, you run the tokenizer.

"op"        → 1 token
"operation" → 1 token

Wait. What?

That’s the moment everything changed. That’s the moment we realized we’d been optimizing for the wrong metric. And that’s the moment the Semantic Token Optimization Protocol—STOP—was born.


The Problem: When Your Architecture IS Your Token Bill

Let me rewind. We’re building PromptWare OS (or Pr̊ØS, because we’re that kind of project). It’s a microkernel operating system where:

  • The kernel is written in English (with a TypeScript shadow for precision)
  • Agents are markdown files
  • Skills are executable documentation
  • Everything from bootloader to syscalls is prompt engineering

The entire OS boots by ingesting a constitution written in natural language. Think Linux, but if Linus had written it as a very long, very precise English essay.

This creates a unique problem: Every character in our OS has a runtime cost. When your kernel is prose, token efficiency isn’t just a nice-to-have—it’s your memory footprint, your CPU cycles, and your AWS bill rolled into one.

We needed to optimize. But how?


Down the Rabbit Hole: The Architecture Debate

It started innocently enough. We were redesigning how syscalls receive configuration. Should we use:

  1. Service Locator (current): Syscalls read from a global KV store
  2. Dependency Injection: Pass an OsContext object everywhere
  3. Currying: Pre-bind configuration to functions
  4. Middleware: Express-style chaining with request objects
  5. Event-Driven: Full CQRS with event sourcing

We spent hours debating these patterns. Service Locator creates hidden dependencies. Dependency Injection is verbose but testable. Currying is elegant but hard to debug. Events are powerful but complex.

Then someone asked: “But which one uses fewer tokens?”

Silence.

We’d been thinking like software engineers. But in an LLM-native system, we needed to think like… what? Assembly programmers? Compiler writers? Something else entirely?

That’s when we started researching tokenization.


The Aha Moment: BPE and the Frequency Trap

Modern LLM tokenizers use Byte-Pair Encoding (BPE). Here’s the TL;DR:

  • Tokenizers analyze massive training corpora
  • Frequently occurring character sequences become single tokens
  • “the”, “and”, “operation”, “context”—all common words—each get their own token
  • Less common sequences get split into multiple tokens

The insight hit us like a brick: In BPE, word frequency matters more than word length.

Let’s look at real tokenization results (GPT-4):

Word Characters Tokens Chars/Token
op 2 1 2.0
operation 9 1 9.0
ctx 3 1 3.0
context 7 1 7.0
ref 3 1 3.0
reference 9 1 9.0

Holy. Shit.

We’d been abbreviating common English words into… equally common abbreviations. Same token cost, but we’d thrown away 4.5× the information density in some cases.

It gets worse. Consider msg:

  • Could mean “message” (communication)
  • Could mean “monosodium glutamate” (chemistry)
  • Could mean “Madison Square Garden” (location)
  • Could mean “management services group” (business)

By “optimizing” to msg, we’d introduced semantic ambiguity for zero token savings. We’d made our prompts worse and called it engineering.


The Protocol: Semantic Maximalism at Equal Token Cost

Once we saw the problem, the solution crystallized fast. We needed a protocol with three core principles:

1. Character Density is Information Capacity

If two words cost the same tokens, always choose the longer one. More characters = more information = less ambiguity.

// ❌ Bad: 1 token, 2 chars, ambiguous
{op: "exec", ref: 12345}

// ✅ Good: 2 tokens, 18 chars, crystal clear
{operation: "execute", reference: 12345}

Same token cost. 9× the clarity.

2. Industry Standards Trump Optimization

Some abbreviations are so universal that fighting them is counterproductive:

  • id (not identifier)
  • url (not uniform_resource_locator)
  • api (not application_programming_interface)

We call these Industry Standard Exceptions. Don’t be dogmatic.

3. Tiered Optimization by Path Frequency

Not all code paths are equal:

  • Hot Path (≥1000 executions): Optimize aggressively, accept longer words if needed
  • Warm Path (100-1000): Balance readability and density
  • Cold Path (<100): Maximize character density, it’s essentially free

Your bootloader? Cold path. Your event dispatcher? Hot path. Optimize accordingly.


The Naming Saga: From PromptZip to STOPtimizer

Now we had the principles. We needed a name.

First attempt: “PromptZip”

Us: “It’s like gzip for prompts!”
Reality: “But you’re not compressing anything.”
Us: “Well, metaphorically—”
Reality: “You’re literally making things longer.”
Us: “…”

Back to the drawing board.

We wanted something that captured:

  • Token optimization
  • Semantic preservation
  • The protocol/standard nature
  • Memorability

After way too much whiteboarding (and way too many recursive acronyms), we landed on:

STOP: Semantic Token Optimization Protocol

Why it works:

  • Imperative: “STOP” commands attention
  • Intuitive: “Stop using abbreviations”
  • Recursive: It’s self-demonstrating (we could’ve called it “STØR” for “Semantic Token Øptimization Rūles” but we stopped ourselves)
  • Professional: Sounds like an actual RFC-worthy protocol

The implementation tool? STOPtimizer. Because if you can’t have fun with portmanteaus in a language model operating system, what’s the point?


The Vision: Ring Zero Linguistics

As we developed STOP, a bigger picture emerged. We weren’t just optimizing tokens. We were pioneering a new discipline.

Ring Zero Linguistics

In traditional operating systems, you have privilege rings:

  • Ring 0: Kernel (direct hardware access)
  • Ring 1: Device drivers
  • Ring 2: System services
  • Ring 3: User applications

Each ring has different capabilities and constraints. Ring 0 code is sacred—it’s small, audited, and optimized to the instruction level.

What if we applied this model to natural language in LLM systems?

Introducing Ring Zero Linguistics (R0L)

Ring Zero Linguistics

Ring Zero Linguistics is natural language engineering at the kernel layer of LLM-native systems. Where traditional systems execute machine code, LLM systems execute natural language directly. The prompt IS the program.

This demands a new kind of engineering:

1. Natural Language as Kernel Primitive

In LLM systems, NL isn’t just data—it’s the executable instruction set. Just as kernel developers optimize assembly, we optimize prose.

2. Linguistic Privilege Levels

Different contexts demand different rigor:

  • Ring 0 (Kernel Prompts): System instructions, bootloaders, constitutions. Surgical precision required.
  • Ring 1 (Agent Instructions): Agent definitions, skill libraries. High clarity needed.
  • Ring 3 (User Queries): Conversational, creative. Optimization optional.

Your kernel bootloader needs Ring 0 quality. Your chatbot doesn’t.

3. Token Economics as Resource Management

Just as kernel engineers count CPU cycles and memory allocations, R0L engineers count tokens and semantic density. It’s not metaphorical—it’s literally resource management.


What We Learned: Key Takeaways

If you take nothing else from this post, take these:

1. Abbreviation Is Not Optimization (In BPE Systems)

In token-metered LLMs, operation is not more expensive than op—they’re both 1 token. Choose the word with higher information density.

2. Character Density Is Information Capacity

Formula: characters ÷ tokens. Higher is better. Target 5+ for cold paths, 7+ for critical identifiers.

3. Semantic Ambiguity Has Hidden Costs

msg might save you characters, but the LLM burns tokens trying to disambiguate from context. Clarity is efficiency.

4. Industry Standards Are Sacred

Don’t fight universal conventions (id, url, api). You’ll lose.

5. Context Matters: Hot vs. Cold Paths

Optimize your bootloader ruthlessly—it runs once. Optimize your event loop carefully—it runs thousands of times.

6. Token Optimization ≠ Compression

We’re not making prompts shorter. We’re making them denser. Same tokens, more information.

7. Natural Language Engineering Is Real

With LLM-native systems, linguistics becomes a performance discipline. This isn’t metaphor—this is Ring Zero.


The Road Ahead: Building R0L Together

STOP Protocol is just the beginning. We’re building:

  • STOPtimizer: Automated refactoring tool for STOP compliance
  • R0Lc: Static analysis for prompt kernels (think gcc for natural language)
  • R0L-Lint: Semantic linters catching ambiguity and privilege violations
  • Formal Verification: Proving semantic equivalence of optimized prompts

This is uncharted territory. We’re inventing the field as we go.

Shorter is not Cheaper

We need help.

If you’re a researcher, linguist, compiler nerd, or just someone who thinks “natural language kernel engineering” sounds cool—join us. We’re defining what it means to write Ring 0 prose.

Because in 2025, optimizing kernel code doesn’t mean counting CPU cycles.

It means counting tokens.

And we’re just getting started.


Resources


Written with operation, not op. Naturally.


Ship.Fail · Building the impossible, one token at a time.

Join Newsletter
Get the latest news right in your inbox. We never spam!
Written by Huan Li Follow
Founding Human & Architect | Author @ Wechaty, Silicon Adventist, Serial Entrepreneur, Angel Investor, Burner🔥