APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts
Honghua Dong, Qidong Su, Yubo Gao, Zhaoyu Li, Yangjun Ruan, Gennady, Pekhimenko, Chris J. Maddison, Xujie Si

TL;DR
APPL is a new prompt programming language that seamlessly integrates prompts with Python, enabling efficient, parallel, and maintainable workflows involving large language models and external tools.
Contribution
It introduces APPL, a Python-native language for embedding prompts into code, with features like asynchronous execution and failure diagnosis, improving LLM workflow implementation.
Findings
APPL enables concise and intuitive prompt-programming workflows.
It achieves near-linear speedup in parallel LLM call scenarios.
APPL demonstrates effectiveness in three representative LLM application scenarios.
Abstract
Large Language Models (LLMs) have become increasingly capable of handling diverse tasks with the aid of well-crafted prompts and integration of external tools, but as task complexity rises, the workflow involving LLMs can be complicated and thus challenging to implement and maintain. To address this challenge, we propose APPL, A Prompt Programming Language that acts as a bridge between computer programs and LLMs, allowing seamless embedding of prompts into Python functions, and vice versa. APPL provides an intuitive and Python-native syntax, an efficient parallelized runtime with asynchronous semantics, and a tracing module supporting effective failure diagnosis and replaying without extra costs. We demonstrate that APPL programs are intuitive, concise, and efficient through three representative scenarios: Chain-of-Thought with self-consistency (CoT-SC), ReAct tool use agent, and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Parallel Computing and Optimization Techniques · Embedded Systems Design Techniques
