When Language Model Meets Private Library
Not on the map. Why?
Abstract (arXiv)
With the rapid development of pre-training techniques, a number of language models have been pre-trained on large-scale code corpora and perform well in code generation. In this paper, we investigate how to equip pre-trained language models with the ability of code generation for private libraries. In practice, it is common for programmers to write code using private libraries. However, this is a challenge for language models since they have never seen private APIs during training. Motivated by the fact that private libraries usually come with elaborate API documentation, we propose a novel framework with two modules: the APIRetriever finds useful APIs, and then the APICoder generates code using these APIs. For APIRetriever, we present a dense retrieval system and also design a friendly interaction to involve uses. For APICoder, we can directly use off-the-shelf language models, or continually pre-train the base model on a code corpus containing API information. Both modules are trained with data from public libraries and can be generalized to private ones. Furthermore, we craft three benchmarks for private libraries, named TorchDataEval, MonkeyEval, and BeatNumEval. Experimental results demonstrate the impressive performance of our framework.
Key facts. Cited by 54 papers in the map (data through 7 Oct 2026). Builds on 33 of its 41 references that are in the map. First posted on arXiv 31 Oct 2022.
Builds on
33 of 41 references.
References · 33
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
21 more
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2020Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrievalcited by 846
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021ColBERTv2: Effective and Efficient Retrieval via Lightweight Late Interactioncited by 464
- 2020RocketQA: An Optimized Training Approach to Dense Passage Retrieval for Open-Domain Question Answeringcited by 410
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2022From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effectivecited by 98
- 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generationcited by 87
- 2016Deep API Learningcited by 41
- 2021Programming Puzzlescited by 25
Built on by
Citing papers per year: 2022: 1; 2023: 10; 2024: 26; 2025: 9; 2026: 8.
54 papers.
Sort:
By area:
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2022Large Language Models Meet NL2Code: A Surveycited by 135
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 92
- 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedbackcited by 69
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 65
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2023BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Modelscited by 53
38 more
- 2024Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL Generationcited by 49
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 45
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2025MultiKernelBench: A Multi-Platform Benchmark for Kernel Generationcited by 35
- 2024SWE-bench-java: A GitHub Issue Resolving Benchmark for Javacited by 34
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2023BioCoder: A Benchmark for Bioinformatics Code Generation with Large Language Modelscited by 24
- 2024EVOR: Evolving Retrieval for Code Generationcited by 22
- 2023Guiding Language Models of Code with Global Context using Monitorscited by 20
- 2024Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agentscited by 17
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generationcited by 16
- 2024Distance between Relevant Information Pieces Causes Bias in Long-Context LLMscited by 15
- 2024Towards LifeSpan Cognitive Systemscited by 13
- 2024Top General Performance = Top Domain Performance? DomainCodeBench: A Multi-domain Code Generation Benchmarkcited by 13
- 2024DocCGen: Document-based Controlled Code Generationcited by 11
- 2025A Survey on Transformer Context Extension: Approaches and Evaluationcited by 11
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generationcited by 10
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarkscited by 9
- 2024CATCODER: Repository-Level Code Generation with Relevant Code and Type Contextcited by 8
- 2025RESCUE: Retrieval Augmented Secure Code Generationcited by 7
- 2025Impact-driven Context Filtering For Cross-file Code Completioncited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2024Exploring Data-Efficient Adaptation of Large Language Models for Code Generationcited by 3
- 2024Improving Long Text Understanding with Knowledge Distilled from Summarization Modelcited by 3
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2026To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generationcited by 3
- 2026Learning from Execution: Self-Evolving Memory for Private-Library Code Generationcited by 2
- 2025ASPERA: A Simulated Environment to Evaluate Planning for Complex Action Executioncited by 1
- 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Studycited by 1
- 2026Unseen-Codebases-Domain Data Synthesis and Training Based on Code Graphscited by 1
- 2023Resources and Evaluations for Multi-Distribution Dense Information Retrievalcited by 0
- 2023Safurai 001: New Qualitative Approach for Code LLM Evaluationcited by 0
- 2023Safurai-Csharp: Harnessing Synthetic Data to improve language-specific Code LLMcited by 0
- 2024SwissNYF: Tool Grounded LLM Agents for Black Box Settingcited by 0
- 2024Assessing the Answerability of Queries in Retrieval-Augmented Code Generationcited by 0
- 2024Two Heads Are Better Than One: Collaborative LLM Embodied Agents for Human-Robot Interactioncited by 0
50 most cited of 54 All 54 (JSON)
- 2026Can Agents Design Libraries for Agents?29 Sep 2026
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026Decode-Time Grammars: Constrained LLM Generation over a Refinement Order of Grammar Fragments20 Jul 2026
- 2026MONA: Muon Optimizer with Nesterov Acceleration for Scalable Language Model Training26 May 2026
- 2026Learning from Execution: Self-Evolving Memory for Private-Library Code Generation27 Apr 2026
- 2026To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation16 Mar 2026
- 2026Unseen-Codebases-Domain Data Synthesis and Training Based on Code Graphs24 Feb 2026
- 2026From What to How: Bridging User Requirements with Software Development Using Large Language Models14 Feb 2026
- 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Study29 Nov 2025
- 2025RESCUE: Retrieval Augmented Secure Code Generation21 Oct 2025
- 2025Impact-driven Context Filtering For Cross-file Code Completion8 Aug 2025
- 2025ASPERA: A Simulated Environment to Evaluate Planning for Complex Action Execution21 Jul 2025
38 more
- 2025MultiKernelBench: A Multi-Platform Benchmark for Kernel Generation20 Jul 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generation11 Apr 2025
- 2025A Survey on Transformer Context Extension: Approaches and Evaluation17 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2024Top General Performance = Top Domain Performance? DomainCodeBench: A Multi-domain Code Generation Benchmark24 Dec 2024
- 2024Two Heads Are Better Than One: Collaborative LLM Embodied Agents for Human-Robot Interaction23 Nov 2024
- 2024Assessing the Answerability of Queries in Retrieval-Augmented Code Generation8 Nov 2024
- 2024Distance between Relevant Information Pieces Causes Bias in Long-Context LLMs18 Oct 2024
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languages4 Oct 2024
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation30 Sep 2024
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generation24 Sep 2024
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2024Towards LifeSpan Cognitive Systems20 Sep 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024SWE-bench-java: A GitHub Issue Resolving Benchmark for Java26 Aug 2024
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions22 Jun 2024
- 2024DocCGen: Document-based Controlled Code Generation17 Jun 2024
- 2024CATCODER: Repository-Level Code Generation with Relevant Code and Type Context5 Jun 2024
- 2024Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL Generation24 May 2024
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models10 May 2024
- 2024Improving Long Text Understanding with Knowledge Distilled from Summarization Model8 May 2024
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing30 Apr 2024
- 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarks15 Apr 2024
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedback25 Mar 2024
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completion15 Mar 2024
- 2024Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agents8 Mar 2024
- 2024Exploring Data-Efficient Adaptation of Large Language Models for Code Generation29 Feb 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024EVOR: Evolving Retrieval for Code Generation19 Feb 2024
- 2024SwissNYF: Tool Grounded LLM Agents for Black Box Setting15 Feb 2024
- 2023Safurai-Csharp: Harnessing Synthetic Data to improve language-specific Code LLM6 Nov 2023
- 2023BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Models23 Sep 2023
- 2023Safurai 001: New Qualitative Approach for Code LLM Evaluation20 Sep 2023
- 2023BioCoder: A Benchmark for Bioinformatics Code Generation with Large Language Models31 Aug 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedback27 Jul 2023
- 2023Resources and Evaluations for Multi-Distribution Dense Information Retrieval21 Jun 2023
50 newest of 54 All 54 (JSON)
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2024EVOR: Evolving Retrieval for Code Generationcited by 22
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generationcited by 10
- 2025RESCUE: Retrieval Augmented Secure Code Generationcited by 7
- 2025Impact-driven Context Filtering For Cross-file Code Completioncited by 5
- 2026Learning from Execution: Self-Evolving Memory for Private-Library Code Generationcited by 2
- 2024Assessing the Answerability of Queries in Retrieval-Augmented Code Generationcited by 0
- 2026Learning from Execution: Self-Evolving Memory for Private-Library Code Generation27 Apr 2026
- 2025RESCUE: Retrieval Augmented Secure Code Generation21 Oct 2025
- 2025Impact-driven Context Filtering For Cross-file Code Completion8 Aug 2025
- 2024Assessing the Answerability of Queries in Retrieval-Augmented Code Generation8 Nov 2024
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generation24 Sep 2024
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models10 May 2024
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing30 Apr 2024
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completion15 Mar 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024EVOR: Evolving Retrieval for Code Generation19 Feb 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2024Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agentscited by 17
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generationcited by 16
- 2024SwissNYF: Tool Grounded LLM Agents for Black Box Settingcited by 0
- 2024Two Heads Are Better Than One: Collaborative LLM Embodied Agents for Human-Robot Interactioncited by 0
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generation11 Apr 2025
- 2024Two Heads Are Better Than One: Collaborative LLM Embodied Agents for Human-Robot Interaction23 Nov 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agents8 Mar 2024
- 2024SwissNYF: Tool Grounded LLM Agents for Black Box Setting15 Feb 2024
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2022Large Language Models Meet NL2Code: A Surveycited by 135
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 92
- 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedbackcited by 69
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 65
- 2023BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Modelscited by 53
- 2024Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL Generationcited by 49
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 45
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2025MultiKernelBench: A Multi-Platform Benchmark for Kernel Generationcited by 35
12 most cited of 34 All 34 (JSON)
- 2026Can Agents Design Libraries for Agents?29 Sep 2026
- 2026Decode-Time Grammars: Constrained LLM Generation over a Refinement Order of Grammar Fragments20 Jul 2026
- 2026To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation16 Mar 2026
- 2026From What to How: Bridging User Requirements with Software Development Using Large Language Models14 Feb 2026
- 2025ASPERA: A Simulated Environment to Evaluate Planning for Complex Action Execution21 Jul 2025
- 2025MultiKernelBench: A Multi-Platform Benchmark for Kernel Generation20 Jul 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2025A Survey on Transformer Context Extension: Approaches and Evaluation17 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2024Top General Performance = Top Domain Performance? DomainCodeBench: A Multi-domain Code Generation Benchmark24 Dec 2024
- 2024Distance between Relevant Information Pieces Causes Bias in Long-Context LLMs18 Oct 2024
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languages4 Oct 2024
12 newest of 34 All 34 (JSON)