Answers are grounded in this paper and cite their sources.
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.
No takes yet. Share an insight, caveat, or question.
Zhang et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: