| Issue |
Wuhan Univ. J. Nat. Sci.
Volume 31, Number 1, February 2026
|
|
|---|---|---|
| Page(s) | 91 - 100 | |
| DOI | https://doi.org/10.1051/wujns/2026311091 | |
| Published online | 06 March 2026 | |
Computer Applications and Software
CLC number: TP311.52
On-Demand API Non-Human-Reliant Tutorial Generation by LLM-Based Across-Language Knowledge Transfer
基于大模型驱动的跨语言知识迁移的按需自动化API指南生成
College of Information Engineering, Gandong University, Fuzhou 344000, Jiangxi, China
(赣东学院 信息工程学院,江西 南昌 344000)
Received:
16
March
2025
Abstract
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个Kotlin API对该方法进行了实验,结果表明,相较于当前主流的检索式方法ADECK与生成式方法gDoc,本方法生成的API指南数量是ADECK的37倍,gDoc的1.6倍;与未采用知识迁移策略的方案相比,本方法的实施成功率提升了31.25个百分点。上述实验结果证实,借助大语言模型实现跨语言API知识构建具备可行性与应用潜力。
Key words: on-demand / API tutorial / API relation / large language model (LLM)
关键字 : 按需生成 / API指南 / API关系 / 大语言模型
Cite this article:LIU Zhiping. On-Demand API Non-Human-Reliant Tutorial Generation by LLM-Based Across-Language Knowledge Transfer[J]. Wuhan Univ J of Nat Sci, 2026, 31(1): 91-100.
Biography: LIU Zhiping, female, Professor, research direction: software engineering. E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
Foundation item: Supported by the High-Level Research Fund (12225000404)
© Wuhan University 2026
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.
