arrow
返回

Deep API Sequence Generation via Golden Solution Samples and API Seeds

delete2025-01-20
delete0
PRE
AI
Y
Yue-Kai Huang
J
Junjie Wang *
S
Song Wang
M
Moshi Wei
L
Lin Shi
Z
Zhe Liu
Q
Qing Wang
DOI:10.1145/3695995delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Automatic API recommendation can accelerate developers' programming and has been studied for years. There are two orthogonal lines of approaches for this task, i.e., information retrieval-based (IR-based) approaches and sequence to sequence (seq2seq) model-based approaches. Although these approaches were reported to have remarkable performance, our observation finds two major drawbacks, i.e., IR-based approaches lack the consideration of relations among the recommended APIs, and seq2seq models do not model the API's semantic meaning. To alleviate the above two problems, we propose APIGens, which is a retrieval-enhanced large language model (LLM)-based API recommendation approach to recommend an API sequence for a natural language query. The approach first retrieves similar programming questions in history based on the input natural language query, and then scores the results based on API documents via a scorer model. Finally, these results are used as samples for few-shot learning of LLM. To reduce the risk of encountering local optima, we also extract API seeds from the retrieved results to increase the search scope during the LLM generation process. The results show that our approach can achieve 48.41% ROUGE@10 on API sequence recommendation and the 82.61% MAP on API set recommendation, largely outperforming the state-of-the-art baselines.
Keyword:
API recommendation
deep learning
information retrieval
sequence generation
large language model

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

I
institute of software, cas
学者数:
446
论文数: 388
被引数: 0
C
chinese academy of sciences
学者数:
56.7W
论文数: 45.0W
被引数: 704
引用论文

引用论文

Firefighting Acutely Increases Airway Responsiveness消防急性增加气道反应性
err1989-07-01
err0
PREAI
errCharles B. Sherman; Scott Barnhart; Mary F. Miller; Mark R. Segal; Moira Aitken; Robert Schoene; William Daniell; Linda Rosenstock
err分享
err收藏
What do developers search for on the web?
err2017-04-09
err132
PREAI
errXia, Xin; Bao, Lingfeng; Lo, David; Kochhar, Pavneet Singh; Hassan, Ahmed E.; Xing, Zhenchang
err分享
err收藏
More Than Deep Learning: post-processing for API sequence recommendation
err2021-10-29
err4
errOAAI
errChen, Chi; Peng, Xin; Chen, Bihuan; Sun, Jun; Xing, Zhenchang; Wang, Xin; Zhao, Wenyun
err分享
err收藏
Unusual Photoisomerization Pathway in a Near-Infrared Light Absorbing Enzymerhodopsin
err2022-10-06
err0
PREAI
errMasahiro Sugiura; Kazuki Ishikawa; Kota Katayama; Yuji Sumii; Rei Abe-Yoshizumi; Satoshi P. Tsunoda; Yuji Furutani; Norio Shibata; Leonid S. Brown; Hideki Kandori
err分享
err收藏
Endocrine Changes and Urinary Citrate Excretion
err2010-02-15
err0
PREAI
errMats L. Hammar; Göran E. Berg; Lasse Larsson; Hans-Göran Tiselius; Eberhard Varenhorst
err分享
err收藏
学者 查看更多内容