Goto

Collaborating Authors

 token consumption


Measure Then Revise: Budgeted Compute Routers From a Harness Self-Improvement Loop

arXiv.org Artificial Intelligence

Automated harness self-improvement modifies the prompts and code surrounding a frozen language model. However, reported improvements often overlook generalization, inference costs, and evaluation noise. We investigate these limitations across 75 full-loop runs, 966 harnesses, and over 445,000 $ฯ„$-bench conversations using unseen tasks and a $2\times$ executor output-token budget. Prompt guidelines and execution guards produce little improvement on unseen tasks ($-3.0$ to $0.2$ percentage points). In contrast, Python-based compute routers that dynamically allocate reasoning effort generalize across five proposer models, with $95.6\%$ ($172/180$) outperforming their initial harness. However, $60.6\%$ ($109/180$) exceed the token budget. We introduce measure-then-revise, a method that uses measured token consumption at each reasoning level to revise expensive routers rather than discard them. Across six GLM-5.3 seeds per method under search-only selection, budget violations decrease from $38/72$ to $2/72$, and wasted search episodes decrease by $53\%$. All six revised seeds achieve positive held-out gains, averaging $11.6 \pm 2.9$ percentage points versus $5.4 \pm 6.4$ under discard-and-resample. Comparisons with uniform-effort baselines and three reimplemented compute allocators show that automated harness evolution can reach performance comparable to uniform medium effort without weight training.


STAGE-Med: A Multi-Agent Framework for Interactive Medical Diagnosis Based on Structured Action Spaces and Global Exploration

arXiv.org Artificial Intelligence

Large language model-based multi-agent systems have demonstrated substantial potential for clinical diagnosis. However, existing approaches typically rely on predefined expert roles or group discussions. Such designs are prone to role misassignment, evidence bias, and premature diagnostic convergence. We believe that these limitations may stem from a lack of effective constraints on the diagnostic action space, which may lead agents to pursue exploratory directions that do not align with case requirements early in the diagnostic process and to propagate these initial biases into subsequent examination selection and diagnostic decision-making. To address this issue, we propose a training-free multi-agent framework that combines clinically structured action spaces with global exploration for general-purpose diagnosis. The framework comprises a diagnostic council consisting of three agents, each of which acts solely within its own action subspace whilst sharing observations and intermediate differential diagnoses with the other agents. To mitigate the risk of local optima introduced by structural constraints, an independent global agent is granted access to the complete action space and is tasked with exploring cross-modal or previously overlooked diagnostic pathways. We evaluate the proposed framework on real-world clinical cases constructed from MIMIC-IV. The results demonstrate that our approach achieves an average relative improvement of 27\% in overall diagnostic accuracy compared with state-of-the-art single-agent and multi-agent methods based on multidisciplinary consultation, group discussion, and additional exploration steps. These findings demonstrate that combining clinically structured action-space constraints with global exploration provides a more effective and efficient multi-agent coordination mechanism for general-purpose clinical diagnosis.


MetaFORGE: A Meta-Learning Framework for Harness Optimization in Automated Code Generation for Parallel Computing

arXiv.org Artificial Intelligence

Large language models (LLMs) can generate parallel programs, but their correctness and performance depend strongly on the instructions that guide generation. We present \textsc{MetaFORGE}, an execution-grounded meta-learning framework that iteratively optimizes persistent natural-language skill specifications for MPI C code generation. \textsc{MetaFORGE} combines correctness testing, compiler diagnostics, static-analysis findings, runtime measurements, and rank-level load-imbalance profiles into a scalar reward that drives textual-gradient refinement, while an external memory distills and retrieves reward-supported optimization knowledge across runs. Across six MPI tasks and three workload sizes, \textsc{MetaFORGE} improves static-analysis quality, runtime, and load balance relative to zero-shot generation and generally exceeds the evaluated \textsc{TextGrad} iterative baseline. A model-matched refinement ablation shows that the MetaFORGE advantage persists when its refinement model is reduced to \texttt{gpt-4o}. An expanded retrieval ablation across all 18 task--workload configurations shows consistent runtime benefit and broad static-analysis and load-balance benefit from retrieved context. Leakage-controlled held-out and zero-update experiments further provide evidence that optimization knowledge persists in both the transferred skill and external memory under the evaluated protocol.


MH-RAG-DIVE: Dynamic and Cost-Efficient Multi-Hop RAG Evaluation via Tree-Cached Dialogue Simulation

arXiv.org Artificial Intelligence

Quality assessment is essential for determining whether changes to a Retrieval-Augmented Generation system improve or maintain its performance. However, existing evaluation approaches often rely on single-turn or single-hop interactions and therefore do not capture the complexity of multi-hop, multi-turn conversations. We introduce MH-RAG-DIVE, a dynamic interactive user simulation framework designed to evaluate RAG systems in more complex multi-hop and multi-turn settings. The framework extends RAG-DIVE with a Context Discoverer, which identifies documents that can be combined to generate multi-hop questions within an ongoing conversation. To address the high computational cost of dynamic user simulation, we further introduce a Conversation Cacher, which reuses turns from previous evaluation runs while preserving the dynamic nature of the evaluation. We evaluate the framework across six distinct RAG configurations and compare its results with the original RAG-DIVE evaluation and the static, human-created CLAPNQ dataset. Our experiments show consistent performance trends across the evaluation approaches, while the more complex multi-hop and multi-turn setting exposes additional challenges for RAG systems. Furthermore, the Conversation Cacher substantially reduces token consumption, demonstrating its potential to make dynamic evaluation more cost-efficient. Finally, we apply MH-RAG-DIVE to an industrial RAG system with domain-specific data, demonstrating its applicability to real-world evaluation scenarios. Overall, our results show that the proposed approach provides a more complex and cost-efficient framework for evaluating RAG systems. All code and experimental data are publicly available in our GitHub repository (https://github.com/Daniel-Innsbruck/MH-RAG-DIVE).


AscendGYM: A Cost-Aware Kernel Optimization Benchmark for Real-World Workloads on Ascend NPUs

arXiv.org Artificial Intelligence

Kernel optimization is essential for efficient large language model (LLM) training and inference on Ascend NPUs. Existing Ascend kernel benchmarks primarily focus on kernel generation, with less emphasis on the ability of agents to optimize existing implementations under input configurations drawn from real workloads. To address this requirement, we introduce AscendGYM, a benchmark whose initial suite comprises 48 kernels across three difficulty levels. Each kernel is paired with test cases whose data types and tensor shapes are collected from real-world training and inference tasks. Consequently, performance improvements on AscendGYM map directly to the corresponding workloads. In terms of usability, two evaluation modes are supported in AscendGYM: model evaluation and model-harness evaluation. The kernel optimization capabilities of both trained models and custom agents are allowed to be measured. It provides a complete execution environment that closely reproduces how Ascend kernels are invoked in practical pipelines. For model evaluation, it additionally includes a built-in harness equipped with search orchestration and experience accumulation. Finally, we propose a new metric, the Speedup-Token Score (STS), which quantifies performance gains relative to token cost. By jointly considering speedup and cost, STS enables the assessment of practical kernel optimization capability of a model or harness under an acceptable budget. AscendGYM is available at https://github.com/SLAI-AITP/AscendGYM.


Reasoning on Call: Efficient Agentic Robot Control for Long-Horizon Robot Manipulation

arXiv.org Artificial Intelligence

Large multimodal models can support long-horizon robot manipulation, but frequent model calls incur substantial latency and token costs. The central challenge is determining when agent assistance or intervention is needed and whether errors require correcting robot execution, subtask planning, or both. To address this problem, we propose RoC (Reasoning on Call), an efficient framework that coordinates a low-level policy and a high-level reasoning agent through an online task-state monitor. The monitor combines temporal visual observations with ordered interaction memory to jointly estimate progress within the active subtask and predict its successor. These predictions guide event-triggered agent review for coordinated execution repair and plan revision. Verified outcomes govern memory updates and subtask transitions, allowing routine execution to remain with the policy while reasoning focuses on decisions requiring additional assessment. On RMBench, RoC improves task success rate by 24.0 percentage points and reduces token consumption by 65.3% compared with the strongest agent-based baseline. It also outperforms the strongest policy-based baseline by 15.1 percentage points in task success rate. Real-world experiments further validate its effectiveness across three long-horizon manipulation tasks. Overall, RoC supports efficient agent intervention and coordinated recovery across execution and planning for long-horizon robot manipulation.


When the Mythical Man-Month Meets Agentic Web Systems: Structured Coordination for Scalable Development

arXiv.org Artificial Intelligence

As agentic systems are increasingly deployed to support complex Web tasks, multi-agent architectures offer greater parallelism, specialization, and task coverage. However, increasing the number of agents does not necessarily improve system performance, as communication, synchronization, redundant work, and coordination overhead may offset the benefits of additional agents. This presents a fundamental scaling challenge for agentic Web systems: how can agent populations be organized to balance task performance and coordination costs? To address this challenge, we systematically investigate the relationship between agent population size, per-agent token consumption, and coordination overhead in collaborative agentic systems. Experiments on complex Web-oriented software development tasks reveal a non-linear scaling pattern: per-agent token consumption initially decreases as the agent population grows, but eventually exhibits diminishing returns. Motivated by these findings, we introduce the Surgical Team Model (STM), a structured coordination framework that organizes agents through role specialization, constrained inter-agent communication, and coordinator-mediated task aggregation. Experiments on full-stack Web application development tasks show that STM achieves competitive task completion quality and comparable token consumption relative to representative baselines, while incurring higher execution latency.


Small Language Models for Inference-Capability Routing: Effects of Model Capacity and Prompt Optimization on Downstream Quality and Efficiency

arXiv.org Artificial Intelligence

Optional reasoning, retrieval, web search, and tool use can improve large language model responses but incur unnecessary computation when activated indiscriminately. This study investigates whether prompt optimization can compensate for limited router capacity and whether classification gains translate into downstream efficiency. The proposed framework uses prompt-driven small language models to make four independent capability decisions, allowing multiple capabilities to be selected per query. Qwen2.5 routers ranging from 1.5B to 14B parameters are compared across five prompting strategies, followed by an evaluation of capability-specific optimized configurations using a fixed GPT-OSS-120B downstream model on 127 questions. Under minimal prompting, increasing router capacity does not consistently improve classification performance. Prompt optimization narrows the capacity gap for reasoning and calculator routing, whereas RAG and web search retain larger benefits from higher capacity. Similar classification F1 scores do not necessarily imply equivalent downstream behavior: false-positive activations increase unnecessary computation, while missed capabilities can reduce answer quality. The 14B router achieves a mean BERTScore F1 of 0.8408, compared with 0.8418 when all capabilities are enabled, while reducing average downstream token consumption by 68.7\% (8,837 to 2,764 tokens) and median downstream latency by 80.5\% (9.79 to 1.91 seconds). These savings exclude router overhead, which is measured separately in a different inference environment and increases with router capacity. The findings demonstrate that the relationship between router capacity, prompt design, and downstream efficiency is capability-dependent. Consequently, router selection must consider error profiles and routing overhead alongside classification performance.


Trellis: Bringing Compiler-Guided Repair into Agentic Code Generation

arXiv.org Artificial Intelligence

Alexander Du 1 Jianjun Ou 1 Danyang Zhuo 1 Matthew Lentz 1 ABSTRACT Coding agents regularly generate programs that do not compile and require substantial tokens to repair. Yet most repairs are small and local to the edit that caused them. We present Trellis, a system that integrates incremental compiler feedback into code generation to improve code correctness while controlling repair costs. Trellis uses rollback-based search for targeted repair and asynchronous checking and checkpointing for efficient execution. We adapt Clang and tscto Trellis's checker interface and integrate Trellis transparently into OpenCode. On C/C++ and TypeScript software engineering tasks, Trellis improves compilation rate by up to 13% and test pass rate by up to 11% with comparable token consumption to baseline OpenCode. 1 INTRODUCTION Coding agents, such as Codex (OpenAI, 2026), Claude Code (Anthropic, 2026), OpenCode (OpenCode, 2026), and OpenHands (Wang et al., 2025b), are rapidly changing how developers write, test, and review software. With access to compilers, tests, and other tools, agents can check and revise generated code over successive interaction turns (Chen et al., 2024; Yang et al., 2024; Wang et al., 2025b). Tool access, however, does not ensure prompt error detection Figure1.Agent-directed compiler-error repair requires additionalor efficient repair. Unchecked errors can affect subsequentturns to request checks and revise code. Trellis overlaps com-generation or remain unresolved when an agent considerspilation with generation and initiates localized repair within ageneration turn.a Repeated 2025) demonstrates the promise of checking and repairing cycles of reasoning, checking, and revision consume timecode during standalone LLM code generation. Our goal is to improve models, compiler-error repair accounts for as much as 27% the correctness of generated code with comparable token of token use and elapsed time across attempts involvingconsumption. Trellis intercepts file-writing tool calls and repair. Prior work on constrained semantic decoding (Poesia et al., 2022; Mundler et al., 2025; Li et al., 2025a; Nagy streams the generated code to a compiler, overlapping checking with generation (Figure 1).


Beyond Semantic Organization: Memory as Execution State Management for Long-Horizon Agents

arXiv.org Artificial Intelligence

LLM-based agents increasingly tackle long-horizon tasks with interdependent decisions, where each action reshapes future constraints and intermediate errors can cascade. Existing RAG and agent memory systems organize histories by semantic similarity, retrieving content-relevant entries at decision time. We argue that this design mismatches execution-state dependencies: it fragments decision trajectories and mixes valid and erroneous traces, hindering coherent state reconstruction and error isolation. We propose MAGE (Memory as Agent-Guided Exploration), an active execution-state manager that stores interactions in a hierarchical state tree. The agent derives its state from the active root-to-current path, combining subgoal summaries, recent traces, and hints from prior branches. Four coupled operations maintain the tree: Grow records new traces, Compress summarizes completed subgoals, Maintain validates summaries, and Revise restores a target boundary and resumes on a new branch. This design bounds context growth while preserving state integrity and isolating flawed segments from the active path. Experiments on MemoryArena show that MAGE improves the average task success rate by 7.8--20.4 pp over baselines, while reducing token consumption by 55.1%. Code is available at: https://github.com/Komorebi660/MAGE.