Research Notes · A Growing Series

The Principle of Least Generation What if most “AI generation” is really retrieval wearing a costume?

For bounded, known-shape tasks, a cheap gate plus deterministic retrieval can beat a language model on cost, speed, and safety — with zero generated tokens. The principle is simple: route first, generate last. Only reach for generation when nothing cheaper can answer the question.

This is an open-ended series of small, honest experiments — single-GPU reproductions, modest in scope and candid about their limits — each one chasing the same question from a new angle. Chapters are added as the work grows.

Written & built by Khalid Alnujaidi

01 research note · single-GPU
Route First, Generate Last
The founding experiment. On bounded, known-shape tasks a cheap gate plus deterministic retrieval beats a language model on cost, speed, and safety — answering with zero generated tokens. A small reproduction, honest about its scope.
Open chapter
02 draft · experiment plan, results pending
The Leashed Decoder
Chapter 01 skipped the hard part — getting clean slots out of messy language. Chapter 02 builds Rung 3: the smallest grammar-leashed decoder that can fill the slots and structurally cannot escape the schema. The experiment plan is published; the findings are pending.
Read the plan
03 conclusion · live system
From Hypothesis to Production
95.1% cache hit rate, 715M tokens saved, live on a single GPU. Chapter 01's principle, Chapter 02's architecture — now running as LeastGen, a transparent inference optimizer for autonomous coding agents. This is the conclusion of the series and the system that proves it at scale.
Read the conclusion