AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion
Not on the map. Why?
Abstract (arXiv)
Repository-level code completion remains a challenging task for existing code large language models (code LLMs) due to their limited understanding of repository-specific context and domain knowledge. While retrieval-augmented generation (RAG) approaches have shown promise by retrieving relevant code snippets as cross-file context, they suffer from two fundamental problems: misalignment between the query and the target code in the retrieval process, and the inability of existing retrieval methods to effectively utilize the inference information. To address these challenges, we propose AlignCoder, a repository-level code completion framework that introduces a query enhancement mechanism and a reinforcement learning based retriever training method. Our approach generates multiple candidate completions to construct an enhanced query that bridges the semantic gap between the initial query and the target code. Additionally, we employ reinforcement learning to train an AlignRetriever that learns to leverage inference information in the enhanced query for more accurate retrieval. We evaluate AlignCoder on two widely-used benchmarks (CrossCodeEval and RepoEval) across five backbone code LLMs, demonstrating an 18.1% improvement in EM score compared to baselines on the CrossCodeEval benchmark. The results show that our framework achieves superior performance and exhibits high generalizability across various code LLMs and programming languages.
Key facts. Cited by 7 papers in the map (data through 13 Oct 2026). Builds on 105 of its 135 references that are in the map. First posted on arXiv 27 Jan 2026.
Builds on
105 of 135 references.
References · 105
- 2021Evaluating Large Language Models Trained on Codecited by 8,205
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,831
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,797
- 2021Program Synthesis with Large Language Modelscited by 3,573
- 2023Code Llama: Open Foundation Models for Codecited by 2,130
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,386
- 2024Qwen2.5-Coder Technical Reportcited by 1,179
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,173
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 829
- 2023StarCoder: may the source be with you!cited by 797
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 499
- 2025Search-o1: Agentic Search-Enhanced Large Reasoning Modelscited by 426
38 more
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funnelingcited by 422
- 2023Making Retrieval-Augmented Language Models Robust to Irrelevant Contextcited by 367
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 362
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 360
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 280
- 2023Prompt Cache: Modular Attention Reuse for Low-Latency Inferencecited by 258
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2024Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inferencecited by 232
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 182
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 152
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2023Query2doc: Query Expansion with Large Language Modelscited by 148
- 2024Design2Code: Benchmarking Multimodal Code Generation for Automated Front-End Engineeringcited by 147
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
- 2022Large Language Models Meet NL2Code: A Surveycited by 137
- 2024MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue Resolutioncited by 132
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 118
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 111
- 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 111
- 2025S*: Test Time Scaling for Code Generationcited by 96
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 93
- 2025SWE-Fixer: Training Open-Source LLMs for Effective and Efficient GitHub Issue Resolutioncited by 88
- 2024AnalogCoder: Analog Circuit Design via Training-Free Code Generationcited by 83
- 2024CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completioncited by 75
- 2024WKVQuant: Quantizing Weight and Key/Value Cache for Large Language Models Gains Morecited by 69
- 2023Towards an Understanding of Large Language Models in Software Engineering Taskscited by 68
- 2023A Survey of Large Language Models for Code: Evolution, Benchmarking, and Future Trendscited by 66
- 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 65
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 56
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 54
- 2025SWE-Debate: Competitive Multi-Agent Debate for Software Issue Resolutioncited by 53
- 2021On the Evaluation of Neural Code Summarizationcited by 48
50 most cited of 105 All 105 (JSON)
Built on by
Citing papers per year: 2026: 7.
7 papers.
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generationcited by 1
- 2026SWE-Gate: Passing Functional Tests Is Not Enough for Software Engineering Agentscited by 1
- 2026How Does Chunking Affect Retrieval-Augmented Code Completion? A Controlled Empirical Studycited by 0
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generationcited by 0
- 2026Efficient SWE Agent Benchmarking via Trajectory-Aware Evaluationcited by 0
- 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generationcited by 0
- 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generation22 Sep 2026
- 2026SWE-Gate: Passing Functional Tests Is Not Enough for Software Engineering Agents3 Sep 2026
- 2026Efficient SWE Agent Benchmarking via Trajectory-Aware Evaluation1 Sep 2026
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation1 Sep 2026
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation3 Aug 2026
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agents21 Jul 2026
- 2026How Does Chunking Affect Retrieval-Augmented Code Completion? A Controlled Empirical Study6 May 2026
Similar, not cited
Close in wording, no citation either way
- 2024Retrieval-augmented code completion for local projects using large language models
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
- 2025Impact-driven Context Filtering For Cross-file Code Completion
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
- 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generation
- 2024Prompt-based Code Completion via Multi-Retrieval Augmented Generation
- 2025FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond