| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| PDL_universal.app.tar.gz | 2025-09-06 | 10.8 MB | |
| PDL_0.8.0_universal.dmg | 2025-09-06 | 10.8 MB | |
| PDL_0.8.0_amd64.AppImage | 2025-09-06 | 82.8 MB | |
| PDL-0.8.0-1.x86_64.rpm | 2025-09-06 | 6.4 MB | |
| PDL_0.8.0_amd64.deb | 2025-09-06 | 6.4 MB | |
| PDL-0.8.0-1.aarch64.rpm | 2025-09-06 | 6.4 MB | |
| PDL_0.8.0_aarch64.AppImage | 2025-09-06 | 80.8 MB | |
| PDL_0.8.0_arm64.deb | 2025-09-06 | 6.4 MB | |
| README.md | 2025-09-06 | 4.5 kB | |
| Version 0.8.0 source code.tar.gz | 2025-09-06 | 4.8 MB | |
| Version 0.8.0 source code.zip | 2025-09-06 | 5.2 MB | |
| Totals: 11 Items | 220.8 MB | 0 | |
New Features
The main changes in this release are:
- AutoPDL: automatic optimization of PDL programs
- Calling PDL functions from Jinja and Python
- Map/reduce block
AutoPDL: automatic optimization of PDL programs
Given a PDL program with some free variables, a search space for these free variable, a loss function, and a training set, you can optimize the PDL program using the pdl-optimize command. This allows to optimize any part of a PDL program such as the textual prompts, the few-shots examples, or the prompting patterns. This work is based on the paper AutoPDL: Automatic Prompt Optimization for LLM Agents. A new section of the manual is describing how to use the optimizer.
Calling PDL functions from Jinja and Python
It is now possible to call a function defined in PDL inside a Jinja expression or a Python code block. Here is an example where the function translate is called in the Jinja expression ${ translate("Hello", language="French") }:
description: Calling a PDL function from Jinja
defs:
translate:
function:
sentence: string
language: string
return:
lastOf:
- |
Translate the sentence '${ sentence }' to ${ language }.
Only give the result of the translation.
- model: ollama_chat/granite3.2:2b
text: |
The way to say hello in French is ${ translate("Hello", language="French") }.
Map/reduce block
Similar to the repeat loops, PDL now offers a map block. The difference with the repeat block is that the context is not accumulated between iterations, each iteration is executed with the same context. Here is an example of map block:
lastOf:
- "Hello, "
- for:
name: [Alice, Bob, Charlie]
map:
lastOf:
- my name is ${ name }
- model: ollama/granite3.2:2b
join:
as: array
What's Changed
- chore: Configure Renovate by @renovate[bot] in https://github.com/IBM/prompt-declaration-language/pull/944
- Dataset preprocessing scripts for AutoPDL by @claudiosv in https://github.com/IBM/prompt-declaration-language/pull/994
- fix: avoid side effects in PdlContext by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1054
- tests: update react example by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1001
- tests: update calc example to use
.signatureby @mandel in https://github.com/IBM/prompt-declaration-language/pull/1067 - fix: output streaming in case of fallback by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1071
- feat: make PDL functions callable as Python and jinja functions by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1070
- feat: allow unnamed arguments when calling a PDL function in Jinja by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1076
- feat: map/reduce by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1010
- refactor: refactor AST to generate simpler JSON Schema by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1079
- Fix for exception in optimizer by @vazirim in https://github.com/IBM/prompt-declaration-language/pull/1084
- docs: update tutorial by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1080
- Requirements implementation by @vazirim in https://github.com/IBM/prompt-declaration-language/pull/1097
- fix: update AST in the UI by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1100
- fix: ensure that
PazyApply.resultreturns a non-lazy value by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1101 - feat: parallel map reduce by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1102
- Fix for llm message post-processing by @vazirim in https://github.com/IBM/prompt-declaration-language/pull/1106
- AutoPDL Simplification by @claudiosv in https://github.com/IBM/prompt-declaration-language/pull/1088
- tests: map-based gsm8k by @mandel in https://github.com/IBM/prompt-declaration-language/pull/1107
- optimizer CLI and doc by @vazirim in https://github.com/IBM/prompt-declaration-language/pull/1151
Full Changelog: https://github.com/IBM/prompt-declaration-language/compare/v0.7.1...v0.8.0