Code large language models (Code LLMs) have demonstrated remarkable performance in code generation. Nonetheless, most existing works focus on boosting code LLMs from the perspective of programming capabilities, while their natural language capabilities receive less attention. To fill this gap, we thus propose a novel framework, comprising two modules: AttentionExtractor, which is responsible for extracting key phrases from the user's natural language requirements, and AttentionCoder, which leverages these extracted phrases to generate target code to solve the requirement. This framework pioneers an innovative idea by seamlessly integrating code LLMs with traditional natural language processing tools. To validate the effectiveness of the framework, we craft a new code generation benchmark, called MultiNL-H, covering five natural languages. Extensive experimental results demonstrate the effectiveness of our proposed framework.
翻译:代码大语言模型(Code LLMs)在代码生成方面已展现出卓越性能。然而,现有研究大多从编程能力角度提升代码大语言模型,其自然语言能力尚未得到充分关注。为填补这一空白,我们提出了一种新颖框架,包含两个模块:AttentionExtractor(负责从用户自然语言需求中提取关键短语)与AttentionCoder(利用提取的短语生成目标代码以满足需求)。该框架通过将代码大语言模型与传统自然语言处理工具无缝集成,开创了创新思路。为验证框架有效性,我们构建了覆盖五种自然语言的新代码生成基准测试MultiNL-H。大量实验结果表明了我们所提框架的有效性。