Plang: Efficient prompt engineering language for blending natural language and control flow in large language models

• 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 .

Authors

Institutions

Publication Details

Journal
Expert Systems with Applications
Published
2025-10-27
DOI
https://doi.org/10.1016/j.eswa.2025.130118
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Plang: Efficient prompt engineering language for blending natural language and control flow in large language models

Jiahui Zheng, Jingzhao Hu, Yangtao Zhou, Wenjing Bi et al.
Expert Systems with Applications
Natural Language Processing Techniques
article

Plang: Efficient prompt engineering language for blending natural language and control flow in large language models

Jiahui Zheng, Jingzhao Hu, Yangtao Zhou, Wenjing Bi, Lu Wang, Qingshan Li, Hua Chu, Shuai Zhang
article en

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 .

Expert Systems with ApplicationsVol. 300
Xidian University (CN)
Openalex Percentile: Top 84%
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.