From Vibes to Syntax: Architectural Constraints and Prompt Compilation for Large Language Models
Jahnavi Mahanta · Zenodo (CERN European Organization for Nuclear Research) · 2026
This preprint white paper addresses the structural failure and lexical drift of Large Language Models (LLMs) when constrained by strict stylistic or linguistic parameters, such as regional code-switching and portmanteau languages. While models handle high-resource mixtures like Hinglish or Spanglish with varying success, lower-resource or regional blends (such as Assamlish/Assamish) often suffer from textbook regression, defaulting to formal literary corpora rather than authentic colloquial vernacular. To bridge the gap between probabilistic AI and production-grade software reliability, this paper introduces a novel paradigm: Prompt Compilation. It proposes a decoupled system architecture consisting of: Version-controlled markdown rulebooks that define precise lexical and syntactic constraints. A dual-layer validation harness combining deterministic programmatic gates and semantic evaluation. A closed-loop self-correction pipeline to automatically intercept and correct drift before output delivery. Demonstrated through the case study of code-switched and portmanteau languages, this framework transitions AI generation from stochastic guesswork to reliable, compiler-enforced software execution.