期刊文献+

On-Demand API Non-Human-Reliant Tutorial Generation by LLM-Based Across-Language Knowledge Transfer

基于大模型驱动的跨语言知识迁移的按需自动化API指南生成
原文传递
导出
摘要 API(Application Programming Interface)documentation often only describes individual APIs and lacks information on complex API relations and code examples.Retrieval-based and generation-based methods can both produce documentation that includes API relationship descriptions and code examples.However,they are limited by the richness of available API resources.As a result,they struggle to be effective when dealing with resource-scarce languages such as Kotlin.We propose an on-demand API tutorial generation method for resource-scarce languages,transferring API knowledge from a resource-rich language like Java to Kotlin using an AI chain.Evaluating our method on 500 Kotlin APIs,we generated more API documents than the state-of-the-art retrieval-based method ADECK and the generate-based method gDoc.The number of API guidelines generated by our method is 37 times that of ADECK and 1.6 times that of gDoc.Compared with the scheme that did not adopt the knowledge transfer strategy,the success rate of our method has increased by 31.25 percentage points.This demonstrates the feasibility and potential of using LLMs to create new API knowledge across languages. 现有的API指南通常仅涵盖单个API的功能描述,缺乏多API间的关系说明及对应的代码示例。基于检索的方法和基于生成的方法可以生成包含API关系说明和代码示例的文档,但受限于API资源的丰富度,在处理Kotlin等资源稀缺型语言时难以发挥效用。为此,本文提出一种面向资源稀缺型语言的按需API指南生成方法:依托AI链架构,将Java等资源富集型语言中的API知识迁移至Kotlin语言。基于500个KotlinAPI对该方法进行了实验,结果表明,相较于当前主流的检索式方法ADECK与生成式方法gDoc,本方法生成的API指南数量是ADECK的37倍,gDoc的1.6倍;与未采用知识迁移策略的方案相比,本方法的实施成功率提升了31.25个百分点。上述实验结果证实,借助大语言模型实现跨语言API知识构建具备可行性与应用潜力。
作者 LIU Zhiping 刘智萍(赣东学院信息工程学院,江西南昌344000)
出处 《Wuhan University Journal of Natural Sciences》 2026年第1期91-100,共10页 武汉大学学报(自然科学英文版)
基金 Supported by the High-Level Research Fund(12225000404)。
关键词 ON-DEMAND API tutorial API relation large language model(LLM) 按需生成 API指南 API关系 大语言模型
  • 相关文献

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部