Domain Adaptive Code Completion via Language Models and Decoupled Domain Databases
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated remarkable performance in code completion. However, due to the lack of domain-specific knowledge, they may not be optimal in completing code that requires intensive domain knowledge for example completing the library names. Although there are several works that have confirmed the effectiveness of fine-tuning techniques to adapt language models for code completion in specific domains. They are limited by the need for constant fine-tuning of the model when the project is in constant iteration. To address this limitation, in this paper, we propose kNM-LM, a retrieval-augmented language model (R-LM), that integrates domain knowledge into language models without fine-tuning. Different from previous techniques, our approach is able to automatically adapt to different language models and domains. Specifically, it utilizes the in-domain code to build the retrieval-based database decoupled from LM, and then combines it with LM through Bayesian inference to complete the code. The extensive experiments on the completion of intra-project and intra-scenario have confirmed that kNM-LM brings about appreciable enhancements when compared to CodeGPT and UnixCoder. A deep analysis of our tool including the responding speed, storage usage, specific type code completion, and API invocation completion has confirmed that kNM-LM provides satisfactory performance, which renders it highly appropriate for domain adaptive code completion. Furthermore, our approach operates without the requirement for direct access to the language model's parameters. As a result, it can seamlessly integrate with black-box code completion models, making it easy to integrate our approach as a plugin to further enhance the performance of these models.
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). First posted on arXiv 18 Aug 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 7; 2025: 9; 2026: 2.
19 papers.
Sort:
By area:
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
- 2024LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systemscited by 20
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2024Prompt-based Code Completion via Multi-Retrieval Augmented Generationcited by 16
- 2023A Simple yet Efficient Ensemble Approach for AI-generated Text Detectioncited by 12
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systemscited by 7
- 2025Marking Code Without Breaking It: Code Watermarking for Detecting LLM-Generated Codecited by 7
7 more
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2026KOCO-BENCH: Can Large Language Models Leverage Domain Knowledge in Software Development?cited by 5
- 2025RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industrycited by 4
- 2025AI-generated Text Detection: A Multifaceted Approach to Binary and Multiclass Classificationcited by 3
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
- 2025Optimizing LLM Code Suggestions: Feedback-Driven Timing with Lightweight State Boundscited by 2
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completioncited by 0
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026KOCO-BENCH: Can Large Language Models Leverage Domain Knowledge in Software Development?19 Jan 2026
- 2025Optimizing LLM Code Suggestions: Feedback-Driven Timing with Lightweight State Bounds24 Nov 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion13 Aug 2025
- 2025RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industry21 May 2025
- 2025AI-generated Text Detection: A Multifaceted Approach to Binary and Multiclass Classification15 May 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond26 Mar 2025
- 2025Marking Code Without Breaking It: Code Watermarking for Detecting LLM-Generated Code26 Feb 2025
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representations22 Jan 2025
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems29 Nov 2024
7 more
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model11 Jun 2024
- 2024Prompt-based Code Completion via Multi-Retrieval Augmented Generation13 May 2024
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systems8 Jan 2024
- 2023A Simple yet Efficient Ensemble Approach for AI-generated Text Detection6 Nov 2023
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2024Prompt-based Code Completion via Multi-Retrieval Augmented Generationcited by 16
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systemscited by 7
- 2025RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industrycited by 4
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completioncited by 0
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion13 Aug 2025
- 2025RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industry21 May 2025
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond26 Mar 2025
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems29 Nov 2024
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model11 Jun 2024
- 2024Prompt-based Code Completion via Multi-Retrieval Augmented Generation13 May 2024
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systemscited by 20
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2023A Simple yet Efficient Ensemble Approach for AI-generated Text Detectioncited by 12
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2026KOCO-BENCH: Can Large Language Models Leverage Domain Knowledge in Software Development?cited by 5
- 2025AI-generated Text Detection: A Multifaceted Approach to Binary and Multiclass Classificationcited by 3
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
- 2025Optimizing LLM Code Suggestions: Feedback-Driven Timing with Lightweight State Boundscited by 2
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026KOCO-BENCH: Can Large Language Models Leverage Domain Knowledge in Software Development?19 Jan 2026
- 2025Optimizing LLM Code Suggestions: Feedback-Driven Timing with Lightweight State Bounds24 Nov 2025
- 2025AI-generated Text Detection: A Multifaceted Approach to Binary and Multiclass Classification15 May 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representations22 Jan 2025
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2024LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systems8 Jan 2024
- 2023A Simple yet Efficient Ensemble Approach for AI-generated Text Detection6 Nov 2023
Similar, not cited
Close in wording, no citation either way
- 2024Retrieval-augmented code completion for local projects using large language models
- 2022ReACC: A Retrieval-Augmented Code Completion Framework
- 2024A Lightweight Framework for Adaptive Retrieval In Code Completion With Critique Model
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completion
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2025A Code Comprehension Benchmark for Large Language Models for Code
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond