about
Evaluating the Ability of LLMs to Follow Code Editing Instructions (arxiv.org)
2 points by belter on Dec 21, 2023 | hide | past | pdf | 1 comment on HN

In plain words: They built a set of code-editing tasks where a model gets code plus a plain instruction to change it, then tested top models on it. Open models trailed closed ones, but fine-tuning them on a new set of editing examples closed the gap.

Abstract · Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructions

A significant amount of research is focused on developing and evaluating large language models for a variety of code synthesis tasks. These include synthesizing code from natural language, synthesizing tests from code, and synthesizing explanations of code. In contrast, the behavior of instructional code editing with LLMs is understudied. These are tasks in which the model is provided a block of code and an instruction to modify the code. The editing instruction may ask for a feature to be added or removed, describe a bug and ask for a fix, or ask for a different kind of solution. We introduce a carefully crafted benchmark of code editing tasks and use it to evaluate several cutting edge LLMs. Our evaluation exposes a significant gap between the capabilities of state-of-the-art open and closed models. For example, even GPT-3.5-Turbo is better than the best open model at code editing tasks. We also introduce a new, carefully curated, permissively licensed training dataset of code editing tasks coupled with natural language instructions. Using this training dataset, we show that we can fine-tune open Code LLMs to significantly improve their code editing capabilities, closing the gap between open and closed models. All code, data, and models are available at https://github.com/nuprl/CanItEdit.

Federico Cassano, Luisa Li, Akul Sethi, Noah Shinn, Abby Brennan-Jones, Jacob Ginesin, Edward Berman, George Chakhnashvili, Anton Lozhkov, Carolyn Jane Anderson, Arjun Guha
arXiv:2312.12450 · cs.SE, cs.AI, cs.LG, cs.PL · submitted Dec 11, 2023 · updated Sep 23, 2024
abstract · pdf · html

add comment on HN
Also discussed: Dec 2023 (3 points, 0 comments)

"We introduce a carefully crafted benchmark of code editing tasks and use it evaluate several cutting edge LLMs. Our evaluation exposes a significant gap between the capabilities of state-of-the-art open and closed models. For example, even GPT-3.5-Turbo is 8.8% better than the best open model at editing code. We also introduce a new, carefully curated, permissively licensed training set of code edits coupled with natural language instructions. Using this training set, we show that we can fine-tune open Code LLMs to significantly improve their code editing capabilities."