Skip to main content

Framework for automative prompting creation and optimization

Project description

CoolPrompt Logo

Release Notes PyPI - License PyPI Downloads GitHub star chart Open Issues Contributions welcome ITMO

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

CoolPrompt Scheme

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

coolprompt-1.2.0.tar.gz (51.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coolprompt-1.2.0-py3-none-any.whl (64.5 kB view details)

Uploaded Python 3

File details

Details for the file coolprompt-1.2.0.tar.gz.

File metadata

  • Download URL: coolprompt-1.2.0.tar.gz
  • Upload date:
  • Size: 51.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coolprompt-1.2.0.tar.gz
Algorithm Hash digest
SHA256 7b393e94659b4bb5dbdd5271e83b3b72fc4aec2776e4ae3a55c9bc7bc5a43640
MD5 8cfcacd91096957c92871f16363a0c29
BLAKE2b-256 812dc492c7751be0e9655217ca404228c4aa40754a9799a5484c010606858b13

See more details on using hashes here.

Provenance

The following attestation bundles were made for coolprompt-1.2.0.tar.gz:

Publisher: workflow.yml on CTLab-ITMO/CoolPrompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coolprompt-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: coolprompt-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 64.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coolprompt-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd326ec99f711778506c0774721347890384c6557d4030189b55e8efa40ad2f
MD5 ab8264630f42250970f4a6a3b1dfd80b
BLAKE2b-256 ed0efa13f7d2a0d3215de6c95eb903347c28c65a5609625579c01aa29c8e1d2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coolprompt-1.2.0-py3-none-any.whl:

Publisher: workflow.yml on CTLab-ITMO/CoolPrompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page