Framework for automative prompting creation and optimization
Project description
CoolPrompt is a framework for automatic prompt creation and optimization.
Join our telegram channel to be in touch.
Practical cases
- Automatic prompt engineering for solving tasks using LLM
- (Semi-)automatic generation of markup for fine-tuning
- Formalization of response quality assessment using LLM
- Prompt adoption for AI Agentic Pipelines
- Etc.
Core features
- Optimize prompts with our APO methods:
- HyPER / HyPER Light
- RE-GPS
- RIDER
- PromptCompressor
- (legacy/deprecated): ReflectivePrompt, DistillPrompt
- LLM-Agnostic Choice: work with your custom llm (from open-sourced to proprietary) using supported Langchain LLMs
- Develop own custom APO method in one library
- Generate synthetic evaluation data when no input dataset is provided
- Evaluate a quality of prompts incorporating multiple metrics for both classification and generation tasks
- Evaluate costs of optimization processes by a number of tokens/calls and a price.
- Automatic task detecting for scenarios without explicit user-defined task specifications
Quick install
- Install with pip:
pip install coolprompt
- Install with git:
git clone https://github.com/CTLab-ITMO/CoolPrompt.git
cd CoolPrompt
pip install -e .
Quick start
Set your OpenAI API key before running. The default model is gpt-4o-mini via the OpenAI API (OPENAI_API_KEY environment variable)
from coolprompt.assistant import PromptTuner
prompt_tuner = PromptTuner()
prompt_tuner.run('Write an essay about autumn')
print(prompt_tuner.final_prompt)
# You are an expert writer and seasonal observer tasked with composing a rich,
# well-structured, and vividly descriptive essay on the theme of autumn...
Examples
See more examples in notebooks to familiarize yourself with our framework
About project
- The framework is developed by Computer Technologies Lab (CT-Lab) of ITMO University.
- API Reference
Contributing
- We welcome and value any contributions and collaborations, so please contact us. For new code check out CONTRIBUTING.md.
Reference
For technical details and full experimental results, please check our papers + citations inside.
RIDER
@inproceedings{dragomirov2026rider,
author = {Dragomirov, Daglar and Kulin, Nikita and Muravyov, Sergey and Makarov, Ilya and Sukhorukov, Daniil and Mozikov, Mikhail},
title = {RIDER: Evolutionary Prompt Optimization with Adaptive Operator Selection for Software Engineering},
booktitle = {Companion Proceedings of the 34th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering},
series = {FSE Companion '26},
year = {2026},
doi = {10.1145/3803437.3807393}
}
CoolPrompt
@INPROCEEDINGS{11239071,
author={Kulin, Nikita and Zhuravlev, Viktor and Khairullin, Artur and Sitkina, Alena and Muravyov, Sergey},
booktitle={2025 38th Conference of Open Innovations Association (FRUCT)},
title={CoolPrompt: Automatic Prompt Optimization Framework for Large Language Models},
year={2025},
volume={},
number={},
pages={158-166},
keywords={Technological innovation;Systematics;Large language models;Pipelines;Manuals;Prediction algorithms;Libraries;Prompt engineering;Optimization;Synthetic data},
doi={10.23919/FRUCT67853.2025.11239071}
}
ReflectivePrompt
@misc{zhuravlev2025reflectivepromptreflectiveevolutionautoprompting,
title={ReflectivePrompt: Reflective evolution in autoprompting algorithms},
author={Viktor N. Zhuravlev and Artur R. Khairullin and Ernest A. Dyagin and Alena N. Sitkina and Nikita I. Kulin},
year={2025},
eprint={2508.18870},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2508.18870},
}
DistillPrompt
@misc{dyagin2025automaticpromptoptimizationprompt,
title={Automatic Prompt Optimization with Prompt Distillation},
author={Ernest A. Dyagin and Nikita I. Kulin and Artur R. Khairullin and Viktor N. Zhuravlev and Alena N. Sitkina},
year={2025},
eprint={2508.18992},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2508.18992},
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coolprompt-2.0.0.tar.gz.
File metadata
- Download URL: coolprompt-2.0.0.tar.gz
- Upload date:
- Size: 149.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca1734f2efd8971a354ff43454aad2685dc9f5b6176eb3d64d1b8680eb1f927f
|
|
| MD5 |
648e16d250f7cbb1ffb8af294267dee3
|
|
| BLAKE2b-256 |
2f829861c90ecb31b5c19e5ebd9cd10eea6725f4a20ae7daab275d61befe3173
|
Provenance
The following attestation bundles were made for coolprompt-2.0.0.tar.gz:
Publisher:
workflow.yml on CTLab-ITMO/CoolPrompt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coolprompt-2.0.0.tar.gz -
Subject digest:
ca1734f2efd8971a354ff43454aad2685dc9f5b6176eb3d64d1b8680eb1f927f - Sigstore transparency entry: 1755650407
- Sigstore integration time:
-
Permalink:
CTLab-ITMO/CoolPrompt@13f799af4eecc1c299db71931334c4e878a3686f -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/CTLab-ITMO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@13f799af4eecc1c299db71931334c4e878a3686f -
Trigger Event:
release
-
Statement type:
File details
Details for the file coolprompt-2.0.0-py3-none-any.whl.
File metadata
- Download URL: coolprompt-2.0.0-py3-none-any.whl
- Upload date:
- Size: 181.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64b19915ff4eee657f8c8ea3103aa0049e29111e94de07220bb9082be59ad3cf
|
|
| MD5 |
e76eea2801b0ad1aa4c2bec4219114d1
|
|
| BLAKE2b-256 |
fcd6c99d3263105a708ace74bfeea82bc5b2cff2fee6aeaba094fb4ded947145
|
Provenance
The following attestation bundles were made for coolprompt-2.0.0-py3-none-any.whl:
Publisher:
workflow.yml on CTLab-ITMO/CoolPrompt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coolprompt-2.0.0-py3-none-any.whl -
Subject digest:
64b19915ff4eee657f8c8ea3103aa0049e29111e94de07220bb9082be59ad3cf - Sigstore transparency entry: 1755650456
- Sigstore integration time:
-
Permalink:
CTLab-ITMO/CoolPrompt@13f799af4eecc1c299db71931334c4e878a3686f -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/CTLab-ITMO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@13f799af4eecc1c299db71931334c4e878a3686f -
Trigger Event:
release
-
Statement type: