WAR-CRAFT:通过需求审计优化Web API推荐
WAR-CRAFT: Refining Web API Recommendations through Requirement Auditing
AI总结:
本文提出WAR-CRAFT方法,通过LLM筛选、需求审计及Resolver决策优化Web API推荐,在ProgrammableWeb数据集上提升SetF1并降低冗余,效果优于多种基线方法。
摘要:
Web API推荐系统会为混搭请求返回一组API,但不会对照API提供者文档(API能力的主要公开依据)进行检查,因此返回的集合可能包含不支持或冗余的API,还会遗漏请求的功能。填补所有明显的缺口并不能解决问题,因为某个缺口可能已被满足、可能不需要单独的API,或者没有对应的提供者文档。本文研究推荐后优化,即仅利用请求、API目录和提供者文档来修改已有的推荐系统输出。我们提出WAR-CRAFT,将优化过程分为三个决策:大型语言模型(LLM)通过联合判断移除不支持或被包含的API,随后对照从请求生成的需求清单审计剩余集合;对于每个未覆盖的需求,微调后的受目录约束的Resolver会提出一个目录API或弃权(不执行),且独立的文档检查仅允许支持的提议。在包含7种异构上游推荐器的ProgrammableWeb数据集上,WAR-CRAFT将平均SetF1从0.558提升至0.644,超过5种优化基线中最强的62.5%,且在不改变平均功能覆盖率的情况下,将功能冗余率大致减半(从0.127降至0.065);增益范围从生成式推荐器的+2.2个百分点到固定截断排名器的+18.2个百分点。在匹配集合大小的情况下,WAR-CRAFT仍优于截断上游输出的方法,因此增益并非仅由集合大小校准导致。我们的代码可在该https URL获取。
英文摘要:
Web API recommenders return a set of APIs for a mashup request but do not check it against provider documentation, the main public evidence of an API's capabilities. The set can therefore contain unsupported or redundant APIs and miss requested capabilities. Filling every apparent gap does not fix this, because a gap may already be served, may not need its own API, or may have no documented provider. We study post-recommendation refinement, which revises a frozen recommender's output using only the request, the catalog, and provider documentation. We propose WAR-CRAFT, which treats refinement as three decisions. An LLM removes unsupported or subsumed APIs by judging candidates jointly, then audits the remaining set against a requirement checklist derived from the request. For each uncovered requirement, a fine-tuned catalog-constrained Resolver proposes a catalog API or abstains, and an independent documentation check admits only supported proposals. On ProgrammableWeb with 7 heterogeneous upstream recommenders, WAR-CRAFT raises mean SetF1 from 0.558 to 0.644, above the strongest of 5 refinement baselines (62.5%), and roughly halves functional redundancy (0.127 to 0.065) without changing mean functional coverage. Gains range from +2.2 points on generative recommenders to +18.2 on fixed-cutoff rankers. At matched set sizes, WAR-CRAFT still outperforms truncating the upstream output, so the gain is not explained by set-size calibration alone. Our code is available at https://github.com/ZsXu-enrico/WAR-CRAFT.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。