Declarative and Programmatic LLM Frameworks

Parent: AI Agent Ecosystems · Published reference · snapshot 2026-09-08 · skill ai-agent-engineering

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

↓ Facts as markdownall context files

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

These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.

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

Where this helps

Project ideas

Common mistakes

Known issues

Children

Frontier under this node: App-level structured output (strict mode, function-calling-as-extraction, validate+reask), Compiled/optimized prompting (DSPy signatures/modules/compile), Constrained generation/decoding (Outlines FSM, Guidance token-healing, LMQL), Schema-first typed LLM functions (BAML + Schema-Aligned Parsing, codegen), Test-driven & versioned prompting, Type/validation structured-output libs (Instructor, Pydantic AI, Mirascope), When-declarative-wins decision & anti-patterns

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