CoolPrompt: An Automatic Prompt Optimization Framework for Large Language Models

Kulin Nikita, Sitkina Alena, Khairullin Artur, Zhuravlev Viktor, Sergey MuravyovOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

CoolPrompt is an all-in-one, "zero-configuration" framework designed to take the guesswork out of prompt engineering. By introducing three distinct optimization strategies—HyPE (for speed), ReflectivePrompt (for performance), and DistillPrompt (for efficiency)—it automates the entire pipeline from task detection and synthetic data generation to final prompt evaluation, often outperforming human-designed prompts and existing automated baselines.

What Problem Does This Paper Address?

Prompt engineering is often described as a "black art." While Large Language Models (LLMs) are incredibly capable, their performance is finicky and highly sensitive to how instructions are phrased. Currently, getting the "perfect" prompt requires deep domain expertise, endless trial-and-error, and a solid grasp of specific techniques like Chain-of-Thought.

Furthermore, existing automatic prompt optimization (APO) tools often suffer from high computational costs, a lack of generalizability across different model architectures, or a dependency on high-quality labeled datasets that users might not actually have. The authors of CoolPrompt aim to democratize this process, creating a system where a user can provide a simple goal and let the framework handle the heavy lifting of optimization, evaluation, and even data synthesis.

Methods

CoolPrompt isn't just a single algorithm; it’s a modular architecture. Key components include a Task Detector (to identify if you're doing classification or generation), a Synthetic Data Generator (to create training examples if you have none), and a PromptAssistant (to provide feedback on why a prompt improved).

The core of the framework lies in its three optimization methods:

  1. HyPE (Hypothetical Prompt Enhancer): Inspired by the HyDE retrieval method, HyPE uses a single-step meta-prompt to ask an LLM to generate a "hypothetical instructive prompt" that would solve the user's task. It’s designed for "rapid optimization," completing in about one second with minimal cost.
  2. ReflectivePrompt: An evolutionary algorithm that treats prompts as a population. It uses "short-term reflections" (insights from the current iteration) and "long-term reflections" (knowledge accumulated across generations) to mutate and crossover prompts, effectively "evolving" the best instruction over several epochs.
  3. DistillPrompt: A gradient-free approach inspired by the Tree-of-Thoughts technique. It generates variations of a prompt, embeds knowledge sampled from training data, and then "distills" or compresses these into a concise, high-performing instruction.

Datasets

The authors evaluated CoolPrompt across five diverse benchmark datasets to test different capabilities:

  • SQuAD 2.0: Question answering.
  • GSM8K: Mathematical reasoning.
  • CommonGen: Natural language understanding/constrained generation.
  • XSum: Abstractive summarization.
  • AG News: Text classification.

In the appendix, they further tested ReflectivePrompt against evolutionary baselines using MNLI, MR, SST-2, YAHOO, BBH, and SamSUM.

Key Insights and Ideas

  • The "Zero-Config" Advantage: By automating task and metric selection, CoolPrompt removes the "expert barrier." A user doesn't need to know if they should use BERTScore or F1; the system detects the task type and assigns the appropriate metric.
  • Synthetic Data is "Good Enough": One of the most striking findings is that synthetic data generated by the framework can effectively replace real-world data for optimization. In half of the test cases, prompts optimized on synthetic data performed as well as, or better than, those optimized on real data.
  • Meta-Prompt Phrasing Matters: The authors found that the specific wording of the meta-prompt (the prompt that tells the LLM how to optimize the user's prompt) is critical. Using the phrase "hypothetical instructive prompt" yielded significantly more stable and faithful results than generic terms like "prompt."
  • Cross-Model Transferability: Prompts optimized on smaller, cheaper models (like Qwen-4B) showed comparable or improved performance when transferred to larger, architecturally different models, suggesting that good instructions are somewhat universal.

Key Results

  • Performance: CoolPrompt (specifically the ReflectivePrompt method) consistently outperformed or matched popular frameworks like AdalFlow and Promptomatix. It was particularly strong in generative tasks (SQuAD 2, XSum).
  • Cost vs. Speed:
    • HyPE is the efficiency king: It costs roughly $0.00018 per run and takes ~1 second.
  • ReflectivePrompt is the "strongest" but most expensive, costing about $0.13 per epoch and taking over 1,000 seconds due to its iterative evolutionary nature.
  • Mathematical Reasoning: On the GSM8K dataset, ReflectivePrompt achieved an Exact Match (EM) score of 0.732, a significant jump from the manual zero-shot baseline of 0.527.

Limitations and Future Work

The authors acknowledge a few key hurdles:

  • Modality: The current framework is strictly limited to text. It does not yet support multimodal prompts (images, audio, video).
  • Metric Diversity: While it uses standard metrics (BLEU, ROUGE, BERTScore), these don't always capture the nuance of highly specialized domains like medicine or law.
  • Domain Specificity: For highly technical fields, the framework still benefits from using a base model already fine-tuned for that specific domain.

Future work likely involves expanding into multimodal optimization and developing more nuanced, "human-aligned" evaluation metrics beyond standard n-gram overlaps.

Summary updated

BibTeX
@misc{nikita2026coolprompt,
  author = {Kulin Nikita and Sitkina Alena and Khairullin Artur and Zhuravlev Viktor and Sergey Muravyov},
  title = {{CoolPrompt: An Automatic Prompt Optimization Framework for Large Language Models}},
  year = {2026},
  url = {https://openreview.net/forum?id=XGECnjDEcS},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}

Loading related content...

Figure