arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2404.03114cs.SEcs.AIcs.CL
收藏

测试代码文档对大型语言模型代码理解的影响

Testing the Effect of Code Documentation on Large Language Model Code Understanding

The MITRE Corporation(MITRE公司)

William Macke, Michael Doyle

AI总结:

本文通过实证分析代码与文档属性对 LLM 的影响,发现错误文档会显著妨碍代码理解,而不完整或缺失文档影响不大。

摘要:

近年来,大型语言模型(LLM)在代码生成和理解方面展现出令人瞩目的能力。然而,鲜有研究考察文档及其他代码属性如何影响 LLM 理解和生成代码或文档的能力。我们针对代码或文档的底层属性如何影响 LLM 的能力进行了实证分析。结果表明,向 LLM 提供“不正确”的文档会极大地妨碍代码理解,而不完整或缺失的文档似乎并不会显著影响 LLM 理解代码的能力。

英文摘要:

Large Language Models (LLMs) have demonstrated impressive abilities in recent years with regards to code generation and understanding. However, little work has investigated how documentation and other code properties affect an LLM's ability to understand and generate code or documentation. We present an empirical analysis of how underlying properties of code or documentation can affect an LLM's capabilities. We show that providing an LLM with "incorrect" documentation can greatly hinder code understanding, while incomplete or missing documentation does not seem to significantly affect an LLM's ability to understand code.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑