Abstract
Agentic AI workflows (systems that autonomously plan and act) are becoming widespread, yet their task success rate on complex tasks remains low. A promising solution is inference-time alignment, which uses extra compute at test time to improve performance. Inference-time alignment relies on three components: sampling, evaluation, and feedback. While most prior work studies sampling and automatic evaluation, feedback remains underexplored. To study the role of feedback, we introduce Iterative Agent Decoding (IAD), a procedure that repeatedly inserts feedback extracted from different forms of critiques (reward models or AI-generated textual feedback) between decoding steps. Through IAD, we analyze feedback along four dimensions: (1) its role in the accuracy-compute trade-offs with limited inference budget, (2) quantifying the gains over diversity-only baselines such as best-of-N sampling, (3) effectiveness of composing feedback from reward models versus textual critique, and (4) robustness to noisy or low-quality feedback. Across Sketch2Code, Text2SQL, Intercode, and WebShop, we show that IAD with proper integration of high fidelity feedback leads to consistent gains up to 10 percent absolute performance improvement over various baselines such as best-of-N. Our findings underscore feedback as a crucial knob for inference-time alignment of agentic AI workflows with limited inference budget.
Introduction
Large Language Models (LLMs) are increasingly deployed as autonomous agents to solve multi-step tasks like code generation or web navigation. However, their success rates on complex benchmarks often plateau around 20–30%. The prevailing method for improving performance at inference time is Best-of-N (BoN) sampling, where multiple independent candidates are generated and the best is selected via a verifier.
The limitation of BoN is its "feedback-blind" nature; it treats each sample as an independent attempt, failing to learn from previous errors. This paper introduces Iterative Agent Decoding (IAD), arguing that feedback is the critical "knob" for scaling agent performance. By incorporating directional feedback into the decoding process, IAD moves beyond simple diversity-based sampling to achieve superior accuracy-compute trade-offs.
Methodology: Iterative Agent Decoding (IAD)
IAD is a sequential refinement process that leverages feedback to guide the model toward better solutions. The workflow consists of three primary stages:
- Sampling: The model generates an initial candidate solution based on the user prompt.
- Verification: A verifier (e.g., a reward model or unit test) evaluates the candidate and assigns a score.
- Feedback Integration: This is the core innovation of IAD. Instead of providing a raw numerical score, the system constructs a directional prompt. By identifying the "best" and "worst" attempts from previous iterations, the model is instructed to: "Improve upon the best response while avoiding the mistakes from the worst."
The study evaluates IAD across four diverse environments: Sketch2Code (UI generation), Text2SQL (database querying), Intercode (Bash commands), and WebShop (e-commerce navigation).
Results and Discussion
IAD consistently outperforms BoN and other baselines by up to 10% absolute performance. A key finding is that feedback acts as a "compute multiplier." For instance, in the Sketch2Code task, IAD with only two iterations often surpasses BoN with four or six samples, demonstrating significantly higher compute efficiency.
Key Insights
- Directional Feedback: Comparative feedback (best vs. worst) provides a gradient-like signal that is more effective than simple scalar rewards. LLMs learn better when shown their own successes and failures side-by-side.
- Model Sensitivity: While weaker models (e.g., Gemini 1.5 Flash) see massive gains from IAD, stronger models show narrower gaps, likely due to inherent self-correction capabilities.
- Robustness: IAD remains effective even with noisy feedback, provided the verifier can correctly rank relative performance between samples.
On the BIRD Text2SQL benchmark, IAD enabled Gemini 1.5 Pro to reach 68.05% execution accuracy, outperforming specialized state-of-the-art methods like MAC-SQL. In WebShop, success rates improved from 41.09% (BoN) to 44.68% (IAD).
Conclusion and Future Work
Iterative Agent Decoding demonstrates that feedback is a vital component for inference-time alignment. While IAD introduces a sequential latency trade-off compared to parallel BoN sampling, its gains in accuracy and compute efficiency are substantial. Future research will focus on reducing latency through techniques like speculative decoding and implementing adaptive stopping criteria to optimize the number of refinement iterations.
Summary updated