From Ranking to Reasoning: Explainable Web API Recommendation via Semantic Reasoning
Zishuo Xu, Dezhong Yao, Yao Wan

TL;DR
WAR-R1 is an explainable Web API recommendation framework that uses semantic reasoning and adaptive, variable-sized suggestions, enhanced by a lightweight LLM to generate relevant APIs with natural-language justifications.
Contribution
It introduces a novel adaptive recommendation approach with integrated semantic reasoning and explanation generation, trained via supervised and reinforcement learning.
Findings
WAR-R1 outperforms baselines by up to 10.89% in accuracy.
It produces high-quality, semantically grounded explanations.
The approach effectively adapts recommendation size based on mashup complexity.
Abstract
The rapid growth of Web APIs has made automated Web API recommendation essential for efficient mashup development. However, existing approaches suffer from two major limitations: 1) they rely on fixed top-N recommendation strategies that cannot adapt to mashup complexity, and 2) they provide little or no explanation for recommended APIs, limiting transparency and user trust. To address these challenges, we propose WAR-R1, an explainable Web API recommendation framework that integrates semantic reasoning with adaptive, variable-cardinality recommendation. Built on a lightweight large language model (LLM), WAR-R1 generates both a set of relevant APIs and a natural-language justification for each recommendation. To support adaptive recommendation size, we introduce special start and stop tokens that allow the model to learn when to begin and terminate API generation. WAR-R1 is trained in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
