Skip to content

Commit 3fde9bd

Browse files
authored
first draft for read me
1 parent a44bc48 commit 3fde9bd

File tree

1 file changed

+73
-56
lines changed

1 file changed

+73
-56
lines changed

README.md

Lines changed: 73 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
![promptolution](https://github.com/user-attachments/assets/84c050bd-61a1-4f2e-bc4e-874d9b4a69af)
21

32
![Coverage](https://img.shields.io/badge/Coverage-91%25-brightgreen)
43
[![CI](https://github.com/finitearth/promptolution/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/finitearth/promptolution/actions/workflows/ci.yml)
@@ -7,104 +6,122 @@
76
![Python Versions](https://img.shields.io/badge/Python%20Versions-≥3.10-blue)
87
[![Getting Started](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/finitearth/promptolution/blob/main/tutorials/getting_started.ipynb)
98

10-
Promptolution is a library that provides a modular and extensible framework for implementing prompt tuning for single tasks and larger experiments. It offers a user-friendly interface to assemble the core components for various prompt optimization tasks.
9+
![promptolution](https://github.com/user-attachments/assets/84c050bd-61a1-4f2e-bc4e-874d9b4a69af)
10+
11+
12+
13+
<p align="center">
14+
<img src="https://mcml.ai/images/MCML_Logo_cropped.jpg" height="45">
15+
<img src="https://github.com/user-attachments/assets/1ae42b4a-163e-43ed-b691-c253d4f4c814" height="45">
16+
<img src="https://github.com/user-attachments/assets/e70ec1d4-bbc4-4ff3-8803-8806bc879bb0" height="45"/>
17+
<img src="https://mcml.ai/images/footer/lmu_white.webp" height="45">
18+
<img src="https://mcml.ai/images/footer/tum_white.webp" height="45">
19+
</p>
20+
21+
1122

12-
This project was developed by [Timo Heiß](https://www.linkedin.com/in/timo-heiss/), [Moritz Schlager](https://www.linkedin.com/in/moritz-schlager/) and [Tom Zehle](https://www.linkedin.com/in/tom-zehle/) as part of a study program at LMU Munich.
23+
## 🚀 What is Promptolution?
1324

14-
## Installation
25+
**Promptolution** is a modular framework for *serious* prompt optimization — built for researchers who want full control over optimizers, datasets, evaluation, and logging.
26+
Unlike end-to-end agent frameworks (DSPy, LangGraph…), Promptolution focuses **exclusively** on the prompt optimization phase, with clean abstractions, transparent internals, and an extensible API.
1527

16-
Use pip to install our library:
28+
It supports:
29+
30+
* single-task prompt optimization
31+
* large-scale experiments
32+
* local + API-based LLMs
33+
* fast parallelization
34+
* clean logs for reproducible research
35+
36+
Developed by **Timo Heiß**, **Moritz Schlager**, and **Tom Zehle** (LMU Munich, MCML, ELLIS, TUM, Uni Freiburg).
37+
38+
39+
40+
## 📦 Installation
1741

1842
```
1943
pip install promptolution[api]
2044
```
2145

22-
If you want to run your prompt optimization locally, either via transformers or vLLM, consider running:
46+
Local inference via vLLM or transformers:
2347

2448
```
2549
pip install promptolution[vllm,transformers]
2650
```
2751

28-
Alternatively, clone the repository, run
52+
From source:
2953

3054
```
55+
git clone https://github.com/finitearth/promptolution.git
56+
cd promptolution
3157
poetry install
3258
```
3359

34-
to install the necessary dependencies. You might need to install [pipx](https://pipx.pypa.io/stable/installation/) and [poetry](https://python-poetry.org/docs/) first.
3560

36-
## Usage
3761

38-
To get started right away, take a look at our [getting started notebook](https://github.com/finitearth/promptolution/blob/main/tutorials/getting_started.ipynb) and our [other demos and tutorials](https://github.com/finitearth/promptolution/blob/main/tutorials).
39-
For more details, a comprehensive **documentation** with API reference is availabe at https://finitearth.github.io/promptolution/.
62+
## 🔧 Quickstart
4063

41-
### Featured Optimizers
64+
Start with the **Getting Started tutorial**:
65+
[https://github.com/finitearth/promptolution/blob/main/tutorials/getting_started.ipynb](https://github.com/finitearth/promptolution/blob/main/tutorials/getting_started.ipynb)
4266

43-
| **Name** | **Paper** | **init prompts** | **Exploration** | **Costs** | **Parallelizable** | **Utilizes Fewshot Examples** |
44-
| :-----------: | :----------------------------------------------: | :--------------: | :-------------: | :-------: | :-------------------: | :---------------------------: |
45-
| `CAPO` | [Zehle et al.](https://arxiv.org/abs/2504.16005) | _required_ | 👍 | 💲 |||
46-
| `EvoPromptDE` | [Guo et al.](https://arxiv.org/abs/2309.08532) | _required_ | 👍 | 💲💲 |||
47-
| `EvoPromptGA` | [Guo et al.](https://arxiv.org/abs/2309.08532) | _required_ | 👍 | 💲💲 |||
48-
| `OPRO` | [Yang et al.](https://arxiv.org/abs/2309.03409) | _optional_ | 👎 | 💲💲 |||
67+
Full docs:
68+
[https://finitearth.github.io/promptolution/](https://finitearth.github.io/promptolution/)
4969

50-
### Core Components
5170

52-
- `Task`: Encapsulates initial prompts, dataset features, targets, and evaluation methods.
53-
- `Predictor`: Implements the prediction logic, interfacing between the `Task` and `LLM` components.
54-
- `LLM`: Unifies the process of obtaining responses from language models, whether locally hosted or accessed via API.
55-
- `Optimizer`: Implements prompt optimization algorithms, utilizing the other components during the optimization process.
5671

57-
### Key Features
72+
## 🧠 Featured Optimizers
5873

59-
- Modular and object-oriented design
60-
- Extensible architecture
61-
- Easy-to-use interface for assembling experiments
62-
- Parallelized LLM requests for improved efficiency
63-
- Integration with langchain for standardized LLM API calls
64-
- Detailed logging and callback system for optimization analysis
74+
| **Name** | **Paper** | **Init prompts** | **Exploration** | **Costs** | **Parallelizable** | **Few-shot** |
75+
| ---- | ---- | ---- |---- |---- | ----|---- |
76+
| `CAPO` | [Zehle et al., 2025](https://arxiv.org/abs/2504.16005) | required | 👍 | 💲 |||
77+
| `EvoPromptDE` | [Guo et al., 2023](https://arxiv.org/abs/2309.08532) | required | 👍 | 💲💲 |||
78+
| `EvoPromptGA` | [Guo et al., 2023](https://arxiv.org/abs/2309.08532) | required | 👍 | 💲💲 |||
79+
| `OPRO` | [Yang et al., 2023](https://arxiv.org/abs/2309.03409) | optional | 👎 | 💲💲 |||
6580

66-
## Changelog
6781

68-
Release notes for each version of the library can be found [here](https://finitearth.github.io/promptolution/release-notes/)
6982

70-
## Contributing
83+
## 🏗 Core Components
7184

72-
The first step to contributing is to open an issue describing the bug, feature, or enhancements. Ensure the issue is clearly described, assigned, and properly tagged. All work should be linked to an open issue.
85+
* **Task** – wraps dataset fields, init prompts, evaluation.
86+
* **Predictor** – runs predictions using your LLM backend.
87+
* **LLM** – unified interface for OpenAI, HuggingFace, vLLM, etc.
88+
* **Optimizer** – plug-and-play implementations of CAPO, GA/DE, OPRO, and your own custom ones.
7389

74-
### Code Style and Linting
7590

76-
We use Black for code formatting, Flake8 for linting, pydocstyle for docstring conventions (Google format), and isort to sort imports. All these checks are enforced via pre-commit hooks, which automatically run on every commit. Install the pre-commit hooks to ensure that all checks run automatically:
7791

78-
```
79-
pre-commit install
80-
```
92+
## ⭐ Highlights
8193

82-
To run all checks manually:
94+
* Modular, OOP design → easy customization
95+
* Experiment-ready architecture
96+
* Parallel LLM requests
97+
* LangChain support
98+
* JSONL logging, callbacks, detailed event traces
99+
* Works from laptop to cluster
83100

84-
```
85-
pre-commit run --all-files
86-
```
87101

88-
### Branch Protection and Merging Guidelines
89102

90-
- The main branch is protected. No direct commits are allowed for non-administrators.
91-
- Rebase your branch on main before opening a pull request.
92-
- All contributions must be made on dedicated branches linked to specific issues.
93-
- Name the branch according to {prefix}/{description} with one of the prefixes fix, feature, chore, or refactor.
94-
- A pull request must have at least one approval from a code owner before it can be merged into main.
95-
- CI checks must pass before a pull request can be merged.
96-
- New releases will only be created by code owners.
103+
## 📜 Changelog
104+
105+
[https://finitearth.github.io/promptolution/release-notes/](https://finitearth.github.io/promptolution/release-notes/)
106+
107+
97108

98-
### Testing
109+
## 🤝 Contributing
99110

100-
We use pytest to run tests, and coverage to track code coverage. Tests automatically run on pull requests and pushes to the main branch, but please ensure they also pass locally before pushing!
101-
To run the tests with coverage locally, use the following commands or your IDE's test runner:
111+
Open an issue → create a branch → PR → CI → review → merge.
112+
Branch naming: `feature/...`, `fix/...`, `chore/...`, `refactor/...`.
113+
114+
### Code Style
102115

103116
```
104-
poetry run python -m coverage run -m pytest
117+
pre-commit install
118+
pre-commit run --all-files
105119
```
106120

107-
To see the coverage report run:
121+
### Tests
122+
108123
```
124+
poetry run python -m coverage run -m pytest
109125
poetry run python -m coverage report
110126
```
127+
Just tell me — happy to tune it further.

0 commit comments

Comments
 (0)