Dataset Viewer
Auto-converted to Parquet Duplicate
id
string
repo_name
string
task_type
string
query
string
gold_files
list
anchor_files
list
budget_tokens
int32
description
string
is_held_out_repo
bool
flask_trace2code_01
pallets/flask
trace2code
Traceback (most recent call last): File "src/flask/app.py", line 28, in wsgi_app response = self.dispatch_request() File "src/flask/wrappers.py", line 14, in get_json AttributeError: 'NoneType' object has no attribute 'get'
[ "src/flask/wrappers.py", "src/flask/app.py" ]
[]
4,000
Traceback in get_json and dispatch_request.
false
flask_code2test_01
pallets/flask
code2test
Find unit and regression tests for SecureCookieSessionInterface cookie saving and modification.
[ "tests/test_sessions.py" ]
[]
4,000
Find test suite for sessions.
false
flask_edit2ripple_01
pallets/flask
edit2ripple
We are changing the RequestContext constructor in src/flask/ctx.py. What files import or depend on RequestContext?
[ "src/flask/app.py", "src/flask/__init__.py" ]
[ "src/flask/ctx.py" ]
4,000
Ripple effect analysis for ctx.py.
false
flask_comment2context_01
pallets/flask
comment2context
Add support for blueprint url_prefix inheritance and nested blueprint routing rules.
[ "src/flask/blueprints.py", "src/flask/app.py" ]
[]
4,000
Blueprint nested routing feature.
false
flask_selective_01
pallets/flask
selective
Fix compilation error in Cargo.toml regarding serde_json feature flag dependency in rust kernel.
[]
[]
4,000
Counterfactual Rust cargo query in Flask.
false
req_trace2code_01
psf/requests
trace2code
Traceback (most recent call last): File "requests/sessions.py", line 22, in request return self.send(prep) File "requests/adapters.py", line 18, in send requests.exceptions.ConnectionError: Failed to establish a new connection
[ "requests/adapters.py", "requests/sessions.py" ]
[]
4,000
Connection error traceback in adapter and session.
false
req_code2test_01
psf/requests
code2test
Find test suites that verify HTTPBasicAuth headers and authentication credentials formatting.
[ "tests/test_auth.py" ]
[]
4,000
Find test suite for HTTPBasicAuth.
false
req_edit2ripple_01
psf/requests
edit2ripple
Modifying PreparedRequest in requests/models.py to add streaming body support. Which files interact directly with PreparedRequest?
[ "requests/sessions.py", "requests/auth.py", "requests/adapters.py" ]
[ "requests/models.py" ]
4,000
Ripple impact of PreparedRequest changes.
false
req_comment2context_01
psf/requests
comment2context
Add raise_for_status HTTP error handling on response codes above 400 with custom message formatting.
[ "requests/models.py", "requests/exceptions.py" ]
[]
4,000
raise_for_status enhancement in models and exceptions.
false
req_selective_01
psf/requests
selective
Optimize PyTorch GPU tensor CUDA backward autograd pass for multi-head attention weights.
[]
[]
4,000
Counterfactual PyTorch CUDA query in Requests.
false

RepoNeedle-Bench: Repository Context Retrieval Benchmark for AI Coding Agents

Corpus Scope: This dataset (RepoNeedle-Bench) is a lightweight synthetic development and demonstration benchmark ($N=15$ samples: 10 train, 5 test across Flask, Requests, and FastAPI). It serves for fast local integration tests, intent classification validation, and budgeting verification. For large-scale external evaluation, RepoNeedle is independently evaluated on the complete official Agent Retrieval Bench (ARB v2: $N=427$ samples across 25 repositories and 271 frozen snapshots).

Dataset Description

RepoNeedle-Bench is a specialized, open-source benchmark designed to evaluate upstream repository context retrieval and token-budget-aware context selection for autonomous AI coding agents.

Rather than measuring end-to-end patch generation (where retrieval failures are masked by LLM synthesis capabilities), RepoNeedle-Bench isolates the critical upstream context acquisition phase across five distinct software engineering workflow categories:

  1. trace2code: Tracing execution error stack traces and exceptions down to root-cause implementation files.
  2. code2test: Retrieving regression and unit test suites implied by an implementation change or feature request.
  3. edit2ripple: Identifying downstream dependencies, callers, and interface implementers affected by an anchor file change.
  4. comment2context: Connecting high-level natural language issue comments and feature requests to core implementation files.
  5. selective: Recognizing out-of-repository, non-internal, or counterfactual queries where the retriever should abstain from returning hallucinated files.

Dataset Structure

Each sample in train.jsonl (development split) and test.jsonl (held-out split) follows the schema:

{
  "id": "flask_trace2code_01",
  "repo_name": "pallets/flask",
  "task_type": "trace2code",
  "query": "Traceback (most recent call last):\n  File \"src/flask/app.py\", line 28, in wsgi_app...",
  "gold_files": [
    "src/flask/wrappers.py",
    "src/flask/app.py"
  ],
  "anchor_files": [],
  "budget_tokens": 4000,
  "description": "Traceback in get_json and dispatch_request.",
  "is_held_out_repo": false
}

Data Provenance & Permissive Licensing

RepoNeedle-Bench is built exclusively from permissively licensed open-source repositories to ensure completely unrestricted downstream academic, personal, and commercial reuse:

  • pallets/flask (BSD-3-Clause)
  • psf/requests (Apache-2.0)
  • tiangolo/fastapi (MIT License)

No non-commercial or copyleft share-alike data (such as CC BY-NC-SA materials) is included.

Benchmark Evaluation Metrics

Evaluations should measure both ranking quality and token budget efficiency:

  • Recall@k (k=1, 3, 5)
  • Mean Reciprocal Rank (MRR)
  • nDCG@k
  • Budgeted Context Coverage (BCC@2k, BCC@4k, BCC@8k): The percentage of gold files present within a hard context token constraint.
  • Irrelevant Token Waste: The number of non-gold tokens included in context.
  • Selective Abstention Accuracy: Precision, recall, and F1 score on no-gold queries.

Citation

@misc{reponeedle2026,
  author = {RepoNeedle Contributors},
  title = {RepoNeedle-Bench: Repository Context Retrieval Benchmark for AI Coding Agents},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/RepoNeedle/RepoNeedle-Bench}}
}
Downloads last month
22

Space using RepoNeedle/RepoNeedle-Bench 1