VibeHunt
Back to browse

PDL

Declarative language for creating reliable, composable LLM prompts

Visit

The Prompt Declaration Language (PDL) is a declarative, YAML‑based syntax for defining the structure of data that an LLM should generate. By describing the expected output shape, PDL lets developers validate and enforce prompt formats, enabling reliable composition of LLM calls with rule‑based components. It abstracts chat templates and accumulates messages automatically, reducing boilerplate when interacting with language models.

PDL supports integration with any LLM reachable through LiteLLM, including remote services such as IBM’s watsonx and the Granite IO Processor framework. Its language features include variables, conditionals, loops, functions, file and stdin reading, JSON handling, and the ability to invoke external Python code or REST APIs. Type checking of model inputs and outputs facilitates structured decoding, and a Python SDK offers programmatic access to chat APIs and templates.

A visual Live Explorer tool allows users to trace execution and debug programs in real time. The interpreter runs PDL scripts to orchestrate model calls, tool execution, and data generation tasks such as inference, synthesis, or training data creation, providing a unified framework for reliable, composable LLM workflows.

Reviews

Sign in to leave a review.

Loading reviews…

Similar apps