All researchPapers

Generating Less Boilerplate with AI and Local Code Templates

AIR separates AI-generated instructions from template-based code, reporting 45–71% fewer tokens on boilerplate-heavy tasks.

Joe JurczykBy Joe Jurczyk

What they studied

The authors studied a way to generate code without asking a large language model to write every piece of the final output. Their architecture, AIR, separates semantic intent—what the output should do—from predictable structure that can be supplied by templates.

The model produces compact instructions in an intermediate format called AIR JSON. A local runtime then reconstructs the full executable output using pre-validated templates. Rather than repeatedly generating familiar syntactic boilerplate, the model supplies the information needed to guide that reconstruction.

The system also includes three-tier sandbox validation, an incremental repair protocol, and an entropy decomposition framework. The abstract names these components but does not explain the individual validation tiers or how repairs work.

What they found

The evaluation covered 36 benchmark prompts across eight structured generation domains. The authors report token reductions of 45–71% on boilerplate-heavy tasks.

That scope matters: the reported savings concern tasks with substantial predictable structure, not every kind of coding request. The abstract also says algorithmic negative controls validated the framework’s entropy boundary. However, it does not provide enough detail to explain that boundary precisely or describe the control results beyond this statement.

The abstract does not report execution-speed improvements, monetary savings, or comparative correctness scores. Token reduction is the concrete quantitative finding presented.

Why it matters for builders

For someone building an AI-powered code generator, AIR suggests a design option: let the model describe the variable parts, and let local software supply the repeated structure. This may be worth exploring when your app generates outputs that fit established templates.

For beginners using AI coding tools, the useful distinction is between generating everything and generating only what changes. AIR’s reported results support investigating the latter for boilerplate-heavy work. They do not establish that a template-based runtime can replace general-purpose coding assistance, or that fewer generated tokens automatically mean more reliable software.

Source: "AIR-SR v2: A Semantic Runtime Architecture for Token-Efficient LLM Code Generation" (2026-05-14, Zenodo (CERN European Organization for Nuclear Research)). This is our summary of the paper's abstract — read the original for full details.

There's more detail at the original source.

Open the source
Share this: Facebook X

Related reading

Newsletter

Weekly vibe-coding tips — coming soon

We're getting this ready. Leave your email and we'll let you know the moment it launches. No fluff, unsubscribe whenever.