Prior work on LLM-guided evolutionary methods such as AlphaEvolve has demonstrated strong results on computational optimization problems, including circle packing. However, these approaches typically optimize for performance gain over a fixed number of iterations, without explicitly accounting for the cost of LLM calls. In practice, optimization should maximize gain per unit cost, particularly when operating under a fixed budget.

FrugalEvo addresses this gap with a cost-aware evolutionary framework. The method pairs a stronger, higher-cost LLM that explores solution strategies with a cheaper LLM that implements and iteratively refines the resulting code. This contrast between exploration and implementation layers enables progressive improvement while controlling expenses. The framework also incorporates a cache-evolution process: harness design and prompts are engineered to maximize shared prefixes across evolution steps, improving cache reuse and reducing redundant computation.

To measure solution quality across a fixed cost budget, the authors introduce Budget-Aware Area Under the Curve (BA-AUC). BA-AUC computes the area under the best-so-far evaluation score curve plotted against cumulative LLM cost, up to the specified budget. This metric captures both the trajectory of improvement and the cost efficiency of that improvement, offering a more practical signal than final-quality-only assessments.

Method architecture

The exploration LLM—stronger and more expensive—generates candidate program mutations or strategy tweaks. The implementation LLM—cheaper and faster—translates those ideas into executable code, runs tests, and returns fitness scores. The cheaper LLM also performs incremental refinement, feeding its best outputs back into the next exploration round. This loop repeats until the cost budget is exhausted.

A key design choice is the cache-efficient evolution process. Prompts are structured so that shared subroutines, import blocks, and common function signatures appear as prefixes across many candidate programs. The harness caches these prefixes and only diffs the variable parts, meaning that each new LLM call reuses previously generated tokens. This reduces the effective per-call cost and makes the overall process more scalable.

Budget-Aware AUC

BA-AUC plots the best-so-far score at each step against the cumulative LLM cost spent up to that point. The area under this curve summarizes how quickly high-quality solutions are found relative to money spent. A higher BA-AUC indicates that strong performers emerge early and cheaply, while a lower score suggests that meaningful gains require substantial expenditure. The metric is computed per task by recording the best evaluation score after each LLM call and integrating the resulting step function.

Experimental results

Across 10 mathematical and systems optimization tasks, FrugalEvo matches or surpasses state-of-the-art baselines—OpenEvolve, ShinkaEvolve, AdaEvolve, and EvoX—in final solution quality. On 9 of those 10 tasks, it also achieves a higher BA-AUC, indicating better cost-efficiency across the run.

On the 10 algorithmic optimization tasks from ALE-Bench-Lite, FrugalEvo achieves higher average performance than the same baselines. The most striking results appear in the circle-packing benchmark. Using GPT-5.6 Terra and Luna, FrugalEvo attains new state-of-the-art performance for approximately 1.68 USD. With GLM-5.3 and its Flash variant, the same milestone is reached for only 0.55 USD. These costs undercut multi-agent approaches such as CORAL and SwarmResearch, which average around 50 USD, while matching or surpassing their output quality.

Limitations and trade-offs

The cache-efficient design depends on the structural similarity of evolving programs; highly divergent solutions may see less prefix reuse and thus reduced cost savings. The BA-AUC metric, while informative, requires careful choice of evaluation intervals and score normalization across tasks with different scales. Additionally, the two-LLM architecture introduces coordination overhead: if the exploration LLM proposes impractical mutations, the implementation LLM wastes cycles on dead-end code, and the budget may be consumed without meaningful progress.

Practical takeaways

Developers working with LLM-guided optimization can adopt FrugalEvo’s cost-aware mindset: pair a strong explorer with a cheap executor, and structure prompts to maximize token reuse. The BA-AUC metric provides a straightforward way to benchmark progress under a spending limit, which is useful when deploying optimization in production environments with constrained resources. The circle-packing results suggest that significant performance gains are achievable at under 2 USD when using the right model pairing, opening the door to cost-sensitive optimization in domains where every dollar counts.

Read the paper on arXiv