PDL: A Declarative Prompt Programming Language
Authors:
Preprint
Abstract
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.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- Prompting Frameworks for Large Language Models: A SurveyACM Computing Surveys, 2026
- Codellm-Devkit: A Framework for Contextualizing Code LLMs with Program Analysis Insights2025
- Relational Programming with Foundational ModelsProceedings of the AAAI Conference on Artificial Intelligence, 2024
- Efficient Memory Management for Large Language Model Serving with PagedAttention2023
- Prompting Is Programming: A Query Language for Large Language ModelsProceedings of the ACM on Programming Languages, 2023
- Foundations of JSON Schema2016
- Links: Web Programming Without Tiers2007
- When and how to develop domain-specific languagesACM Computing Surveys, 2005
- Revised Report on the Algorithmic Language ALGOL 68ACM SIGPLAN Notices, 1977
- Recursive functions of symbolic expressions and their computation by machine, Part ICommunications of the ACM, 1960