AICLLGPLJun 19, 2024

APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts

arXiv:2406.13161v16 citations
Originality Incremental advance
AI Analysis

This addresses the problem of implementing and maintaining complex LLM workflows for developers, though it appears incremental as a language tool for existing methods.

The authors tackled the challenge of complex workflows involving Large Language Models (LLMs) by proposing APPL, a prompt programming language that integrates prompts into Python functions, demonstrating its efficiency with significant speedup ratios in parallelizable workflows.

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 multi-agent chat. Experiments on three parallelizable workflows further show that APPL can effectively parallelize independent LLM calls, with a significant speedup ratio that almost matches the estimation.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes