ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 31 of its 49 references that are in the map. First posted on arXiv 9 Jul 2026.
Builds on
31 of 49 references.
References · 31
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 784
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2022Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskcited by 431
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
19 more
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 282
- 2021All Bark and No Bite: Rogue Dimensions in Transformer Language Models Obscure Representational Qualitycited by 156
- 2025EmbeddingGemma: Powerful and Lightweight Text Representationscited by 139
- 2024The Good, The Bad, and The Greedy: Evaluation of LLMs Should Not Ignore Non-Determinismcited by 116
- 2022Productivity Assessment of Neural Code Completioncited by 98
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 72
- 2025Can LLMs Replace Human Evaluators? An Empirical Study of LLM-as-a-Judge in Software Engineeringcited by 67
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
- 2024Customizing Language Model Responses with Contrastive In-Context Learningcited by 19
- 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completioncited by 15
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completioncited by 12
- 2024Can Language Models Replace Programmers for Coding? REPOCOD Says 'Not Yet'cited by 7
- 2025HARP: Hallucination Detection via Reasoning Subspace Projectioncited by 5
- 2026SemaClaw: A Step Towards General-Purpose Personal AI Agents through Harness Engineeringcited by 5
- 2025Cleanse: Uncertainty Estimation Approach Using Clustering-based Semantic Consistency in LLMscited by 3
- 2025SpecAgent: A Speculative Retrieval and Forecasting Agent for Code Completioncited by 3
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyondcited by 3
- 2026Bridging the Programming Language Gap: Constructing a Multilingual Shared Semantic Space through AST Unification and Graph Matchingcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation
- 2026TICoder: A Repository-Level Code Generation Framework with Test-Driven Planning and Implementation-Aware Reuse ↗
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation
- 2024On The Importance of Reasoning for Context Retrieval in Repository-Level Code Editing
- 2025FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
- 2026Better Call Grep: Evaluating and Improving Grep-Like Lexical Retrieval for Repository-Level Code Completion