WAR-Re: Web API Recommendation with Semantic Reasoning

📅 2025-11-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address two key limitations in Web API recommendation—fixed top-N output size and insufficient interpretability—this paper proposes a large language model (LLM)-based semantic reasoning framework. Methodologically: (i) it introduces a variable-length recommendation mechanism that dynamically adapts the number of recommended APIs to each mashup’s specific functional requirements; (ii) it incorporates a semantic rationale generation module, leveraging special start/end tokens and a two-stage training strategy—supervised fine-tuning followed by groupwise relative advantage–based reinforcement learning—to jointly optimize recommendation accuracy and explanation quality. Evaluated on the ProgrammableWeb dataset, the framework achieves up to a 21.59% improvement in recommendation accuracy while generating high-fidelity, decision-aligned natural language explanations. To our knowledge, this is the first work to systematically integrate LLM-driven semantic reasoning into the API recommendation pipeline, achieving synergistic gains in both precision and interpretability.

Technology Category

Application Category

📝 Abstract
With the development of cloud computing, the number of Web APIs has increased dramatically, further intensifying the demand for efficient Web API recommendation. Despite the demonstrated success of previous Web API recommendation solutions, two critical challenges persist: 1) a fixed top-N recommendation that cannot accommodate the varying API cardinality requirements of different mashups, and 2) these methods output only ranked API lists without accompanying reasons, depriving users of understanding the recommendation. To address these challenges, we propose WAR-Re, an LLM-based model for Web API recommendation with semantic reasoning for justification. WAR-Re leverages special start and stop tokens to handle the first challenge and uses two-stage training: supervised fine-tuning and reinforcement learning via Group Relative Policy Optimization (GRPO) to enhance the model's ability in both tasks. Comprehensive experimental evaluations on the ProgrammableWeb dataset demonstrate that WAR-Re achieves a gain of up to 21.59% over the state-of-the-art baseline model in recommendation accuracy, while consistently producing high-quality semantic reasons for recommendations.
Problem

Research questions and friction points this paper is trying to address.

Recommending variable numbers of Web APIs for different mashup requirements
Providing semantic reasoning to justify Web API recommendations
Overcoming limitations of fixed top-N ranked lists without explanations
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses start and stop tokens for flexible API cardinality
Employs two-stage training with fine-tuning and reinforcement learning
Generates semantic reasoning to justify API recommendations
🔎 Similar Papers
No similar papers found.
Z
Zishuo Xu
Huazhong University of Science and Technology
D
Dezhong Yao
Huazhong University of Science and Technology
Yao Wan
Yao Wan
Huazhong University of Science and Technology
NLPProgramming LanguagesSoftware EngineeringLarge Language Models