Software architecture study reveals prompt compilation mitigates lexical drift in code-switched language models, highlighting compiler-style validation for reliable artificial intelligence execution.
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.
No takes yet. Share an insight, caveat, or question.
Jahnavi Mahanta (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: