Plang: Efficient prompt engineering language for blending natural language and control flow in large language models
Year: 2025
Type: article
Abstract: • Plang: A language blending natural prompt with control flow for precise LLM guidance. • Meta-prompt programming: Enables LLM to self-modify prompt programs during execution. • 40.75%-89.55% conciseness gain: Outperforms methods like LangChain in prompt coding. • Open-source solution: Enables multi-agent collaboration & tool use with minimal code. The advent of instruction-following large language models (LLMs), exemplified by ChatGPT, has significantly enhanced the performance of generative autoregressive natural language models on general tasks, marking a crucial milestone toward artificial general intelligence. While research has shown that LLM performance critically depends on prompt effectiveness, existing prompt construction approaches - including prompt string templates, prompt programming frameworks, and prompt programming syntactic sugar - suffer from limitations in imprecise generation control and deviation from natural language syntax, thereby impeding prompt engineering advancement. To address these challenges, we introduce PromptLanguage (Plang), a string-first programming language designed specifically for LLM prompt engineering. Our key innovation lies in utilizing font styles as syntax keywords to seamlessly integrate natural language prompt text with control flow code, enabling precise intervention in the generation process while maintaining the natural language affinity of prompt programs. Notably, Plang pioneers the concept of meta-prompt programming. Extensive experimental results across prompt engineering cases and quantitative analyses demonstrate that Plang-written prompt programs offer superior read/writability, intervention precision and up to 89.55% efficiency improvements. The Plang implementation is available as open-source software at https://github.com/HJZ-XDU/plang .
Source: Expert Systems with Applications
Authors: Jingzhao Hu, Wenjing Bi, Yangtao Zhou, Jiahui Zheng, Shuai Zhang, Hua Chu, Lu Wang, Qingshan Li
Institution: Xidian University
Language: English
Topic: Topic Modeling
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: hybrid
Estimated APC paid: $3,500
Award: G1784562017
OpenAlex ID: W4415596815
