SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.05234 · ICML · 2026

PPDL: LLM-Based Flows as Probabilistic Programs

Martin Hirzel, Mandana Vaziri, Louis Mandel, Guillaume Baudart

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2608.05234.json · badge: /api/ran/2608.05234.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
IBM/prompt-declaration-language canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
dump_yaml Ran
ran; our contract draft was wrong, not the code
IBM/prompt-declaration-language/src/pdl/pdl_dumper.py
code served (permissive licence) · get_code("1aa1ba74b802c978")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import yaml

# Construct valid arguments for dump_yaml
data = {
    "model": "test_model",
    "layers": [1, 2, 3],
    "config": {
        "learning_rate": 0.001,
        "batch_size": 32,
        "epochs": 100
    },
    "metrics": {
        "accuracy": 0.95,
        "loss": 0.05
    }
}

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
dumps_json Ran
ran; our contract draft was wrong, not the code
IBM/prompt-declaration-language/src/pdl/pdl_dumper.py
code served (permissive licence) · get_code("2bfc35e0cf898db4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import torch
import numpy as np

torch.manual_seed(0)

# The function dumps_json takes data as the first positional argument
# and **kwargs which are passed to json.dumps
# json.dumps serializes data to a JSON string
# It accepts various keyword arguments like indent, sort_keys, etc.

# Create sample data that is JSON-serializable
sample_data = {
    "name": "test",
    "values": [1, 2, 3, 4],
    "nested": {
        "key": "value",
        "number": 42
    },
    "float_val": 3.14,
    "bool_val": True,
    "null_val": None
}

ARGS = {
    "data": sample_data,
    "indent": 2,
    "sort_keys": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
lazy_apply Ran
ran; our contract draft was wrong, not the code
IBM/prompt-declaration-language/src/pdl/pdl_lazy.py
code served (permissive licence) · get_code("915529b25fb5a14e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PdlApply. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from typing import Callable

torch.manual_seed(0)

class SimpleLazyValue:
    """A simple PdlLazy implementation that wraps a value."""
    def __init__(self, value):
        self._value = value
    
    def result(self):
        return self._value
    
    @property
    def data(self):
        return self._value

# Create a simple input lazy value
input_tensor = torch.randn(2, 4)
lazy_input = SimpleLazyValue(input_tensor)

# Create a simple function that takes a tensor and returns a transformed tensor
def simple_transform(x):
    return x * 2 + 1

ARGS = {
    'f': simple_transform,
    'x': lazy_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PdlApply — a PdlApply output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PdlApply output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
lazy_apply2 Ran
ran; our contract draft was wrong, not the code
IBM/prompt-declaration-language/src/pdl/pdl_lazy.py
code served (permissive licence) · get_code("5d2d1424c5eb4549")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PdlApply2. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Any

torch.manual_seed(0)

# Create a concrete implementation of PdlLazy for testing
class SimpleLazy:
    def __init__(self, value):
        self._value = value
    
    def result(self):
        if isinstance(self._value, SimpleLazy):
            return self._value.result()
        return self._value
    
    @property
    def data(self):
        return self._value

# Define a simple function that takes two inputs and returns output
def add_tensors(x1, x2):
    """Simple function that adds two tensors"""
    return x1 + x2

# Create lazy inputs with distinct tensor shapes
x1_value = torch.randn(2, 4)  # 2x4 tensor
x2_value = torch.randn(2, 3)  # 2x3 tensor - different dim to be distinct

# Create PdlLazy objects wrapping the values
x1_lazy = SimpleLazy(x1_value)
x2_lazy = SimpleLazy(x2_value)

# For the function to work, we need tensors of compatible shapes
# Let's use same shapes that can be added
x1_value = torch.randn(2, 4)
x2_value = torch.randn(2, 4)

x1_lazy = SimpleLazy(x1_value)
x2_lazy = SimpleLazy(x2_value)

def multiply_tensors(a, b):
    """Function that multiplies two tensors element-wise"""
    return a * b

ARGS = {
    'f': multiply_tensors,
    'x1': x1_lazy,
    'x2': x2_lazy
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PdlApply2 — a PdlApply2 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PdlApply2 output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
repr_str Ran
ran; our contract draft was wrong, not the code
IBM/prompt-declaration-language/src/pdl/pdl_dumper.py
code served (permissive licence) · get_code("1e1119d41444e715")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import yaml

class StandInDumper:
    """Minimal YAML dumper stand-in with required methods"""
    def represent_scalar(self, tag, data, style=None):
        return f"{tag}:{data}"
    
    def org_represent_str(self, data):
        return f"str:{data}"

dumper = StandInDumper()
data_with_newline = "line1\nline2\nline3"

ARGS = {
    "dumper": dumper,
    "data": data_with_newline
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resample Not yet run
unverified (harvested, no recorded run)
IBM/prompt-declaration-language/src/pdl/pdl_inference.py
code served (permissive licence) · get_code("47bcbe278cdc5da4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Building reliable applications that leverage large language models (LLMs) remains a significant challenge. While LLMs offer impressive capabilities across diverse tasks, their outputs often lack accuracy and provide no clear measure of confidence. This uncertainty compounds in flows of multiple calls to LLMs and other tools, making it difficult for developers and end-users to trust the results. This paper introduces a probabilistic language for programming LLMbased flows. It enables developers to quantify and propagate uncertainty throughout the application's flow, and experiment with different inference scaling techniques without adding a single line of code beyond the flow's logic. We present an experimental study to demonstrate this capability, and a case study building a theorem proving agent for the Rocq theorem prover.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2608.05234")
get_code_for_paper("2608.05234")
have("2608.05234")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2608.05234.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2608.05234.svg)](https://syntology.ai/paper/2608.05234)

Connect an agent — have() is free.