EUVIMEDEUVIMED entdecken
Crossref

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

Yitong Zhang, Chengze Li, Ruize Chen, Guowei Yang, Xiaoran Jia, Yijie Ren, Jia Li

ACM Transactions on Software Engineering and Methodology · 07.11.2026

DOI: 10.1145/3862481 ↗

Kurz gefasst

Fachartikel in der Zeitschrift ACM Transactions on Software Engineering and Methodology, online erschienen am 07.11.2026. Verfasst von Yitong Zhang und 6 weiteren Autor:innen. Die Arbeit nennt 61 Literaturangaben.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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.

Zitieren

APA

Zhang, Y., Li, C., Chen, R., Yang, G., Jia, X., Ren, Y., & Li, J. (2026). To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation. ACM Transactions on Software Engineering and Methodology. https://doi.org/10.1145/3862481

Vancouver

Zhang Y, Li C, Chen R, Yang G, Jia X, Ren Y, et al. To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation. ACM Transactions on Software Engineering and Methodology. 2026. doi:10.1145/3862481

BibTeX
@article{Zhang2026,
  author = {Zhang, Yitong and Li, Chengze and Chen, Ruize and Yang, Guowei and Jia, Xiaoran and Ren, Yijie and Li, Jia},
  title = {To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation},
  journal = {ACM Transactions on Software Engineering and Methodology},
  year = {2026},
  doi = {10.1145/3862481}
}
Kostenlos starten →