AI
Researchers devise cost-efficient method to optimize prompts for language models through smart sampling
A new framework uses simulation optimization to intelligently expand and refine prompt sets, achieving better results while minimizing expensive model evaluations.
Crafting effective prompts for language models is an iterative challenge: as requirements shift, prompts must evolve, yet testing each candidate is computationally expensive. A team of researchers has developed a structured approach to tackle this problem by systematically expanding and improving prompts within strict evaluation budgets.
The core problem#
Prompt engineering remains one of the most practical yet resource-intensive aspects of deploying generative language models. When business needs or application goals change, organizations must adapt their instructions, but evaluating every potential improvement quickly exhausts computational resources and API costs. The researchers set out to maximize task performance while keeping the number of expensive model calls to a minimum.
The two-stage framework#
Their solution unfolds in two phases. First, they expand an initial collection of prompts into a larger candidate pool, representing each prompt as a vector in moderate-dimensional space. Second, they employ a surrogate model — a learned approximation of how well different prompts will score — to guide which candidates deserve actual evaluation. Rather than testing prompts randomly, the system uses this surrogate to identify the most promising candidates before committing to expensive evaluations.
Smart selection and refinement#
The key innovation is the sequential evaluation procedure: prompts are scored strategically based on the surrogate model's predictions, and the researchers proved their approach maintains theoretical consistency. Beyond initial candidates, a refinement step leverages accumulated evaluation data to explore entirely new prompt directions, moving beyond the original candidate set.
Results and impact#
Numerical experiments demonstrate that the method outperforms baseline prompt selection strategies, particularly when evaluation budgets are tight. By combining exploration (expanding the candidate set) with exploitation (focusing evaluation on promising directions), the framework achieves higher-quality prompts while reducing the total computational cost of prompt development.

