Skip to main content
QUICK REVIEW

[논문 리뷰] To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation

Yitong Zhang, Chengze Li|arXiv (Cornell University)|2026. 03. 16.
Software Engineering Research인용 수 0
한 줄 요약

PriCoder는 그래프 기반 데이터 생성 프로세스를 통해 고품질 학습 데이터를 자동으로 합성하여 LLM이 프라이빗 라이브러리 API를 호출하도록 가르치고, 일반 코드 작업에 미치는 영향은 최소화하면서 프라이빗 라이브러리 지향 코드 생성을 크게 개선합니다.

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 synthesizing more diverse training samples from basic ones, and (2) Multidimensional Graph Pruning, which improves data quality through a rigorous filtering pipeline. To support rigorous evaluation, we construct two new benchmarks based on recently released libraries that are unfamiliar to the tested models. Experiments on three mainstream LLMs show that PriCoder substantially improves private-library-oriented code generation, yielding gains of over 20% in pass@1 in many settings, while causing negligible impact on general code generation capability. Our code and benchmarks are publicly available at https://github.com/eniacode/PriCoder.

연구 동기 및 목표

  • 코드 생성 task에서 LLM이 프라이빗 라이브러리 API 호출을 효과적으로 수행하는 데 API 지식만으로는 충분하지 않다는 것을 입증한다.
  • 프라이빗 라이브러리 호출을 위한 LLM 학습용 그래프 기반 데이터 합성 프레임워크인 PriCoder를 도입한다.
  • PriCoder가 미지의 라이브러리에 대한 프라이빗 라이브러리 지향 코드 생성을 개선하고 일반 코드 작업에 미치는 영향은 미미함을 보여준다.
  • 평가 모델에 친숙하지 않은 라이브러리를 사용한 엄격한 벤치마크를 제공하여 프라이빗 라이브러리 능력을 평가한다.

제안 방법

  • API와 샘플 노드를 포함한 그래프 구성으로 프라이빗 라이브러리 데이터 합성을 모델링한다.
  • 그래프를 확장하고 다양한 학습 샘플을 생성하기 위해 Progressive Graph Evolution을 사용한다.
  • 통사적, 실행적 및 기능적 검사를 통해 저질 샘플을 제거하기 위해 Multidimensional Graph Pruning을 적용한다.
  • 합성 데이터 세트에서 최대 우도 학습 objective로 LLM을 미세 조정한다.
  • Retrieved API 지식을 포함한 프롬프트를 보강하여 PriCoder를 Retrieval-Augmented Generation과 결합할 수 있다.

실험 결과

연구 질문

  • RQ1RQ1: PriCoder는 베이스라인과 비교하여 프라이빗 라이브러리 지향 코드 생성에서 어떻게 성능을 보이나?
  • RQ2RQ2: PriCoder가 공개 벤치마크에서 일반 코드 생성 능력을 악화시키는가?
  • RQ3RQ3: PriCoder 구성요소 각각의 기여도는 무엇인가요(Progressive Graph Evolution과 Multidimensional Graph Pruning)?
  • RQ4RQ4: 데이터 합성의 규모와 선택된 LLM이 PriCoder의 효과에 어떤 영향을 미치는가?

주요 결과

  • PriCoder는 프라이빗 라이브러리 지향 코드 생성을 크게 향상시키며, 세 가지 주류 LLM에서 다수의 설정에서 pass@1이 20% 이상 향상된다.
  • 새로운 벤치마크 NdonnxEval 및 NumbaEval에서 다수의 설정에서 pass@k가 30% 이상 향상되는 이득이 관찰된다.
  • 일반 코드 생성 능력에 미치는 영향은 미미하며(공개 벤치마크에서 입증된 바와 같이).
  • 소거 실험은 Progressive Graph Evolution과 Multidimensional Graph Pruning이 모두 효과에 필수적임을 확인한다.
  • 두 가지 신규 프라이빗 라이브러리 벤치마크 NdonnxEval과 NumbaEval은 PriCoder 없이 API 호출에 대해 모델이 여전히 어려움을 겪고 있음을 보여주며, 이 접근 방식의 가치가 강조된다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.