The Research Report
Promptolution: The Open-Source Framework Making Prompt Optimization Accessible to Everyone
From scattered research repos to a unified, modular Python library — now peer-reviewed at EACL 2026
If you've ever spent an afternoon tweaking the wording of a prompt, only to watch your LLM's accuracy swing by 15 percentage points on what felt like a trivial rephrasing, you've experienced the central problem that promptolution was built to solve. Prompt sensitivity is real, it's measurable, and — until now — it's been solved in a deeply fragmented way: each research team publishes their own optimizer in their own repository, with their own dependencies, their own interfaces, and their own levels of abandonment.
Promptolution changes that. It's a unified, modular, open-source Python framework that gathers the most important discrete prompt optimizers under one roof, gives them a common API, and returns framework-agnostic prompt strings that slot into whatever LLM pipeline you're already running. The project just hit v2.2.3 on PyPI, earned 132 stars on GitHub (under the automl organization), and was formally published at EACL 2026 in the System Demonstrations track (pages 282–296, Rabat, Morocco).
Here's what you need to know — and why it matters.
The Problem Promptolution Solves
The EACL paper, authored by Tom Zehle (ELLIS Institute / University of Freiburg), Timo Heiß (LMU Munich / MCML), Moritz Schlager (TU Munich / MCML), Matthias Aßenmacher (LMU Munich / MCML), and Matthias Feurer (TU Dortmund / Lamarr Institute), puts it plainly:
"Although many research papers demonstrate [prompt optimization's] effectiveness, practical adoption is hindered because existing implementations are often tied to unmaintained, isolated research codebases or require invasive integration into application frameworks."
Before promptolution, if you wanted to compare three prompt optimization strategies — say, evolutionary search, gradient-free optimization, and cost-aware approaches — you'd be cloning three separate GitHub repos, installing three sets of conflicting Python dependencies, and writing three different evaluation pipelines. The result: most practitioners simply don't bother. They hand-craft prompts and call it a day.
This is especially problematic now that multi-agent systems are central to production AI. Each agent in a pipeline might need its own optimized prompt. Fine-tuning a model per agent is expensive and data-hungry; prompt optimization is the lightweight, black-box-compatible alternative. But only if the tooling exists to actually use it.
What Promptolution Actually Is
Promptolution is not an end-to-end application framework. It doesn't try to be your LLM serving layer, your RAG pipeline, or your agent orchestration engine. It does one thing and does it well: optimize the text of your prompts.
The framework provides:
- A zoo of pluggable prompt optimizers — CAPO, EvoPrompt, OPRO, and more, all under a single
BaseOptimizerinterface - A unified LLM backend — supports API-based models (OpenAI, Anthropic, etc.), local HuggingFace models via the
transformersextra, and vLLM serving clusters via thevllmextra - Built-in response caching and parallelized inference — saves money and time, both scarce resources when you're running hundreds of LLM evaluations per optimization step
- Detailed logging and token usage tracking — every optimization run produces granular data for post-hoc analysis and reproducibility
- Framework-agnostic output — the result is a plain prompt string, not some framework-specific object. Drop it into LangChain, DSPy, a raw
curlcall, or your custom pipeline
The Optimizer Zoo: What's Inside
One of promptolution's core value propositions is that it ships with implementations of several state-of-the-art discrete prompt optimizers. As of v2.2.3, the featured optimizers include:
| Optimizer | Paper | Key Characteristic |
|---|---|---|
| CAPO | Zehle et al., 2025 (AutoML) | Cost-aware; tracks token usage and balances quality vs. cost |
| EvoPrompt | Guo et al., 2023 | Evolutionary search using LLM as mutator |
| OPRO | Yang et al., 2023 | Optimization by PROmpting; gradient-free, LLM-driven |
| CANTANTE | Zehle, 2026 | Contrastive credit attribution for agentic systems |
| MO-CAPO | Büssing et al., 2026 | Multi-objective cost-aware optimization |
The modular design means adding a new optimizer is straightforward: subclass BaseOptimizer, implement the optimize method, and you're in the framework with access to all the shared infrastructure (caching, logging, LLM backends, evaluation).
Version 2.2.x: What's Changed Recently
The project has been shipping rapidly, with three minor releases in the 2.2 series:
v2.2.0
- Extended the
APILLMinterface to accept arbitrarykwargspassed through to the underlying API - Improved asynchronous parallelization of LLM calls, significantly shortening inference times
- Introduced a
Promptclass to encapsulate instructions and few-shot examples as a first-class object - Improved error handling and meta-prompt task-description infusion
v2.2.1
- Added a multi-objective task type — critical for scenarios where you want to optimize for both accuracy and cost simultaneously (this underpins the MO-CAPO optimizer)
- Made interfaces between components more seamless and robust
- Refactored the tutorial notebooks
- Improved robustness in handling both string and
Promptobjects throughout the codebase - Fixed edge cases in CAPO's block tracking and index subsampling
v2.2.2 → v2.2.3
- Further stabilized prompt handling (v2.2.2)
- v2.2.3 continues the stability march with additional robustness fixes
The clear trajectory: the team is tightening the Prompt object abstraction introduced in v2.2.0, ensuring that the transition from raw string prompts to structured Prompt objects is smooth across every optimizer and task type. This is the kind of unsexy but essential engineering that separates a research prototype from a production-usable library.
Code: Getting Started in Under 10 Lines
The simplest way to use promptolution is through the run_experiment helper:
import pandas as pd
from promptolution.utils import ExperimentConfig
from promptolution.helpers import run_experiment
# Your dataset: "x" = input text, "y" = label
df = pd.read_csv("your_data.csv")
config = ExperimentConfig(
optimizer="capo",
task_description="Classify each sentence as subjective or objective.",
prompts=["Classify the text as objective or subjective."],
n_steps=10,
api_url="https://api.openai.com/v1",
model_id="gpt-4o-mini",
api_key="YOUR_API_KEY",
)
best_prompts = run_experiment(df, config)
print(best_prompts)
Install with:
pip install promptolution[api]
For local inference, add the appropriate extras:
pip install promptolution[transformers] # HuggingFace local models
pip install promptolution[vllm] # vLLM serving cluster
Code: Using the Modular API Directly
For researchers who need fine-grained control, the component API is where promptolution shines. You compose LLMs, tasks, and optimizers explicitly:
from promptolution.llms import APILLM
from promptolution.tasks import ClassificationTask
from promptolution.optimizers import CAPO
# Set up the LLM backend
llm = APILLM(
api_url="https://api.openai.com/v1",
model_id="gpt-4o-mini",
api_key="YOUR_API_KEY",
)
# Define the task
task = ClassificationTask(
data=df, # DataFrame with "x" and "y" columns
task_description="Classify each sentence as subjective or objective.",
llm=llm,
)
# Configure and run the optimizer
optimizer = CAPO(
config=ExperimentConfig(n_steps=15),
llm=llm,
task=task,
initial_prompts=["Classify the text as objective or subjective."],
)
optimized_prompts = optimizer.optimize()
This composability is what makes promptolution genuinely useful for benchmarking. Swap CAPO for EvoPrompt or OPRO by changing a single line, keep everything else identical, and you get a fair, reproducible comparison.
Code: The Prompt Class (New in v2.2.0)
The Prompt class is a small but significant addition. It encapsulates both the instruction text and any few-shot examples, making it easier to manage complex prompts programmatically:
from promptolution.prompts import Prompt
# Create a structured prompt with instruction + examples
prompt = Prompt(
instruction="Classify the sentiment of the following review.",
examples=[
{"input": "Great product, loved it!", "output": "Positive"},
{"input": "Terrible experience, would not recommend.", "output": "Negative"},
]
)
# Pass it directly to optimizers — they handle Prompt objects natively
optimizer = CAPO(
config=ExperimentConfig(n_steps=10),
llm=llm,
task=task,
initial_prompts=[prompt], # Prompt object, not raw string
)
Before this, few-shot examples were typically managed as part of the raw prompt string, making them invisible to the optimizer's mutation logic. The Prompt class lets optimizers reason about instructions and examples separately, opening the door for exemplar-selection-aware optimization strategies.
Code: Multi-Objective Optimization (New in v2.2.1)
The multi-objective task type, introduced in v2.2.1, allows you to optimize prompts across several metrics simultaneously — for instance, maximizing accuracy while minimizing token cost:
from promptolution.tasks import MultiObjectiveTask
task = MultiObjectiveTask(
data=df,
task_description="Summarize the article in one sentence.",
llm=llm,
objectives=["accuracy", "token_cost"], # Pareto-optimize across both
)
optimizer = MOCAPO(
config=ExperimentConfig(n_steps=20),
llm=llm,
task=task,
initial_prompts=["Summarize the given article concisely."],
)
pareto_front = optimizer.optimize() # Returns a set of Pareto-optimal prompts
This is particularly relevant in production settings where you're paying per token and the difference between a 100-token and a 500-token prompt matters at scale.
The EACL 2026 Publication
The paper was published in the System Demonstrations track of the 19th Conference of the European Chapter of the Association for Computational Linguistics (EACL 2026), held March 24–29, 2026, in Rabat, Morocco. It spans pages 282–296 and carries DOI 10.18653/v1/2026.eacl-demo.21.
The demo track is the right venue for this work. The paper doesn't just describe an algorithm — it describes a system. It walks through the framework architecture, demonstrates the modular API, shows how to run single-task optimization and large-scale benchmarking, and discusses the design decisions that make promptolution extensible without being opinionated.
Notably, promptolution is already powering a growing body of follow-up research. The PyPI readme lists six publications that use the framework, including CANTANTE (contrastive credit attribution for agentic systems), MO-CAPO (multi-objective cost-aware prompt optimization), and work on calibration of positional encodings — suggesting that the library is becoming a shared infrastructure layer for the German AutoML/NLP research community.
How Promptolution Compares
The paper explicitly positions promptolution against two categories of alternatives:
Commercial/closed-source tools (Amazon Bedrock prompt optimization, Anthropic's prompt generator, Jina AI's prompt perfection) — these are black boxes. You can't inspect the algorithm, you can't modify it, and you can't benchmark it against alternatives.
Single-optimizer open-source libraries (DSPy, Adalflow, individual research repos) — DSPy, the most prominent comparison point, is an end-to-end framework that tightly couples prompt optimization with its own programming model. If you're already in DSPy's ecosystem, great. If you just want optimized prompt strings to plug into your existing pipeline, promptolution's framework-agnostic approach is cleaner.
The key differentiator: promptolution returns plain text strings. No framework lock-in. No custom objects that only work inside one ecosystem. You get a better prompt, and you use it however you want.
Community and Momentum
With 132 GitHub stars, 13 forks, and only 2 open issues, the project is in a healthy early-growth phase. The codebase has 96% test coverage (per the badge), the documentation site is live at automl.github.io/promptolution, and there's a Google Colab notebook for instant experimentation. The project is Apache 2.0 licensed.
PyPI download numbers are modest but growing (~20/day recently), which is typical for a domain-specific research tool that's found its niche rather than chasing mass adoption. The important metric is the number of papers building on top of it — and that list is growing.
Why This Matters
Prompt optimization is one of those ideas that everyone agrees is important in theory but few people do in practice, because the tooling has been terrible. Promptolution is building the missing infrastructure. It's not trying to be the next LangChain or the next DSPy — it's trying to be the scikit-learn of prompt optimization: a focused, well-tested, composable library that does one thing and interoperates with everything.
If you're running LLMs in production and not optimizing your prompts systematically, you're leaving performance and money on the table. Promptolution makes it feasible to fix that.
Links:
- GitHub: github.com/automl/promptolution
- PyPI: pypi.org/project/promptolution
- Docs: automl.github.io/promptolution
- Paper: aclanthology.org/2026.eacl-demo.21
- ArXiv preprint: arxiv.org/abs/2512.02840
- Tutorial notebook: Google Colab