PofoliaDaily literature tracker

ACM Transactions on Software Engineering and Methodology· 2026Q1

To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation

Yitong Zhang, Chengze Li, Ruize Chen, Guowei Yang et al.

Short summary

PriCoder, a new approach, significantly improves Large Language Models' (LLMs) ability to generate code that correctly uses private libraries, achieving 13.53–31.66 percentage point gains in pass@k on new benchmarks.

AI-generated from the title and abstract; the full text is not read.

Key points

  • PriCoder enhances LLMs' private-library code generation by automatically synthesizing training data.
  • The approach uses a synthesis graph with Progressive Graph Evolution for data diversity and Multidimensional Graph Pruning for data quality.
  • PriCoder achieved 13.53–31.66 percentage point improvements in pass@k on two new private-library benchmarks.
  • Performance gains were observed across multiple LLMs and generally surpassed RAG-based baselines on HumanEval and MBPP.

AI-generated from the title and abstract; the full text is not read.

Abstract

Large Language Models (LLMs) have shown strong potential for code generation, yet they remain limited in private-library-oriented code generation, where models are expected to generate code that correctly invokes APIs from private libraries. Existing approaches primarily rely on retrieving private-library API documentation and injecting the retrieved knowledge into the context at inference time. However, our study shows that this strategy is insufficient: even when provided with accurate required API knowledge, LLMs still struggle to invoke private-library APIs effectively . To address this limitation, we propose PriCoder, an approach that improves LLMs’ ability to invoke private-library APIs through automatically synthesized training data. Specifically, PriCoder uses a synthesis graph to organize private-library data synthesis and applies two complementary operations: ❶ Progressive Graph Evolution , which improves data diversity by progressively synthesizing more complex and diverse training samples from basic ones, and ❷ Multidimensional Graph Pruning , which improves data quality through an automatic filtering pipeline. To support rigorous evaluation, we construct two new benchmarks based on recently released libraries that are unfamiliar to the evaluated models. Across the two private-library benchmarks and all evaluated models, PriCoder improves over Vanilla by 13.53–31.66 percentage points in pass@k . On HumanEval and MBPP, PriCoder generally achieves higher performance than RAG-based baselines.

The authors' abstract, as published at the source. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗

TakeawaysPremium Ask the paperFree account

Continue with a free account

Ask the paper: 5 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.

Continue free on the web

Sign in with Google or Apple; no card needed. You come back to this paper.

On your phone:

Field: Information Systems

Information SystemsComputer Science