TRANSMISSION // 2608.04336v2
Why code-generation AI may need different settings for different tasks
Source published
COMPAS jointly selects models, prompts and decoding settings by task difficulty. Tests report improved quality-cost results, with important limits to the evidence.

A coding model’s output depends not only on which model is called, but also on its prompt and decoding settings. A new preprint tests whether choosing these pieces together—and tailoring choices to task difficulty—can improve results under the same offline search-token budget as competing methods.
A code-generation system has more than one dial to turn. It can choose a language model, give it a prompt, and set how it generates text—for example, how much variation to allow. These choices may work differently in combination, and a setup that suits an easy task may not suit a hard one. Yet many existing approaches tune just one part of the system or settle on one configuration for every task.
A study introducing COMPAS asks whether jointly choosing the model, prompt and decoding settings for groups of tasks can improve the balance between code quality and cost. The authors report that prompt and decoding choices interact, that a tuning change can affect different models differently, and that the best observed setup varies across difficulty groups. These observations motivate a system that specializes rather than relying on one global choice.
Search first, route later
COMPAS works in two phases. Before deployment, it groups tasks by difficulty and searches for useful configurations in each group. It first runs a small probe to choose between two models from the same model family. It then uses an LLM-based reflection loop to propose joint changes to the prompt and decoding settings. The search keeps configurations that offer useful quality-cost trade-offs, forming a Pareto front for each group: configurations for which no other candidate is at least as good on both quality and cost.
When a new task arrives, COMPAS uses its difficulty group to select an existing configuration from that group’s front. It does not conduct a new search for every test task. On LiveCodeBench, groups are formed from both difficulty and task interface—functional or standard-input—because these interfaces have different output requirements. The system’s selection rule uses normalized quality and inverse cost, with weights of 0.2, 0.5 and 0.8 for easy, medium and hard difficulty, respectively. Those weights favor cost more for easier tasks and quality more for harder ones; the same difficulty weight applies to the interface-specific groups at that difficulty.
The main evaluation uses benchmarks’ official difficulty labels. The authors also test an XGBoost-based difficulty router: it reaches 49.7% Pass@1, 3.1 percentage points below the label-based result of 52.8%, a difference that was not statistically significant in their paired test.
The study compares COMPAS with a fixed default, a model router, and configuration-search methods under the same cap on offline search tokens. That cap does not limit total spending: reported costs also include online deployment, whose expense varies with which models each method selects. The evaluation covers LiveCodeBench, where generated code is checked against problem tests, and SWE-bench Verified-mini, where an agent attempts to resolve repository issues. The authors also examine another random split, multiple search seeds and different model families.
Reported gains—and a qualified picture
On the main LiveCodeBench split, COMPAS reached 52.8% Pass@1, compared with 45.9% for the strongest baseline, EcoTune. Pass@1 measures the share of problems for which a generated solution passes the benchmark tests. Reported total costs were $4.92 for COMPAS and $36.57 for EcoTune. In a separate random split, COMPAS again had the highest reported Pass@1, at 62.2%, and the lowest cost among the compared methods.
Across five search seeds, COMPAS was the sole rank-one method for both Pass@1 and cost under the Scott–Knott ESD ranking procedure used by the authors. This is an aggregate ranking, not evidence that it led in every subgroup: on some medium- and hard-difficulty standard-input tasks, RouteLLM performed better. The results support an overall quality-cost advantage in these experiments, not a claim that COMPAS wins on every kind of code problem.
On SWE-bench Verified-mini, COMPAS resolved 38 of 50 tasks (76%), while the best baselines resolved 70%. This test used a curated subset, and the paper cautions that these numbers are not comparable with results on the full SWE-bench leaderboard. COMPAS also cost more on this benchmark, in part because it routed more tasks to pricier, higher-capability models. Across model families, COMPAS led on Qwen3.5 and improved on the default with Devstral, but did not beat EcoTune on Devstral.
Ablations—tests that remove parts of the method—suggested that both prompt search and decoding search mattered, and that removing task grouping produced the largest drop on the main LiveCodeBench split. The findings do not establish that difficulty-aware grouping will help every deployment. The main evaluation uses official labels, while the tested learned router had a similar but somewhat lower observed score. The authors also note that experiments tested model pairs from the same family; extending the search across families is future work.
These findings come from a preprint, not a peer-reviewed publication. Benchmarks and their specific evaluation setups are useful but incomplete proxies for real-world coding; the paper describes its LiveCodeBench setup as a controlled comparison, not a leaderboard claim. Cost figures reflect the models, prices, routing and evaluation protocol used here, not universal savings. The authors say code and a reproducibility artifact are available. Independent replication would be a useful next step for assessing how well the results generalize.
- code generation
- large language models
- AI optimization
- prompt tuning
- decoding settings
- software engineering
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
CodeTeam gives AI repository coding a team structure
Source published
Shared keywords: large language models, software engineering
Why AI-written code can look right—and still need repair
Source published
Shared keywords: code generation, software engineering
A human checkpoint for AI-written software requirements
Source published
Shared keywords: large language models, software engineering
Where GPU Software Fails Beneath Large Language Models
Source published
Shared keywords: large language models
Can machine learning make RAG tuning faster?
Source published
Shared keywords: ai optimization