SEAILGPLAug 29, 2025

APRIL: API Synthesis with Automatic Prompt Optimization and Reinforcement Learning

arXiv:2509.25196v12 citationsh-index: 52
Originality Incremental advance
AI Analysis

This addresses the challenge of API composition for software developers, offering a scalable solution for large libraries, though it appears incremental as it builds on existing LLM-based synthesis methods.

The paper tackles the problem of synthesizing APIs from large libraries, which is difficult due to the exponential search space and issues like hallucinations in LLM-generated code, by presenting APRIL, an approach combining Automatic Prompt Optimization and Reinforcement Learning from Verifiable Rewards, achieving substantial improvements over instruction-tuned LLMs with expert prompts on 81 real-world APIs from scientific Python libraries.

APIs are central to modern software development, yet composing new APIs from large libraries is difficult due to the exponential search space; traditional component-based synthesis relies on costly exploration and hand-crafted specifications. While large language models (LLMs) can generate implementations from natural language, hallucinations and limited access to up-to-date contextual information often yield incorrect code. In this paper, we present APRIL, an approach that combines LLM-based synthesis with Automatic Prompt Optimization (APO) and Reinforcement Learning from Verifiable Rewards (RLVR): APO iteratively refines prompts for a frozen model, while RLVR fine-tunes the policy toward functional correctness, producing an efficient synthesis pipeline. Evaluated on 81 real-world APIs from widely used scientific Python libraries and benchmarked against instruction-tuned but unfine-tuned LLMs guided by expert prompts, APRIL achieves substantial improvements. These results indicate that integrating APO and RLVR provides a robust, scalable path for component-based API synthesis in large libraries.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes