APRIL: API Synthesis with Automatic Prompt Optimization and Reinforcement Learning
On the map: Deep reinforcement learning methods → RL training of language and agent models
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in RL training of language and agent models, one of 15 directions in Deep reinforcement learning methods. Builds on 16 of its 35 references that are in the map. First posted on arXiv 29 Aug 2025.
Builds on
16 of 35 references.
References · 16
- 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Trainingcited by 1,053
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2023Are Emergent Abilities of Large Language Models a Mirage?cited by 523
- 2023Using an LLM to Help With Code Understandingcited by 228
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2023Fuzz4All: Universal Fuzzing with Large Language Modelscited by 88
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 57
- 2020TF-Coder: Program Synthesis for Tensor Manipulationscited by 27
- 2016Component-based Synthesis of Table Consolidation and Transformation Tasks from Examplescited by 10
- 2018FrAngel: Component-Based Synthesis with Control Structurescited by 10
- 2025On the Effectiveness of Large Language Models in Writing Alloy Formulascited by 7
- 2024Generating executable oracles to check conformance of client code to requirements of JDK Javadocs using LLMscited by 6
4 more
- 2025How is Google using AI for internal code migrations?cited by 6
- 2025CASCADE: LLM-Powered JavaScript Deobfuscator at Googlecited by 5
- 2025An approach for API synthesis using large language modelscited by 4
- 2024Are Human Rules Necessary? Generating Reusable APIs with CoT Reasoning and In-Context Learningcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025ReCode: Updating Code API Knowledge with Reinforcement Learning
- 2026Improving Small Language Models for Code Generation with Reinforcement Learning from Verification Feedback
- 2026Combinatorial Synthesis: Scaling Code RLVR via Atomic Decomposition and Recombination
- 2025AlgoPilot: Fully Autonomous Program Synthesis Without Human-Written Programs
- 2025Proof2Silicon: Prompt Repair for Verified Code and Hardware Generation via Reinforcement Learning
- 2026Training LLMs for Multi-Step Tool Orchestration with Constrained Data Synthesis and Graduated Rewards
- 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Survey
- 2026From Brute Force to Semantic Insight: Performance-Guided Data Transformation Design with LLMs