Enhancing Project-Specific Code Completion by Inferring Internal API Information
Not on the map. Why?
Abstract (arXiv)
Project-specific code completion is a critical task that leverages context from a project to generate accurate code. State-of-the-art methods use retrieval-augmented generation (RAG) with large language models (LLMs) and project information for code completion. However, they often struggle to incorporate internal API information, which is crucial for accuracy, especially when APIs are not explicitly imported in the file. To address this, we propose a method to infer internal API information without relying on imports. Our method extends the representation of APIs by constructing usage examples and semantic descriptions, building a knowledge base for LLMs to generate relevant completions. We also introduce ProjBench, a benchmark that avoids leaked imports and consists of large-scale real-world projects. Experiments on ProjBench and CrossCodeEval show that our approach significantly outperforms existing methods, improving code exact match by 22.72% and identifier exact match by 18.31%. Additionally, integrating our method with existing baselines boosts code match by 47.80% and identifier match by 35.55%.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 31 of its 47 references that are in the map. First posted on arXiv 28 Jul 2025.
Builds on
31 of 47 references.
References · 31
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2023StarCoder: may the source be with you!cited by 799
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
19 more
- 2023In-Context Learning Creates Task Vectorscited by 312
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 183
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2022Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generationcited by 94
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 65
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 46
- 2024RLCoder: Reinforcement Learning for Repository-Level Code Completioncited by 44
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 38
- 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
- 2024Teaching Code LLMs to Use Autocompletion Tools in Repository-Level Code Generationcited by 30
- 2023Guiding Language Models of Code with Global Context using Monitorscited by 20
- 2021Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchycited by 14
- 2024DevEval: Evaluating Code Generation in Practical Software Projectscited by 9
- 2023Practitioners' Expectations on Code Completioncited by 8
- 2024Full Line Code Completion: Bringing AI to Desktopcited by 4
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
- 2026MHRC-Bench: A Multilingual Hardware Repository-Level Code Completion benchmarkcited by 1
- 2025GAPO: Robust Advantage Estimation for Real-World Code LLMscited by 0
- 2026LegacyTranslate: LLM-based Multi-Agent Method for Legacy Code Translationcited by 0
- 2026Agentic Application in Power Grid Static Analysis: Automatic Code Generation and Error Correctioncited by 0
- 2026Agentic Application in Power Grid Static Analysis: Automatic Code Generation and Error Correction11 Apr 2026
- 2026LegacyTranslate: LLM-based Multi-Agent Method for Legacy Code Translation14 Mar 2026
- 2026MHRC-Bench: A Multilingual Hardware Repository-Level Code Completion benchmark7 Jan 2026
- 2025GAPO: Robust Advantage Estimation for Real-World Code LLMs22 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2024Retrieval-augmented code completion for local projects using large language models
- 2025Completion by Comprehension: Guiding Code Generation with Multi-Granularity Understanding
- 2026Diagnosing Knowledge Gaps in LLM Tool Use: An Agentic Benchmark for Novel API Acquisition
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model
- 2025A Deep Dive into Retrieval-Augmented Generation for Code Completion: Experience on WeChat
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond