The Research Report
Promptolution: One Framework to Optimize Them All
The prompt optimization space is a mess. Researchers publish new methods. Each one comes with its own code, its own assumptions, its own integration headaches. If you want to compare OPRO against EvoPrompt against CAPO, you are rewriting boilerplate for every experiment.
Promptolution fixes that. It is a unified, modular Python framework that brings together the major discrete prompt optimization methods under a single API. The paper just appeared at EACL 2026 as a system demo. The repo has 132 GitHub stars and an Apache 2.0 license.
What Promptolution Actually Does
Promptolution gives you four pluggable components. You swap them in as needed.
Task handles your dataset, evaluation metrics, and subsampling. It wraps your data so the optimizer never touches raw files directly.
Predictor extracts answers from LLM responses. Different tasks need different extraction logic. You plug in the right predictor and move on.
LLM is a unified interface for inference. It works with API-based models like GPT-4o, local HuggingFace models, and vLLM clusters. Token counting and concurrency are built in.
Optimizer is where the actual algorithms live. CAPO, EvoPromptDE, EvoPromptGA, OPRO. You pick the method and configure it through ExperimentConfig.
The Benchmark Comparison Table Says a Lot
The README includes a direct comparison of included optimizers. This kind of table does not exist anywhere else in the prompt optimization literature.
| Optimizer | Few-shot Support | Exploration Style | Cost | Parallelizable |
|---|---|---|---|---|
| CAPO | Yes | Directed | Low | Yes |
| EvoPromptDE | No | Evolutionary | High | Yes |
| EvoPromptGA | No | Evolutionary | High | Yes |
| OPRO | No | Prompt-guided | High | No |
CAPO, developed by the same group, wins on cost and parallelizability. OPRO, from Google DeepMind, cannot parallelize because it uses prior generations to guide the next step. The table makes these tradeoffs visible in a way that scattered research papers never do.
How It Differs from DSPy and TextGrad
DSPy and TextGrad are end-to-end programming models. DSPy compiles modules with learnable parameters into optimized pipelines. TextGrad treats LLM outputs as differentiable tensors for gradient-based tuning.
Promptolution is narrower and more focused. It does one thing: optimize discrete text prompts. It does not compile modules, it does not backpropagate through model weights, and it does not require you to restructure your application around its abstractions.
The output is a plain text string. You take that string and use it wherever you want. The framework stays out of your pipeline.
This makes it a better fit for researchers running systematic comparisons and practitioners who already have working systems and want to tune prompts without rewriting code.
Quick Setup
Install the API backend variant:
pip install promptolution[api]
For local inference, add transformers or vLLM support:
pip install promptolution[transformers]
pip install promptolution[vllm]
Basic usage with a CSV dataset:
import pandas as pd
from promptolution.utils import ExperimentConfig
from promptolution.helpers import run_experiment
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)
That is the entire workflow. The framework handles caching, parallel inference, logging, and token tracking.
The Reproducibility Problem It Solves
Prompt optimization papers routinely claim state-of-the-art results. But their code is often a one-off research prototype. Dependencies shift. Hyperparameters get tuned on specific models. Comparison baselines are implemented inconsistently.
Promptolution sidesteps this by providing canonical implementations of major optimizers. When you run CAPO versus OPRO, you are running the same code paths with the same defaults, not re-implemented variants that may behave differently.
This is exactly what the AutoML community learned decades ago. Shared benchmarks and shared code made progress measurable. Promptolution brings that culture to prompt tuning.
Who Should Care
Researchers who need to benchmark new prompt optimization methods against established baselines. Practitioners who want to tune prompts for production systems without adopting a full application framework. Students learning about prompt optimization who want working code instead of pseudocode.
The EACL 2026 demo paper is worth reading alongside the code. The authors are from the AutoML group at the ELLIS Institute in Tübingen, LMU Munich, and the University of Freiburg. They have been publishing prompt optimization papers for the past two years, and Promptolution is the system that ties their work together.
Install it, run the getting started notebook, and compare three optimizers on your task in an afternoon. That is the pitch, and it holds up.
Links
- Repo: github.com/automl/promptolution
- Paper: aclanthology.org/2026.eacl-demo.21
- Docs: automl.github.io/promptolution
- Getting Started: Google Colab notebook on GitHub