收藏切换
An LLM-Based README Generation Framework via Code-Aware Representation and Dual-Stage Optimization
收藏切换
Xing Cui1, 2, Jingzheng Wu1, 3, *, Tianyue Luo1, Xiang Ling1, 3, Xu Wang1
Journal of Computer Research and Development | 2026, 63(4) : 918 - 942
Less
收藏切换
Journal of Computer Research and Development | 2026, 63(4): 918-942
• Special Issue on LLMs and Software Engineering •
An LLM-Based README Generation Framework via Code-Aware Representation and Dual-Stage Optimization
Full
Xing Cui1, 2, Jingzheng Wu1, 3, *, Tianyue Luo1, Xiang Ling1, 3, Xu Wang1
Affiliations
  • 1Intelligent Software Research Center, Institute of Software, Chinese Academy of Sciences, Beijing, 100190
  • 2University of Chinese Academy of Sciences, Beijing, 100190
  • 3Key Laboratory of System Software (Chinese Academy of Sciences), Beijing 100190
  • born in 1994. PhD candidate. Student member of CCF. Her main research interests include intelligent software security and open source software supply chain

    born in 1982. PhD, professor, PhD supervisor. Senior member of CCF. His main research interests include system security, vulnerability mining, and operating system security

    born in 1990. Engineer. His main research interests include operating system security analysis, code vulnerability mining, and artificial intelligence security

    born in 1992. PhD, associate professor. Member of CCF, His main research interests include software security and AI security

    born in 1996. Engineer. His main research interests include code vulnerability mining and artificial intelligence security

About Author:

born in 1994. PhD candidate. Student member of CCF. Her main research interests include intelligent software security and open source software supply chain

born in 1982. PhD, professor, PhD supervisor. Senior member of CCF. His main research interests include system security, vulnerability mining, and operating system security

born in 1990. Engineer. His main research interests include operating system security analysis, code vulnerability mining, and artificial intelligence security

born in 1992. PhD, associate professor. Member of CCF, His main research interests include software security and AI security

born in 1996. Engineer. His main research interests include code vulnerability mining and artificial intelligence security

Published: 2026-04-01 doi: 10.7544/issn1000-1239.202550698
Outline
收藏切换

With the rapid growth of the open source software (OSS) ecosystem, OSS adoption has become a mainstream development practice. README files serve as a critical resource for understanding and reusing OSS. Although recent research explores automatic README generation and completion, existing approaches face limitations in cross-language applicability, neglect of code structure, and susceptibility to hallucination and subjectivity. To address these challenges, we propose RMancer, a dual-stage README generation framework that integrates large language models (LLMs) with code structure modeling. In the first stage, RMancer introduces a prompt-guided structured information extraction method, enhanced with static analysis to construct high-quality training data, enabling the model to accurately capture file-level functional descriptions, dependency relations, and program entry points. In the second stage, RMancer applies a topology-based sorting strategy derived from the call graph to reconstruct execution logic and build structured input contexts. It further adopts a multi-task supervision mechanism to jointly learn document structure and content generation, enhancing logical consistency and objectivity. A post-generation standardization strategy is also incorporated to ensure the formatting and factuality of the generated README files. Evaluations on 16692 OSS projects show that RMancer consistently outperforms state-of-the-art methods in both information extraction and README generation. It achieves an average F1-score improvement of 2.34% across key fields and gains 1.37% on average in BLEU, METEOR, and ROUGE-L. RMancer also leads on AlignScore and G-Eval metrics, with superior objectivity and redundancy control, confirming the effectiveness of its structure-aware and multi-task optimization strategies.

open source software  /  README generation  /  large language models  /  code structure modeling  /  dual-stage optimization
崔星, 吴敬征, 罗天悦, 凌祥, 王旭. 基于代码感知与双阶段优化融合的README生成大语言模型框架. 计算机研究与发展, 2026 , 63 (4) : 918 -942 . DOI: 10.7544/issn1000-1239.202550698
Xing Cui, Jingzheng Wu, Tianyue Luo, Xiang Ling, Xu Wang. An LLM-Based README Generation Framework via Code-Aware Representation and Dual-Stage Optimization[J]. Journal of Computer Research and Development, 2026 , 63 (4) : 918 -942 . DOI: 10.7544/issn1000-1239.202550698
Year 2026 volume 63 Issue 4
108
50
Cite this Article
BibTeX
Article Info
doi: 10.7544/issn1000-1239.202550698
  • Receive Date:2025-09-21
  • Online Date:2026-11-17
  • Published:2026-04-01
Article Data
Affiliations
History
  • Received:2025-09-21
  • Revised:2025-12-29
Affiliations
    1Intelligent Software Research Center, Institute of Software, Chinese Academy of Sciences, Beijing, 100190
    2University of Chinese Academy of Sciences, Beijing, 100190
    3Key Laboratory of System Software (Chinese Academy of Sciences), Beijing 100190
References
Share
https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202550698
Share to
QR

Scan QR to access full text

Cite this article
BibTeX
Citations
表12种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏
  • BibTeX
  • EndNote
  • RefWorks
  • TxT