Declarative & Programmatic LLM Frameworks ("Prompt-as-Program", 2024-2026)

Parent: Global AI Hub Research Corpus · researched 2026-05-31· 1 source · 0 concepts

A class of frameworks that emerged in 2023-2024 and matured through 2026 reframes prompting as a software-engineering discipline rather than string authoring. The unifying thesis: don't write prompt s

Overview

1. Prompt-as-program / "compile, don't write"

2. Signatures (declarative I/O specs)

3. Typed LLM functions (schema-first)

4. Modules / prompting strategies as composable units

5. Compilation + optimizers/teleprompters

6. Constrained generation / decoding

7. Token healing

8. Validation + auto-retry/reask

DSPy (Stanford NLP → Databricks) — the compiled-prompting reference

BAML (BoundaryML) — schema-first typed LLM functions in a DSL

LMQL (ETH Zürich) — constrained query language

Guidance (Microsoft) — constrained generation + token healing

Outlines (.txt) — FSM-based structured generation

Instructor — typed structured output, minimal abstraction

Pydantic AI — official Pydantic agent framework

Marvin, Mirascope, Ell — function-based / decorator prompting

App-level structured output (the substrate)

Practical Patterns

Anti-Patterns

Major Sub-Concepts (candidate child concepts)

Knowledge Gaps / Contested Areas

Sources

Methodology

Children

← the whole tree · 3D view· how to read this page