atlas

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

R2E: Turning any Github Repository into a Programming Agent Environment

ICML 2024 · 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.

Presents R2E, a framework that turns any GitHub Python repository into an executable programming-agent environment by synthesizing equivalence test harnesses, and instantiates it as the R2E-Eval1 benchmark (246 problems).

Problem

Existing code generation benchmarks consist of short isolated functions without repository context or executable functional tests, so they do not evaluate realistic, interactive programming with real-world codebases.

Approach

Use the ground-truth repository function as a reference implementation to generate equivalence tests (decoupling expected outputs from LLM prediction), build equivalence test harnesses with setup for dependencies, and use dependency slicing to provide minimal repository context for test generation and problem prompts.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use equivalence tests instead of predicting expected outputsR2E test generation · In-Filevalidity: 35.43% -> 44.25%Helped
use equivalence tests instead of predicting expected outputsR2E test generation · Out-Filevalidity: 30.68% -> 19.82%Helped
add dependency-sliced context (ablation)R2E equivalence test generation · In-Filevalidity: 51.73% -> 52.37%Helped
add dependency-sliced context (ablation)R2E equivalence test generation · Out-Filevalidity: 32.24% -> 35.01%Helped
add dependency-sliced context (ablation)R2E equivalence test generation · Out-Filebranch coverage: 77.23% -> 79.65%Helped
add dependency-sliced context (ablation)R2E equivalence test generation · In-Filebranch coverage: 87.32% -> 88.18%Helped
add full repository context rather than no context (ablation)R2E equivalence test generation · Out-Filevalidity: 19.82% -> 32.24%Helped
add interpreter and test-harness error feedback over 5 iterationsGPT-4 self-repair · R2E-Eval1 failing instancesself-repair rate: 0% -> 33%Helped
add interpreter and test-harness error feedback over 5 iterationsGPT-3.5-TURBO self-repair · R2E-Eval1 failing instancesself-repair rate: 0% -> 20%Helped
add zero-shot or two-shot chain-of-thought promptingGPT-3.5-TURBO and GPT-4 · R2E-Eval1PASS@1No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: GitHub Python repositories (429 installed, created after July 2022)

Benchmarks: R2E-Eval1

Metrics: pass@1 validity branch coverage

Baselines: HumanEval ODEX CrossCodeEval RepoBench RepoEval SWE-bench GPT-3.5-Turbo CodeLlama

Builds on: HumanEval+ self-instruct chain-of-thought Reflexion

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