Open Access Article
Journal of Applied Computer Science DOI: DOI:10.64635/ja.2026.1611 .
*通讯作者: 无
发布时间: 2026-10-28 总浏览量: 3
大语言模型可将自然语言快速转化为可执行代码,但其输出可能在功能、可靠性、安全性和可维护性 方面偏离需求。本文以软件产品质量模型为依据,提出面向生成代码的缺陷识别与质量评价框架:以需求可 追溯为起点,结合静态分析、动态测试、人工复核和证据留存;以缺陷密度、测试通过率、精确率、召回率 及安全问题处置率构成核心指标。本文说明指标的计算条件、适用边界与治理要求,为组织审慎使用生成代 码提供可执行的评价思路。
Large language models can rapidly translate natural language into executable code, but their outputs may deviate from requirements in terms of functionality, reliability, security, and maintainability. Based on software product quality models, this paper proposes a framework for defect detection and quality evaluation tailored to AI-generated code. The framework begins with requirements traceability and combines static analysis, dynamic testing, manual review, and evidence retention. Its core evaluation metrics include defect density, test pass rate, precision, recall, and security issue remediation rate. The paper clarifies the calculation conditions, applicability boundaries, and governance requirements of these metrics, providing a practical evaluation approach for the prudent organizational use of AI generated code.
[1] 中国信息通信研究院.人工智能生成内容(AIGC)白皮书(2022年)[R].北京:中国信息通信研究院,2022.
[2]国家市场监督管理总局,国家标准化管理委员会.GB/T 25000.10—2016 系统与软件工程系统与软件质量要求和评价(SQuaRE)第10部分:系统与软件质量模型[S].北京:中国标准出版社,2016.
[3] 中国网络空间安全协会.T/CSAC 001—2023生成式人工智能服务安全基本要求[S].北京:中国网络空间安全协会,2023.
[4] Chen M, Tworek J, Jun H, et al. Evaluating Large Language Models Trained on Code[EB/OL]. arXiv:2107.03374, 2021.