cs.AIJul 13, 2026

Imprompt: A Language Framework for Prompt Programming

Authors: Chentian Wu, Shengyuan Yang, Adithya Murali

Abstract

With the unprecedented success of Language Models (LMs), the science of Prompt Engineering has evolved the powerful idea of Prompt Programming, where prompts are treated as a programmable control surface for describing complex tasks and leveraging LM capabilities. However, existing prompt programming frameworks suffer from various complexities and inelegances, which make them hard to utilize in practice for effectively describing tasks. We propose Imprompt, a new language framework for the study and practice of prompt programming. We undertake a foundational investigation of prompt programming, and contend that prompt programs must contain only the task descriptions and must be decoupled from lower-level 'execution' details. We further develop this position by illustrating structured prompting as a combination of prompt programming and prompt program 'compilation'. We exemplify this view by formally defining two compilers for Imprompt programs. We then explore the idea of typing for prompt programs and draw a correspondence between type checking and constrained decoding. Finally, we implement our compilers and type checkers and evaluate them on a variety of case studies. We believe our work contributes programming-language foundations toward the emerging area of prompt programming.

Figures & tables

Explore similar work

CardsList
  1. Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMs

    Jul 7, 2026Adrian CosmaLLM PromptingPrompt Optimization

  2. Structured Prompts Improve Evaluation of Language Models

    Nov 25, 2025Asad Aali, Muhammad Ahmed Mohsin, Vasiliki Bikia +15LLM EvaluationLLM Prompting

  3. Beyond Prompt or Skill? Attribution-Guided Optimization of Modular LLM Programs

    Sep 26, 2026Haoran Shou, Haoyue Liu, Yu Huo +2Large Language Model-Guided OptimizationLLM Prompting