Framework for automative prompting creation and optimization
Project description
CoolPrompt is a framework for automative prompting creation and optimization.
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 tuning for agent systems
Core features
- Optimize prompts with our autoprompting optimizers: HyPE, ReflectivePrompt, DistillPrompt
- LLM-Agnostic Choice: work with your custom llm (from open-sourced to proprietary) using supported Langchain LLMs
- Generate synthetic evaluation data when no input dataset is provided
- Evaluate prompts incorporating multiple metrics for both classification and generation tasks
- Retrieve feedbacks to interpret prompt optimization results
- 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
pip install -r requirements.txt
Quick start
Import and initialize PromptTuner using model qwen3-4b-instruct via HuggingFace
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.
CoolPrompt
@article{kulincoolprompt,
title={CoolPrompt: Automatic Prompt Optimization Framework for Large Language Models},
author={Kulin, Nikita and Zhuravlev, Viktor and Khairullin, Artur and Sitkina, Alena and Muravyov, Sergey}
}
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-1.2.1.tar.gz.
File metadata
- Download URL: coolprompt-1.2.1.tar.gz
- Upload date:
- Size: 52.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d521e8778ca1396bbb13ba4e5c7f5d00aa16e3c21728d4b34f4a7e9986403ff
|
|
| MD5 |
7f406e4589479396e2ccdcdedb977174
|
|
| BLAKE2b-256 |
7e24113a41861c68dcad92c4c01a454d483ec06407d969908a5084a3f8d13493
|
Provenance
The following attestation bundles were made for coolprompt-1.2.1.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-1.2.1.tar.gz -
Subject digest:
2d521e8778ca1396bbb13ba4e5c7f5d00aa16e3c21728d4b34f4a7e9986403ff - Sigstore transparency entry: 753198918
- Sigstore integration time:
-
Permalink:
CTLab-ITMO/CoolPrompt@957052d16bbb194fc45f40b1917967c7c320e2ec -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/CTLab-ITMO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@957052d16bbb194fc45f40b1917967c7c320e2ec -
Trigger Event:
release
-
Statement type:
File details
Details for the file coolprompt-1.2.1-py3-none-any.whl.
File metadata
- Download URL: coolprompt-1.2.1-py3-none-any.whl
- Upload date:
- Size: 66.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
441e2f2856b767057b987e6ab1c1b404463cfcb3ac4ad45e5689cc715fbee9f8
|
|
| MD5 |
702b295555f8c3e031776ed86ff80f75
|
|
| BLAKE2b-256 |
c8fbab0150472d62c4a7a1aec979c5c9024f3a5c4050a72ad280d89f145473b1
|
Provenance
The following attestation bundles were made for coolprompt-1.2.1-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-1.2.1-py3-none-any.whl -
Subject digest:
441e2f2856b767057b987e6ab1c1b404463cfcb3ac4ad45e5689cc715fbee9f8 - Sigstore transparency entry: 753198925
- Sigstore integration time:
-
Permalink:
CTLab-ITMO/CoolPrompt@957052d16bbb194fc45f40b1917967c7c320e2ec -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/CTLab-ITMO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@957052d16bbb194fc45f40b1917967c7c320e2ec -
Trigger Event:
release
-
Statement type: