arXiv:2607.22683cs.AIcs.CL2026-07

提出可编程提示框架Imprompt,让提示更简洁高效

Imprompt: A Language Framework for Prompt Programming

论文配图:Imprompt: A Language Framework for Prompt Programming
图 1 · 摘自论文原文
  • 将提示视为纯任务描述,剥离执行细节
  • 设计两个编译器,实现提示程序的结构化转换
  • 引入类型检查机制,提升提示生成可靠性

随着大语言模型的成功,提示工程发展为提示编程,将提示作为控制复杂任务的可编程界面。然而现有框架存在复杂性和不优雅问题,难以有效描述任务。我们提出Imprompt,一个用于提示编程研究与实践的新语言框架。通过基础研究认为,提示程序应仅包含任务描述,并与底层执行细节解耦。进一步将结构化提示视为提示编程与提示程序‘编译’的结合。形式化定义了两个Imprompt程序编译器,并探索提示程序的类型系统,建立类型检查与约束解码的对应关系。最后实现编译器和类型检查器,在多个案例研究中验证其有效性。本工作为新兴的提示编程领域提供了编程语言基础。

原文摘要 · Abstract (English)

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.

提示编程语言框架编译器

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。