COBRA-Skills Cuts Agent Skill Optimization Cost 55–58% Using 50 Samples
A four-university team's COBRA-Skills framework casts agent skill optimization as a budget-controlled contextual bandit problem, cutting optimization cost 55–58% with only 50 samples.
Skills for agents have largely been written by human experts, which is slow and hard to scale to complex real-world tasks. Having large models generate and refine skills automatically removes that bottleneck but introduces a new one: verifying whether a generated skill works requires running it on real tasks, and every trial costs tokens and interaction time. The paper states that many candidate skills are flawed as soon as they are generated, and existing frameworks cannot screen them beforehand, so budget is consumed by low-quality candidates. Refinement pipelines also keep calling high-end models to reflect and rewrite, even when no new evidence has appeared.
COBRA-Skills maintains a fixed-size population of skills. In each iteration, a bandit model scores every skill in the population and the top scorer is executed by the target agent on the optimization set, returning a reward and a rollout trajectory. The result is written into a history store used to update the scoring model. The population is periodically refreshed through evolution, which removes low-scoring skills and generates replacements.
Lu told AI Tech Review that when the team first reproduced comparable work, total token counts looked acceptable but the bill was unexpectedly high. The bottleneck, he said, was the number of calls to a teaching model such as GPT-5.5-class systems and the very long context in each call. The team therefore set economic cost, rather than token count, as the target from the design stage.
Predicted reward comes from a lightweight two-layer MLP that converts each skill into a semantic embedding vector and outputs a scalar reward prediction, refitted as evaluation data accumulates. Because always picking the highest predicted score would trap the algorithm in repeated selection of one skill, the system adds a LinearUCB exploration term. The team had tried NeuralUCB first and found its screening specificity weak — two consecutive selections of the same skill barely reduced its uncertainty relative to other skills — and its computation heavy, with diagonal approximations sacrificing accuracy. LinearUCB proved lighter and more sensitive to regions already explored. The final priority score is predicted reward plus exploration reward, and only the highest scorer each round is sent for evaluation, while the lowest-scoring skills are eliminated in later evolution. Simulation results cited in the paper put the best average performance at 73.5% when the exploration coefficient is set to 0.1.
Evolution runs on a logarithmic schedule — at iterations 3, 6, 9, 13, 19 and so on — rather than every round, so rewrites occur only after enough rollout evidence has accumulated. Three operators fill vacancies: regeneration, which induces entirely new strategies from executions carried out without any skill and which Lu described as the one operator the framework could not do without; rollout mutation, which samples recent successes and failures and applies local corrections; and crossover, which uses a high-scoring skill as a skeleton and absorbs successful patterns while avoiding known failure modes, without requiring the target agent to re-evaluate.
The team also limited how much each operator changes a skill. Lu said large-scale rewrites tend to destroy the effective structure of an existing skill and cause performance swings, so mutation and crossover make small, conservative local edits around an existing or high-scoring skeleton.
Evaluation covered six benchmarks: SearchQA for open-domain question answering, SpreadsheetBench for spreadsheet automation, DocVQA for document image understanding, LiveMath for research-level mathematics, SocialMaze for social reasoning and hidden-role inference, and ALFWorld for multi-step decision making in an embodied environment. Three target models were used — Qwen3.6-35B-A3B, GPT-5.4-Nano and Gemma-4-26B-A4B-it — with GPT-5.5 as the teaching model and a shared 100-example held-out test set kept separate from skill construction and selection.
COBRA-Skills recorded the highest average performance on all three target models, gaining 13.1, 26.9 and 22.5 percentage points over the no-skill baseline on Qwen, GPT-Nano and Gemma respectively, with the largest improvements on the weaker models. An evidence-anchored baseline that only initializes skills without further optimization already beat the no-skill baseline, and COBRA-Skills improved further on it. The paper reports that the method does not win every individual benchmark: on Qwen3.6-35B it trails SkillOpt slightly on SearchQA, and on Gemma-4-26B its margin on DocVQA is narrow.
Against the strongest baseline, SkillOpt, total optimization cost fell 55% to 58%, teaching-model token use fell 67% to 80%, and cost per unit of performance gain fell 60% to 69%. The paper contrasts sample budgets: SkillOpt's official configuration for SearchQA uses 400 training samples and 200 validation samples, and Trace2Skill uses 200 samples on SpreadsheetBench, while COBRA-Skills uses 50 samples on all benchmarks. Lu said 20 samples would produce violently oscillating score feedback whereas 50 provides a stable signal, and that each evolution step randomly draws 8 trajectories from the 50.
Ablations indicate the two components are complementary. Removing the bandit and selecting candidates randomly lowers average performance by 2.2 points; removing evolution and choosing from a fixed pool of 30 skills lowers it by 2.4 points. A Best-of-30 baseline, which generates 30 skills with the same evidence-anchoring mechanism and fully evaluates them before taking the best, scored 2.5 points below the complete method.