CodeIF: Benchmarking the Instruction-Following Capabilities of Large Language Models for Code Generation

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Yan, Kaiwen, Guo, Hongcheng, Shi, Xuanqing, Cao, Shaosheng, Di, Donglin, Li, Zhoujun
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866918113103052800
author Yan, Kaiwen
Guo, Hongcheng
Shi, Xuanqing
Cao, Shaosheng
Di, Donglin
Li, Zhoujun
author_facet Yan, Kaiwen
Guo, Hongcheng
Shi, Xuanqing
Cao, Shaosheng
Di, Donglin
Li, Zhoujun
contents With the rapid advancement of Large Language Models (LLMs), the demand for robust instruction-following capabilities in code generation tasks has grown significantly. Code generation not only facilitates faster prototyping and automated testing, but also augments developer efficiency through improved maintainability and reusability of code. In this paper, we introduce CodeIF, the first benchmark specifically designed to assess the abilities of LLMs to adhere to task-oriented instructions within diverse code generation scenarios. CodeIF encompasses a broad range of tasks, including function synthesis, error debugging, algorithmic refactoring, and code explanation, thereby providing a comprehensive suite to evaluate model performance across varying complexity levels and programming domains. We conduct extensive experiments with LLMs, analyzing their strengths and limitations in meeting the demands of these tasks. The experimental results offer valuable insights into how well current models align with human instructions, as well as the extent to which they can generate consistent, maintainable, and contextually relevant code. Our findings not only underscore the critical role that instruction-following LLMs can play in modern software development, but also illuminate pathways for future research aimed at enhancing their adaptability, reliability, and overall effectiveness in automated code generation. CodeIF data and code are publicly available: https://github.com/lin-rany/codeIF
format Preprint
id arxiv_https___arxiv_org_abs_2502_19166
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle CodeIF: Benchmarking the Instruction-Following Capabilities of Large Language Models for Code Generation
Yan, Kaiwen
Guo, Hongcheng
Shi, Xuanqing
Cao, Shaosheng
Di, Donglin
Li, Zhoujun
Software Engineering
Machine Learning
With the rapid advancement of Large Language Models (LLMs), the demand for robust instruction-following capabilities in code generation tasks has grown significantly. Code generation not only facilitates faster prototyping and automated testing, but also augments developer efficiency through improved maintainability and reusability of code. In this paper, we introduce CodeIF, the first benchmark specifically designed to assess the abilities of LLMs to adhere to task-oriented instructions within diverse code generation scenarios. CodeIF encompasses a broad range of tasks, including function synthesis, error debugging, algorithmic refactoring, and code explanation, thereby providing a comprehensive suite to evaluate model performance across varying complexity levels and programming domains. We conduct extensive experiments with LLMs, analyzing their strengths and limitations in meeting the demands of these tasks. The experimental results offer valuable insights into how well current models align with human instructions, as well as the extent to which they can generate consistent, maintainable, and contextually relevant code. Our findings not only underscore the critical role that instruction-following LLMs can play in modern software development, but also illuminate pathways for future research aimed at enhancing their adaptability, reliability, and overall effectiveness in automated code generation. CodeIF data and code are publicly available: https://github.com/lin-rany/codeIF
title CodeIF: Benchmarking the Instruction-Following Capabilities of Large Language Models for Code Generation
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2502.19166