atlas

Research map / Multi-agent systems and games / LLM agents

Refactoring Code Through Library Design

NeurIPS 2026 · Multi-agent systems and games › LLM agents · approach: Software engineering agent benchmarks

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Studies which metrics make a good code library refactoring (finding MDL best matches human preference), then proposes Librarian, a cluster-then-sample-and-rerank method, and the MiniCode benchmark for multi-file library refactoring.

Problem

Code agents solve isolated programming problems but do not consolidate specialized code into maintainable, reusable libraries; it is unclear which metric should judge refactoring quality and how to generate reusable libraries from many files.

Approach

Clusters files by LLM-generated summaries, samples K candidate library refactorings per cluster, filters by test pass rate, and reranks by minimum description length (MDL) under a small reference LM; MDL is chosen as the metric after comparing against tokens, cyclomatic complexity, and maintainability index.

Key results

Surprising findings

Limitations

Experimental setup

Datasets: CodeContests Logo Date Huggingface Transformers modeling files Huggingface Diffusers UNet and scheduler files

Benchmarks: MiniCode CodeContests Logo Date Transformers Diffusers

Metrics: MDL ratio token ratio pass rate solve rate calls per library function Bradley-Terry preference

Baselines: REGAL Codex-mini Claude Sonnet 4 Claude Sonnet 3.7 Tokens metric Maintainability Index Cyclomatic Complexity

Builds on: REGAL DreamCoder Commit-0

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy