TL;DR
PriCoder is a novel method that enhances LLMs' ability to generate code using private libraries by synthesizing training data through graph-based techniques, significantly improving performance on new benchmarks.
Contribution
The paper introduces PriCoder, a data synthesis approach using graph operations to teach LLMs private-library API invocation, addressing limitations of retrieval-based methods.
Findings
PriCoder improves private-library code generation by over 20% in pass@1.
It achieves this with negligible impact on general code generation.
Experiments on three mainstream LLMs validate its effectiveness.
Abstract
Large Language Models (LLMs) have shown strong potential for code generation, yet they remain limited in private-library-oriented code generation, where the goal is to generate code using APIs from private libraries. Existing approaches mainly rely on retrieving private-library API documentation and injecting relevant knowledge into the context at inference time. However, our study shows that this is insufficient: even given accurate required knowledge, LLMs still struggle to invoke private-library APIs effectively. To address this limitation, we propose PriCoder, an approach that teaches LLMs to invoke private-library APIs through automatically synthesized data. Specifically, PriCoder models private-library data synthesis as the construction of a graph, and alternates between two graph operators: (1) Progressive Graph Evolution, which improves data diversity by progressively…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
