ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation
- URL: http://arxiv.org/abs/2607.08691v1
- Date: Thu, 09 Jul 2026 16:50:54 GMT
- Title: ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation
- Abstract summary: ProjAgent is a repository-level code generation system that introduces procedural similarity as an explicit retrieval signal.<n>ProjAgent achieves 41.14% Pass@1, outperforming existing retrieval-based baselines.
- Score: 6.0914572974317
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Repository-level code generation requires implementing target functions while accounting for complex cross-file dependencies and project-specific conventions. Existing retrieval methods predominantly rely on lexical, structural, or semantic similarity, often overlooking repository functions that implement similar procedural logic despite differing in identifiers or application domains. We propose ProjAgent, a repository-level code generation system that introduces procedural similarity as an explicit retrieval signal. ProjAgent decomposes the target function into intermediate reasoning steps and employs an agentic workflow to retrieve repository functions that exhibit similar procedural behavior at each step. The retrieved procedural context is integrated with conventional semantic retrieval to construct a richer repository context for code generation. ProjAgent further incorporates a conservative static-analysis feedback loop that iteratively repairs generated code using compiler and static-analysis feedback. Evaluated on REPOCOD, ProjAgent achieves 41.14% Pass@1, outperforming existing retrieval-based baselines. These results demonstrate that procedural similarity is an effective and previously unexplored retrieval dimension for repository-level code generation.
Related papers
- Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation [53.85136813868056]
ACToR is an adaptive critical token-aware retrieval framework for repository-level code generation.<n>We show that ACToR consistently outperforms state-of-the-art methods on repository-level benchmarks.
arXiv Detail & Related papers (2026-09-01T17:59:39Z) - AgentX: Towards Agent-Driven Self-Iteration of Industrial Recommender Systems [82.01232437066487]
AgentX is a production-deployed multi-agent system that restructures this production function.<n>It autonomously generates, implements, evaluates, and learns from recommendation experiments.<n>AgentX orchestrates four tightly coupled stages in a closed loop.
arXiv Detail & Related papers (2026-06-25T10:42:28Z) - RepoMirage: Probing Repository Context Reasoning in Code Agents with Perturbations [51.43574078961796]
We introduce RepoMirage, a two-stage evaluation suite built on SWE-Bench Verified.<n>RepoMirage-Perturb applies three types of semantics-preserving repository-level perturbations, revealing a clear performance drop when correct solving requires broader context access.<n>We propose RepoAnchor, a structure-first prototype workflow that separates repository exploration from downstream problem solving.
arXiv Detail & Related papers (2026-05-25T06:26:43Z) - Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentation [27.40384564559557]
We propose MemDocAgent, a framework that generates documentation within a single, integrated context spanning the entire repository.<n>MemDocAgent achieves the best performance over both open and closed-source baselines.
arXiv Detail & Related papers (2026-05-14T08:35:20Z) - Understanding by Reconstruction: Reversing the Software Development Process for LLM Pretraining [66.89012795621349]
Large Language Models (LLMs) often struggle with the deep, long-horizon reasoning required for complex software engineering.<n>We propose a novel paradigm: understanding via reconstruction.<n>We introduce a framework that synthesizes latent agentic trajectories using a multi-agent simulation.
arXiv Detail & Related papers (2026-03-11T09:23:20Z) - Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond [13.550121154853715]
We present Hydra, a repository-level code generation framework that treats code as structured code rather than natural language.<n>We show that Hydra achieves state-of-the-art performance across open- and closed-source CodeLLMs.
arXiv Detail & Related papers (2026-02-12T07:44:00Z) - A Benchmark for Procedural Memory Retrieval in Language Agents [0.023227405857540805]
Current AI agents excel in familiar settings, but fail sharply when faced with novel tasks with unseenProc.<n>We present the first benchmark that isolates procedural memory retrieval from task execution.<n>Our results expose a clear generalization cliff: embedding-based methods perform strongly on familiar contexts, yet degrade considerably on novel ones.
arXiv Detail & Related papers (2025-11-21T08:08:53Z) - Beyond Function-Level Search: Repository-Aware Dual-Encoder Code Retrieval with Adversarial Verification [11.965887077524577]
We introduce RepoAlign-Bench, the first benchmark designed to evaluate repository-level code retrieval under change request driven scenarios.<n>We propose ReflectCode, an adversarial reflection augmented dual-tower architecture featuring disentangled code_encoder and doc_encoder components.<n>Experiments demonstrate that ReflectCode achieves 12.2% improvement in Top-5 Accuracy and 7.1% in Recall over state-of-the-art baselines.
arXiv Detail & Related papers (2025-10-16T18:47:04Z) - RepoScope: Leveraging Call Chain-Aware Multi-View Context for Repository-Level Code Generation [16.544483144957407]
RepoScope is a call chain-aware multi-view context for repository-level code generation.<n>We present a novel call chain prediction method that utilizes the repository's structural semantics to improve the identification of callees in the target function.<n>RepoScope outperforms state-of-the-art methods, achieving up to a 36.35% relative improvement in pass@1 scores.
arXiv Detail & Related papers (2025-07-20T02:35:36Z) - Generative Retrieval as Multi-Vector Dense Retrieval [71.75503049199897]
Generative retrieval generates identifiers of relevant documents in an end-to-end manner.
Prior work has demonstrated that generative retrieval with atomic identifiers is equivalent to single-vector dense retrieval.
We show that generative retrieval and multi-vector dense retrieval share the same framework for measuring the relevance to a query of a document.
arXiv Detail & Related papers (2024-03-31T13:29:43Z) - RepoCoder: Repository-Level Code Completion Through Iterative Retrieval
and Generation [96.75695811963242]
RepoCoder is a framework to streamline the repository-level code completion process.
It incorporates a similarity-based retriever and a pre-trained code language model.
It consistently outperforms the vanilla retrieval-augmented code completion approach.
arXiv Detail & Related papers (2023-03-22T13:54:46Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.