ARCS: Agentic Retrieval-Augmented Code Synthesis with Iterative Refinement

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Bhattarai, Manish, Cordova, Miguel, Vu, Minh, Santos, Javier, Boureima, Ismael, O'Malley, Dan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908613474254848
author Bhattarai, Manish
Cordova, Miguel
Vu, Minh
Santos, Javier
Boureima, Ismael
O'Malley, Dan
author_facet Bhattarai, Manish
Cordova, Miguel
Vu, Minh
Santos, Javier
Boureima, Ismael
O'Malley, Dan
contents We present Agentic Retrieval-Augmented Code Synthesis (ARCS), a system that improves LLM-based code generation without fine-tuning. ARCS operates through a budgeted synthesize-execute-repair loop over a frozen model: it retrieves relevant code context before generation, proposes candidates, executes them against tests, and repairs based on execution feedback. This retrieval-before-generation design reduces hallucination and accelerates convergence. We formalize ARCS as a state-action process with provable guarantees on termination, monotonic improvement, and bounded cost. A tiered controller (Small/Medium/Large) trades latency for accuracy predictably. On HumanEval, ARCS achieves up to 87.2% pass@1 with Llama-3.1-405B, surpassing CodeAgent (82.3%) while using simpler control than tree-search methods. On TransCoder, it achieves >= 90% accuracy on most translation pairs. On a LANL scientific corpus, it improves CodeBLEU by +0.115 over baseline RAG. ARCS provides a practical, reproducible approach to reliable code synthesis using existing LLM checkpoints.
format Preprint
id arxiv_https___arxiv_org_abs_2504_20434
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ARCS: Agentic Retrieval-Augmented Code Synthesis with Iterative Refinement
Bhattarai, Manish
Cordova, Miguel
Vu, Minh
Santos, Javier
Boureima, Ismael
O'Malley, Dan
Software Engineering
Artificial Intelligence
We present Agentic Retrieval-Augmented Code Synthesis (ARCS), a system that improves LLM-based code generation without fine-tuning. ARCS operates through a budgeted synthesize-execute-repair loop over a frozen model: it retrieves relevant code context before generation, proposes candidates, executes them against tests, and repairs based on execution feedback. This retrieval-before-generation design reduces hallucination and accelerates convergence. We formalize ARCS as a state-action process with provable guarantees on termination, monotonic improvement, and bounded cost. A tiered controller (Small/Medium/Large) trades latency for accuracy predictably. On HumanEval, ARCS achieves up to 87.2% pass@1 with Llama-3.1-405B, surpassing CodeAgent (82.3%) while using simpler control than tree-search methods. On TransCoder, it achieves >= 90% accuracy on most translation pairs. On a LANL scientific corpus, it improves CodeBLEU by +0.115 over baseline RAG. ARCS provides a practical, reproducible approach to reliable code synthesis using existing LLM checkpoints.
title ARCS: Agentic Retrieval-Augmented Code Synthesis with Iterative Refinement
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2504.20434