APRIL: API Synthesis with Automatic Prompt Optimization and Reinforcement Learning
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.
Code (0)
등록된 구현이 없습니다.
Tasks
Reinforcement LearningSimilar Papers 제목 키워드 기반
Preference-based Interactive Multi-Document Summarisation
Interactive NLP is a promising paradigm to close the gap between automatic NLP systems and the human upper bound. Preference-based interactive learning has been successfully applied, but the existing methods require seve…
Active Learningreinforcement-learningReinforcement LearningReinforcement Learning (RL)APRIL: Active Partial Rollouts in Reinforcement Learning to Tame Long-tail Generation
Reinforcement learning (RL) has become a cornerstone in advancing large-scale pre-trained language models (LLMs). Successive generations, including GPT-o series, DeepSeek-R1, Kimi-K1.5, Grok 4, and GLM-4.5, have relied o…
Reinforcement LearningProof2Silicon: Prompt Repair for Verified Code and Hardware Generation via Reinforcement Learning
Large Language Models (LLMs) have demonstrated impressive capabilities in automated code generation but frequently produce code that fails formal verification, an essential requirement for hardware and safety-critical do…
Reinforcement LearningCode GenerationAPRIL: Interactively Learning to Summarise by Combining Active Preference Learning and Reinforcement Learning
We propose a method to perform automatic document summarisation without using reference summaries. Instead, our method interactively learns from users' preferences. The merit of preference-based interactive summarisation…
Active Learningreinforcement-learningReinforcement LearningReinforcement Learning (RL)BeautifulPrompt: Towards Automatic Prompt Engineering for Text-to-Image Synthesis
Recently, diffusion-based deep generative models (e.g., Stable Diffusion) have shown impressive results in text-to-image synthesis. However, current text-to-image models often require multiple passes of prompt engineerin…
Image GenerationPrompt EngineeringText to Image GenerationText-to-Image Generation