AIPLOct 24, 2024

PDL: A Declarative Prompt Programming Language

arXiv:2410.19135v111 citationsh-index: 31
Originality Synthesis-oriented
AI Analysis

This addresses the problem of making LLM application development more accessible and robust for developers, though it is incremental as it builds on existing prompting frameworks.

The paper tackles the brittleness of LLM-based applications due to unstructured text prompts by introducing the Prompt Declaration Language (PDL), a simple declarative language based on YAML that simplifies prompt programming and supports common use-cases like chatbots and RAG.

Large language models (LLMs) have taken the world by storm by making many previously difficult uses of AI feasible. LLMs are controlled via highly expressive textual prompts and return textual answers. Unfortunately, this unstructured text as input and output makes LLM-based applications brittle. This motivates the rise of prompting frameworks, which mediate between LLMs and the external world. However, existing prompting frameworks either have a high learning curve or take away control over the exact prompts from the developer. To overcome this dilemma, this paper introduces the Prompt Declaration Language (PDL). PDL is a simple declarative data-oriented language that puts prompts at the forefront, based on YAML. PDL works well with many LLM platforms and LLMs. It supports writing interactive applications that call LLMs and tools, and makes it easy to implement common use-cases such as chatbots, RAG, or agents. We hope PDL will make prompt programming simpler, less brittle, and more enjoyable.

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