ACL 2025long0 citations

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

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 representative scenarios including Chain-of-Thought with self-consistency (CoT-SC) and ReAct tool-use agent. We further use LLMs to judge the language design between APPL and previous work, where the results indicate that codes written in APPL are more readable and intuitive. Our code, tutorial and documentation are available at https://github.com/appl-team/appl.

BibTeX
@inproceedings{dong-etal-2025-appl,
    title = "{APPL}: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts",
    author = "Dong, Honghua  and
      Su, Qidong  and
      Gao, Yubo  and
      Li, Zhaoyu  and
      Ruan, Yangjun  and
      Pekhimenko, Gennady  and
      Maddison, Chris J.  and
      Si, Xujie",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.63/",
    doi = "10.18653/v1/2025.acl-long.63",
    pages = "1243--1266",
    ISBN = "979-8-89176-251-0"
}
APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts · ACL 2025