Skip to content

Commit 7999405

Browse files
finitearthtimo282
andauthored
Chore/new release (#76)
* new read me * publications * contribution md * clean up * release notes * Update CONTRIBUTING.md Co-authored-by: Timo Heiß <87521684+timo282@users.noreply.github.com> * change version * Update coverage badge in README [skip ci] --------- Co-authored-by: Timo Heiß <87521684+timo282@users.noreply.github.com> Co-authored-by: finitearth <finitearth@users.noreply.github.com>
1 parent 4962f03 commit 7999405

6 files changed

Lines changed: 97 additions & 32 deletions

File tree

.coverage

-92 KB
Binary file not shown.

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 🤝 Contributing to Promptolution
2+
3+
Thank you for your interest in contributing! Here's how to get started.
4+
5+
## Workflow
6+
7+
Open an issue → create a branch → PR → CI → review (by owner) → merge (by owner) → release (by owner)
8+
9+
Branch naming: `feature/...`, `fix/...`, `chore/...`, `refactor/...`.
10+
11+
## Code Quality
12+
13+
Please ensure to use pre-commit, which assists with keeping the code quality high:
14+
15+
```
16+
pre-commit install
17+
pre-commit run --all-files
18+
```
19+
20+
## Tests
21+
22+
We encourage every contributor to also write tests that automatically check if the implementation works as expected:
23+
24+
```
25+
poetry run python -m coverage run -m pytest
26+
poetry run python -m coverage report -i
27+
```

README.md

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
![Coverage](https://img.shields.io/badge/Coverage-96%25-brightgreen)
33
[![CI](https://github.com/automl/promptolution/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/automl/promptolution/actions/workflows/ci.yml)
44
[![Docs](https://github.com/automl/promptolution/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/automl/promptolution/actions/workflows/docs.yml)
5+
[![PyPI version](https://img.shields.io/pypi/v/promptolution.svg)](https://pypi.org/project/promptolution/)
56
![Code Style](https://img.shields.io/badge/Code%20Style-black-black)
6-
![Python Versions](https://img.shields.io/badge/Python%20Versions-≥3.10-blue)
7+
![Python Versions](https://img.shields.io/badge/Python%20Versions-%E2%89%A53.10-blue)
78
[![Getting Started](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/automl/promptolution/blob/main/tutorials/getting_started.ipynb)
89

910
![promptolution](https://github.com/user-attachments/assets/84c050bd-61a1-4f2e-bc4e-874d9b4a69af)
@@ -31,33 +32,46 @@
3132

3233
Have a look at our [Release Notes](https://automl.github.io/promptolution/release-notes/) for the latest updates to promptolution.
3334

34-
## 📦 Installation
35+
## 📚 Scientific Publications Powered by Promptolution
3536

36-
```
37-
pip install promptolution[api]
38-
```
37+
- **CANTANTE: Optimizing Agentic Systems via Contrastive Credit Attribution** — Zehle, 2026. [arXiv](https://arxiv.org/abs/2605.13295)
38+
- **MO-CAPO: Multi-Objective Cost-Aware Prompt Optimization** — Büssing et al., 2026. [arXiv](https://arxiv.org/abs/2605.18869)
39+
- **promptolution: A Unified, Modular Framework for Prompt Optimization** — Zehle et al., 2026. [EACL 2026](https://aclanthology.org/2026.eacl-demo.21/)
40+
- **Can Calibration of Positional Encodings Enhance Long Context Utilization?** — Zehle & Aßenmacher, 2026. [EACL 2026](https://aclanthology.org/2026.findings-eacl.120/)
41+
- **Disambiguation-Centric Finetuning Makes Enterprise Tool-Calling LLMs More Realistic and Less Risky** — Hathidara et al., 2025. [arXiv](https://arxiv.org/abs/2507.03336)
42+
- **CAPO: Cost-Aware Prompt Optimization** — Zehle et al., 2025. [AutoML 2025](https://proceedings.mlr.press/v293/zehle25a.html)
3943

40-
Local inference via vLLM or transformers:
44+
## 🔧 Installation and Quickstart
4145

4246
```
43-
pip install promptolution[vllm,transformers]
47+
pip install promptolution[api]
4448
```
4549

46-
From source:
50+
For local inference, add `[transformers]` (HuggingFace) or `[vllm]` (vLLM serving), or both.
4751

48-
```
49-
git clone https://github.com/automl/promptolution.git
50-
cd promptolution
51-
poetry install
52-
```
52+
```python
53+
import pandas as pd
54+
from promptolution.utils import ExperimentConfig
55+
from promptolution.helpers import run_experiment
56+
57+
# DataFrame with columns "x" (input) and "y" (label)
58+
df = pd.read_csv("your_data.csv")
5359

54-
## 🔧 Quickstart
60+
config = ExperimentConfig(
61+
optimizer="capo",
62+
task_description="Classify each sentence as subjective or objective.",
63+
prompts=["Classify the text as objective or subjective."],
64+
n_steps=10,
65+
api_url="https://api.openai.com/v1",
66+
model_id="gpt-4o-mini",
67+
api_key="YOUR_API_KEY",
68+
)
5569

56-
Start with the **Getting Started tutorial**:
57-
[https://github.com/automl/promptolution/blob/main/tutorials/getting_started.ipynb](https://github.com/automl/promptolution/blob/main/tutorials/getting_started.ipynb)
70+
best_prompts = run_experiment(df, config)
71+
print(best_prompts)
72+
```
5873

59-
Full docs:
60-
[https://automl.github.io/promptolution/](https://automl.github.io/promptolution/)
74+
Full tutorial: [Getting Started notebook](https://github.com/automl/promptolution/blob/main/tutorials/getting_started.ipynb) · [Docs](https://automl.github.io/promptolution/)
6175

6276

6377
## 🧠 Featured Optimizers
@@ -69,6 +83,7 @@ Full docs:
6983
| `EvoPromptGA` | [Guo et al., 2023](https://openreview.net/forum?id=ZG3RaNIsO8) | required | 👍 | 💲💲 |||
7084
| `OPRO` | [Yang et al., 2023](https://openreview.net/forum?id=Bb4VGOWELI) | optional | 👎 | 💲💲 |||
7185

86+
7287
## 🏗 Components
7388

7489
* **`Task`** – Manages the dataset, evaluation metrics, and subsampling.
@@ -79,20 +94,23 @@ Full docs:
7994

8095
## 🤝 Contributing
8196

82-
Open an issue → create a branch → PR → CI → review → merge.
83-
Branch naming: `feature/...`, `fix/...`, `chore/...`, `refactor/...`.
97+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the workflow, code quality guidelines, and how to run tests.
8498

85-
Please ensure to use pre-commit, which assists with keeping the code quality high:
8699

87-
```
88-
pre-commit install
89-
pre-commit run --all-files
90-
```
91-
We encourage every contributor to also write tests, that automatically check if the implementation works as expected:
100+
## 📄 Citation
92101

102+
If you use Promptolution in your research, please cite:
103+
104+
```bibtex
105+
@inproceedings{zehle2026promptolution,
106+
title={promptolution: A unified, modular framework for prompt optimization},
107+
author={Zehle, Tom and Hei{\ss}, Timo and Schlager, Moritz and A{\ss}enmacher, Matthias and Feurer, Matthias},
108+
booktitle={Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 3: System Demonstrations)},
109+
pages={282--296},
110+
year={2026}
111+
}
93112
```
94-
poetry run python -m coverage run -m pytest
95-
poetry run python -m coverage report -i
96-
```
97113

98-
Developed by **Timo Heiß**, **Moritz Schlager**, and **Tom Zehle** (LMU Munich, MCML, ELLIS, TUM, Uni Freiburg).
114+
---
115+
116+
Developed by **Timo Heiß**, **Moritz Schlager**, **Tom Zehle**, and **Henri Oberpaur** (LMU Munich, MCML, ELLIS, TUM, Uni Freiburg).

docs/release-notes/v2.2.3.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Release v2.2.3
2+
### What's changed
3+
4+
#### Bug fixes:
5+
* Fixed list handling in local LLM response parsing — single-prompt batches were not unwrapped correctly
6+
* Fixed chat template handling for local LLMs (#72)
7+
* Fixed `ExperimentConfig` not being applied before resolving `x_column` in tasks (#68)
8+
* Fixed keyword handling in `RandomSearchSelector.select_exemplars` (#70)
9+
* Fixed various typos
10+
11+
#### Further changes:
12+
* Added `CONTRIBUTING.md` with workflow, code quality, and testing guidelines
13+
* Added `accelerate` as a dependency of the `[transformers]` extra, enabling local inference without manual installation
14+
* Overhauled README: added quickstart code example, PyPI badge, installation guide, scientific publications section, and citation block
15+
* New tests now account for 96% test coverage
16+
17+
**Full Changelog**: [here](https://github.com/automl/promptolution/compare/v2.2.2...v2.2.3)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ nav:
4747
- Home: index.md
4848
- Release Notes:
4949
- Overview: release-notes.md
50+
- v2.2.3: release-notes/v2.2.3.md
5051
- v2.2.2: release-notes/v2.2.2.md
5152
- v2.2.1: release-notes/v2.2.1.md
5253
- v2.2.0: release-notes/v2.2.0.md

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "promptolution"
3-
version = "2.2.2"
3+
version = "2.2.3"
44
description = "A framework for prompt optimization and a zoo of prompt optimization algorithms."
55
authors = ["Tom Zehle, Moritz Schlager, Timo Heiß"]
66
readme = "README.md"
@@ -16,12 +16,13 @@ openai = {version = ">=1.0.0", optional = true}
1616
requests = {version = ">=2.31.0", optional = true}
1717
vllm = {version = ">=0.13.0", optional = true}
1818
transformers = {version = ">=4.48.0", optional = true}
19+
accelerate = {version = ">=0.20.0", optional = true}
1920
scipy = ">=1.15"
2021

2122
[tool.poetry.extras]
2223
api = ["openai", "requests"]
2324
vllm = ["vllm"]
24-
transformers = ["transformers"]
25+
transformers = ["transformers", "accelerate"]
2526

2627
[tool.poetry.group.api]
2728
optional = true
@@ -38,6 +39,7 @@ vllm = ">=0.13.0"
3839
optional = true
3940
[tool.poetry.group.transformers.dependencies]
4041
transformers = ">=4.48.0"
42+
accelerate = ">=0.20.0"
4143

4244
[tool.poetry.group.dev.dependencies]
4345
black = ">=24.4.2"

0 commit comments

Comments
 (0)