ROAD: Reflective Optimization via Automated Debugging for Zero-Shot Agent Alignment
Natchaya Temyingyong, Daman Jain, Neeraj Kumarsahu, Prabhat Kumar, Rachata Phondi, Wachiravit Modecrua, Krittanon Kaewtawee, Krittin Pachtrachai, Touchapon Kraisingkorn
TL;DR
ROAD addresses the data-scarce reality of deploying LLM-based agents by reframing optimization as a dynamic debugging loop driven by production failures. It employs a multi-agent system (Analyzer, Optimizer, Coach) to extract root causes, synthesize a deterministic Decision Tree Protocol, and iteratively evolve the primary agent's prompt. Across both a standardized academic benchmark and a live KM engine, ROAD demonstrates data-efficient gains, including a 5.6% increase in success rate and a 3.8% rise in search accuracy within three automated iterations, plus about 19% improvement on complex retail tasks. This work highlights that mimicking human failure analysis and patching can achieve reliable, scalable improvements without costly RL training, enabling rapid deployment in data-scarce environments.
Abstract
Automatic Prompt Optimization (APO) has emerged as a critical technique for enhancing Large Language Model (LLM) performance, yet current state-of-the-art methods typically rely on large, labeled gold-standard development sets to compute fitness scores for evolutionary or Reinforcement Learning (RL) approaches. In real-world software engineering, however, such curated datasets are rarely available during the initial cold start of agent development, where engineers instead face messy production logs and evolving failure modes. We present ROAD (Reflective Optimization via Automated Debugging), a novel framework that bypasses the need for refined datasets by treating optimization as a dynamic debugging investigation rather than a stochastic search. Unlike traditional mutation strategies, ROAD utilizes a specialized multi-agent architecture, comprising an Analyzer for root-cause analysis, an Optimizer for pattern aggregation, and a Coach for strategy integration, to convert unstructured failure logs into robust, structured Decision Tree Protocols. We evaluated ROAD across both a standardized academic benchmark and a live production Knowledge Management engine. Experimental results demonstrate that ROAD is highly sample-efficient, achieving a 5.6 percent increase in success rate (73.6 percent to 79.2 percent) and a 3.8 percent increase in search accuracy within just three automated iterations. Furthermore, on complex reasoning tasks in the retail domain, ROAD improved agent performance by approximately 19 percent relative to the baseline. These findings suggest that mimicking the human engineering loop of failure analysis and patching offers a viable, data-efficient alternative to resource-intensive RL training for deploying reliable LLM agents.
