RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Gautam, Dhruv, Garg, Spandan, Jang, Jinu, Sundaresan, Neel, Moghaddam, Roshanak Zilouchian
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916649449291776
author Gautam, Dhruv
Garg, Spandan
Jang, Jinu
Sundaresan, Neel
Moghaddam, Roshanak Zilouchian
author_facet Gautam, Dhruv
Garg, Spandan
Jang, Jinu
Sundaresan, Neel
Moghaddam, Roshanak Zilouchian
contents Recent advances in language model (LM) agents and function calling have enabled autonomous, feedback-driven systems to solve problems across various digital domains. To better understand the unique limitations of LM agents, we introduce RefactorBench, a benchmark consisting of 100 large handcrafted multi-file refactoring tasks in popular open-source repositories. Solving tasks within RefactorBench requires thorough exploration of dependencies across multiple files and strong adherence to relevant instructions. Every task is defined by 3 natural language instructions of varying specificity and is mutually exclusive, allowing for the creation of longer combined tasks on the same repository. Baselines on RefactorBench reveal that current LM agents struggle with simple compositional tasks, solving only 22% of tasks with base instructions, in contrast to a human developer with short time constraints solving 87%. Through trajectory analysis, we identify various unique failure modes of LM agents, and further explore the failure mode of tracking past actions. By adapting a baseline agent to condition on representations of state, we achieve a 43.9% improvement in solving RefactorBench tasks. We further extend our state-aware approach to encompass entire digital environments and outline potential directions for future research. RefactorBench aims to support the study of LM agents by providing a set of real-world, multi-hop tasks within the realm of code.
format Preprint
id arxiv_https___arxiv_org_abs_2503_07832
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code
Gautam, Dhruv
Garg, Spandan
Jang, Jinu
Sundaresan, Neel
Moghaddam, Roshanak Zilouchian
Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
I.2.5
Recent advances in language model (LM) agents and function calling have enabled autonomous, feedback-driven systems to solve problems across various digital domains. To better understand the unique limitations of LM agents, we introduce RefactorBench, a benchmark consisting of 100 large handcrafted multi-file refactoring tasks in popular open-source repositories. Solving tasks within RefactorBench requires thorough exploration of dependencies across multiple files and strong adherence to relevant instructions. Every task is defined by 3 natural language instructions of varying specificity and is mutually exclusive, allowing for the creation of longer combined tasks on the same repository. Baselines on RefactorBench reveal that current LM agents struggle with simple compositional tasks, solving only 22% of tasks with base instructions, in contrast to a human developer with short time constraints solving 87%. Through trajectory analysis, we identify various unique failure modes of LM agents, and further explore the failure mode of tracking past actions. By adapting a baseline agent to condition on representations of state, we achieve a 43.9% improvement in solving RefactorBench tasks. We further extend our state-aware approach to encompass entire digital environments and outline potential directions for future research. RefactorBench aims to support the study of LM agents by providing a set of real-world, multi-hop tasks within the realm of code.
title RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code
topic Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
I.2.5
url https://arxiv.org/abs/2503.07832