AutoPDL
AutoPDL asks a different question from most prompt optimizers: not just how to word a prompt, but which prompting pattern to use in the first place. It treats agent prompt design as an automated-machine-learning search over patterns like zero-shot, chain-of-thought, and ReAct, together with the choice of examples, and uses successive halving to find a strong combination. The result is not a black box but a readable, editable program you can inspect and adjust.
*These are learning tools, not prompts. They teach you to write your own, think of them as training wheels that guide you while you learn, then fall away once you can ride on your own.
Choose the Pattern, Not Just the Words
Most prompt optimizers assume the shape of the prompt is fixed and only search over its wording or its examples. But for agents, one of the biggest decisions is structural: should this task use a plain zero-shot prompt, a chain-of-thought, a ReAct loop that interleaves reasoning and tools, or a plan-then-work structure? The right pattern depends on the task and the model, and guessing wrong caps how well any wording can do.
AutoPDL frames this as an automated-machine-learning problem. It defines a combinatorial search space that includes several prompting patterns and the choice of demonstrations, then searches that space for the best configuration for a given task and model. Because the space is large, it uses successive halving, a standard AutoML method that gives every configuration a little budget, keeps the top performers, and gives them more, quickly concentrating effort on the best candidates.
What AutoPDL emits is as important as how it searches. Instead of an opaque tuned string, it produces a human-readable program in a prompt declaration language, so the discovered pattern and examples can be read, understood, and edited by a person. Optimization becomes source-to-source: you get a transparent artifact, not a mystery prompt.
AutoPDL's output is a program in a prompt declaration language that spells out the chosen pattern and demonstrations in a form a person can read and change. So the optimization is auditable: you can see exactly which structure won and adjust it, rather than trusting an opaque tuned string.
The AutoPDL Process
Define the space, search with successive halving, and emit a program
Define the Search Space
Lay out the choices to search over: which prompting patterns are allowed, such as zero-shot, chain-of-thought, and a reason-and-act loop, and which demonstrations can be included. This turns prompt design into a structured configuration problem.
For a tool-using agent, the space includes a plain prompt, a chain-of-thought variant, and a ReAct loop, each with different example sets.
Search With Successive Halving
Give every configuration a small evaluation budget, keep the top fraction, and give the survivors a larger budget, repeating until one remains. This AutoML method finds strong configurations without fully evaluating every option.
Weak pattern-and-example combinations are eliminated after a light test, while promising ones earn deeper evaluation.
Select the Best Configuration
The configuration that survives the search, a specific pattern paired with specific demonstrations, is chosen as the best fit for this task and model. The structural decision and the example choice are made together.
The ReAct loop with three well-chosen examples wins for the tool-using agent, beating the plainer patterns.
Emit an Editable Program
AutoPDL writes the winning configuration as a readable program in a prompt declaration language. A person can inspect the chosen pattern and examples, understand why the agent is structured that way, and edit it directly.
The output shows the ReAct structure and its examples in plain form, ready to review and tweak before deployment.
See the Difference
Tuning words in a fixed shape versus searching the shape itself
Fixed-Pattern Optimizer
The prompting pattern is decided by hand up front, and the optimizer only tunes the wording or examples within that fixed structure.
If the chosen pattern is a poor fit for the task, no amount of wording tuning reaches what a better structure would allow.
AutoPDL
AutoPDL searches over prompting patterns and examples together with successive halving, choosing the structure as well as the content.
It finds the pattern that actually fits the task and model, and emits it as a readable, editable program.
Practice Responsible AI
Always verify AI-generated content before use. AI systems can produce confident but incorrect responses. When using AI professionally, transparent disclosure is both best practice and increasingly a legal requirement.
Most US states are actively legislating AI transparency and accountability. Critical thinking remains your strongest tool against misinformation.
AutoPDL in Action
See how searching the pattern space changes the result
One task is simple lookup; another needs multi-step tool use.
Lookup task: the search finds that a plain zero-shot prompt wins, since reasoning steps add cost without accuracy.
Tool-use task: the search finds that a reason-and-act loop wins, because interleaving thought and tool calls is what the task needs.
Result: each task gets the structure that fits it, chosen automatically rather than guessed.
Dozens of pattern-and-example combinations are possible for one agent.
Round one: every configuration gets a small test; the bottom half is dropped.
Later rounds: survivors get progressively more budget, concentrating evaluation on the best combinations.
Result: a strong configuration is found without fully evaluating every option.
AutoPDL emits the winning configuration as a program in a prompt declaration language.
A developer opens the program, sees that a chain-of-thought pattern with two examples was chosen, and understands why.
Edit: they swap one example for a clearer one and redeploy, an adjustment an opaque tuned string would not have allowed.
When to Use AutoPDL
Best when the prompting pattern itself is worth optimizing
Perfect For
Agents can be built with very different structures, so searching over patterns like zero-shot, chain-of-thought, and reason-and-act loops has real payoff.
When it is not obvious whether a task needs reasoning steps or tool use, letting the search decide beats guessing the structure by hand.
When you need to inspect and edit the result, the readable program output keeps the optimized prompt transparent rather than opaque.
Because the best pattern varies by task and model, an automatic search adapts the structure to each setting instead of assuming one fits all.
Skip It When
If the right structure is already clear, searching over patterns adds overhead, and a wording-only optimizer is simpler.
Successive halving needs a way to score configurations; without examples or a metric, the search has nothing to rank by.
For a basic one-shot task with no agentic structure to choose, the pattern search offers little over direct prompting.
Use Cases
Where AutoPDL delivers the most value
Agent Design
Automatically choose the prompting pattern and examples that make a tool-using agent perform best on its task, rather than fixing the structure by hand.
Transparent Prompt Programs
Produce optimized prompts as readable programs that a team can review, version, and edit, keeping the pattern choice out in the open.
Adapting to a New Model
Re-run the search when switching models, since the best prompting pattern can shift with model size and capability.
Benchmarking Agent Setups
Compare prompting patterns fairly on a task by letting successive halving allocate budget to the most promising configurations.
AutoML for Prompting
Bring established automated-machine-learning search methods to the design of prompts and agent structures, not just model hyperparameters.
Editable Starting Points
Use the emitted program as a strong, transparent baseline that developers can refine by hand rather than starting from scratch.
Where AutoPDL Fits
The pattern-searching, program-emitting optimizer
Where MIPRO optimizes instructions and demonstrations within a set structure, AutoPDL also searches which agent pattern to use, and it emits an editable program. Reach for it when the structural choice, zero-shot versus chain-of-thought versus a reason-and-act loop, is itself in question.
Related Techniques
Explore complementary optimization and agent techniques
Search for the Right Structure
Explore how different prompting patterns suit different tasks in the Prompt Builder, or see how AutoPDL relates to the wider family of prompt optimizers.