Researchers have developed a new approach to improve how AI language models handle sequences of related tasks, potentially making them more efficient and reliable. The study focuses on reducing the repeated effort large language models (LLMs) spend on managing control decisions within each task, by turning these recurring control processes into reusable code. This could significantly cut down the computational cost and improve the performance of AI agents across a variety of applications.
Key Takeaways
- The new method, called Growing Harness, learns a shared control structure from task feedback rather than relying on repeated in-context instructions for each task.
- Growing Harness reduces calls to the large language model by 76% to 92%, cutting inference costs by up to 98.6% compared to standard tool-calling agents.
- It maintains high success rates across different AI model sizes, including smaller models where traditional approaches see steep performance drops.
- Key innovations include failure-guided training, localized code repairs based on execution traces, and a rollback mechanism to avoid harming prior capabilities.
Large language model agents typically operate by repeatedly prompting the AI to make control decisions—essentially, how to approach and solve each task—within the context of every new problem. This repetition can be inefficient, as the AI must “rethink” the strategy each time. The new research proposes a shift: instead of encoding these control strategies inside the AI’s context, the control logic is extracted and encoded into executable code that the agent can reuse across tasks.
This is achieved through a training method called Growing Harness. Starting with a simple scaffold that defines fixed interfaces to the AI model and external tools but contains no strategy logic, the system learns from task failures to gradually build up a control program. When a task fails, execution traces—records of the program’s behavior—help pinpoint the exact part of the code responsible. An optimizer then jointly repairs these failures in localized sections of the code. To ensure that improvements do not degrade previously successful capabilities, a “success-first” gate mechanism can roll back any harmful changes. Accepted changes accumulate, allowing the control structure to evolve organically based on real task feedback.
The researchers tested Growing Harness on two challenging benchmarks, BrowseComp-Plus and WebArena-Verified, using AI models ranging from 4 billion to 120 billion parameters. The approach consistently achieved top or near-top success rates, outperforming a standard tool-calling baseline that repeatedly invokes the AI for control decisions. Notably, while the traditional method’s success rate dropped drastically with smaller models, Growing Harness maintained strong performance. This suggests the approach is particularly valuable for deploying effective AI agents in resource-constrained environments.
By moving recurring control logic out of the AI’s prompt context and into reusable, low-cost code, Growing Harness offers a promising direction for building specialist AI agents that are both efficient and robust. This can lead to lower operational costs and make AI-driven systems more accessible for real-world applications where computational resources are limited. Future work may explore extending this method to a wider range of tasks and integrating it with other AI system components to further enhance adaptability and performance.
Based on research published on arXiv by Laizhen Li, Jiarui Li, Juanjuan Zhao et al..
