Datasets:
release: synchronize RepoNeedle-Bench V1.1.0 dataset artifacts
Browse files- README.md +122 -0
- data/test.jsonl +5 -0
- data/train.jsonl +10 -0
- schema.json +50 -0
README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- machine-generated
|
| 4 |
+
- expert-generated
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- code
|
| 8 |
+
license: mit
|
| 9 |
+
multilinguality:
|
| 10 |
+
- monolingual
|
| 11 |
+
size_categories:
|
| 12 |
+
- n<1K
|
| 13 |
+
source_datasets:
|
| 14 |
+
- original
|
| 15 |
+
tags:
|
| 16 |
+
- code-search
|
| 17 |
+
- repository-retrieval
|
| 18 |
+
- context-budgeting
|
| 19 |
+
- agentic-coding
|
| 20 |
+
- evaluation-benchmark
|
| 21 |
+
task_categories:
|
| 22 |
+
- text-retrieval
|
| 23 |
+
- feature-extraction
|
| 24 |
+
task_ids:
|
| 25 |
+
- document-retrieval
|
| 26 |
+
pretty_name: RepoNeedle-Bench
|
| 27 |
+
dataset_info:
|
| 28 |
+
features:
|
| 29 |
+
- name: id
|
| 30 |
+
dtype: string
|
| 31 |
+
- name: repo_name
|
| 32 |
+
dtype: string
|
| 33 |
+
- name: task_type
|
| 34 |
+
dtype: string
|
| 35 |
+
- name: query
|
| 36 |
+
dtype: string
|
| 37 |
+
- name: gold_files
|
| 38 |
+
sequence: string
|
| 39 |
+
- name: anchor_files
|
| 40 |
+
sequence: string
|
| 41 |
+
- name: budget_tokens
|
| 42 |
+
dtype: int32
|
| 43 |
+
- name: description
|
| 44 |
+
dtype: string
|
| 45 |
+
- name: is_held_out_repo
|
| 46 |
+
dtype: bool
|
| 47 |
+
splits:
|
| 48 |
+
- name: train
|
| 49 |
+
num_bytes: 8400
|
| 50 |
+
num_examples: 10
|
| 51 |
+
- name: test
|
| 52 |
+
num_bytes: 4200
|
| 53 |
+
num_examples: 5
|
| 54 |
+
download_size: 12600
|
| 55 |
+
dataset_size: 12600
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
# RepoNeedle-Bench: Repository Context Retrieval Benchmark for AI Coding Agents
|
| 59 |
+
|
| 60 |
+
> [!NOTE]
|
| 61 |
+
> **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).
|
| 62 |
+
|
| 63 |
+
## Dataset Description
|
| 64 |
+
**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.
|
| 65 |
+
|
| 66 |
+
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:
|
| 67 |
+
|
| 68 |
+
1. **`trace2code`**: Tracing execution error stack traces and exceptions down to root-cause implementation files.
|
| 69 |
+
2. **`code2test`**: Retrieving regression and unit test suites implied by an implementation change or feature request.
|
| 70 |
+
3. **`edit2ripple`**: Identifying downstream dependencies, callers, and interface implementers affected by an anchor file change.
|
| 71 |
+
4. **`comment2context`**: Connecting high-level natural language issue comments and feature requests to core implementation files.
|
| 72 |
+
5. **`selective`**: Recognizing out-of-repository, non-internal, or counterfactual queries where the retriever should abstain from returning hallucinated files.
|
| 73 |
+
|
| 74 |
+
## Dataset Structure
|
| 75 |
+
|
| 76 |
+
Each sample in `train.jsonl` (development split) and `test.jsonl` (held-out split) follows the schema:
|
| 77 |
+
|
| 78 |
+
```json
|
| 79 |
+
{
|
| 80 |
+
"id": "flask_trace2code_01",
|
| 81 |
+
"repo_name": "pallets/flask",
|
| 82 |
+
"task_type": "trace2code",
|
| 83 |
+
"query": "Traceback (most recent call last):\n File \"src/flask/app.py\", line 28, in wsgi_app...",
|
| 84 |
+
"gold_files": [
|
| 85 |
+
"src/flask/wrappers.py",
|
| 86 |
+
"src/flask/app.py"
|
| 87 |
+
],
|
| 88 |
+
"anchor_files": [],
|
| 89 |
+
"budget_tokens": 4000,
|
| 90 |
+
"description": "Traceback in get_json and dispatch_request.",
|
| 91 |
+
"is_held_out_repo": false
|
| 92 |
+
}
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
## Data Provenance & Permissive Licensing
|
| 96 |
+
RepoNeedle-Bench is built exclusively from permissively licensed open-source repositories to ensure completely unrestricted downstream academic, personal, and commercial reuse:
|
| 97 |
+
- `pallets/flask` (BSD-3-Clause)
|
| 98 |
+
- `psf/requests` (Apache-2.0)
|
| 99 |
+
- `tiangolo/fastapi` (MIT License)
|
| 100 |
+
|
| 101 |
+
**No non-commercial or copyleft share-alike data (such as CC BY-NC-SA materials) is included.**
|
| 102 |
+
|
| 103 |
+
## Benchmark Evaluation Metrics
|
| 104 |
+
Evaluations should measure both ranking quality and token budget efficiency:
|
| 105 |
+
- **Recall@k** (k=1, 3, 5)
|
| 106 |
+
- **Mean Reciprocal Rank (MRR)**
|
| 107 |
+
- **nDCG@k**
|
| 108 |
+
- **Budgeted Context Coverage (BCC@2k, BCC@4k, BCC@8k)**: The percentage of gold files present within a hard context token constraint.
|
| 109 |
+
- **Irrelevant Token Waste**: The number of non-gold tokens included in context.
|
| 110 |
+
- **Selective Abstention Accuracy**: Precision, recall, and F1 score on no-gold queries.
|
| 111 |
+
|
| 112 |
+
## Citation
|
| 113 |
+
```bibtex
|
| 114 |
+
@misc{reponeedle2026,
|
| 115 |
+
author = {RepoNeedle Contributors},
|
| 116 |
+
title = {RepoNeedle-Bench: Repository Context Retrieval Benchmark for AI Coding Agents},
|
| 117 |
+
year = {2026},
|
| 118 |
+
publisher = {Hugging Face},
|
| 119 |
+
howpublished = {\url{https://huggingface.co/datasets/RepoNeedle/RepoNeedle-Bench}}
|
| 120 |
+
}
|
| 121 |
+
```
|
| 122 |
+
|
data/test.jsonl
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "fastapi_trace2code_01", "repo_name": "tiangolo/fastapi", "task_type": "trace2code", "query": "Traceback (most recent call last):\n File \"fastapi/routing.py\", line 12, in handle\n values, errors = await solve_dependencies(request, self.endpoint)\n File \"fastapi/dependencies/utils.py\", line 14, in solve_dependencies\nTypeError: 'NoneType' object is not callable\n", "gold_files": ["fastapi/dependencies/utils.py", "fastapi/routing.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Held-out: solve_dependencies traceback in FastAPI.", "is_held_out_repo": true}
|
| 2 |
+
{"id": "fastapi_code2test_01", "repo_name": "tiangolo/fastapi", "task_type": "code2test", "query": "Identify tests verifying APIRouter route registration and include_router prefix handling.", "gold_files": ["tests/test_routing.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Held-out: test suite for router.", "is_held_out_repo": true}
|
| 3 |
+
{"id": "fastapi_edit2ripple_01", "repo_name": "tiangolo/fastapi", "task_type": "edit2ripple", "query": "Refactoring APIRoute in fastapi/routing.py. Which files reference or import APIRoute?", "gold_files": ["fastapi/applications.py", "fastapi/__init__.py"], "anchor_files": ["fastapi/routing.py"], "budget_tokens": 4000, "description": "Held-out: ripple impact of APIRoute in routing.py.", "is_held_out_repo": true}
|
| 4 |
+
{"id": "fastapi_comment2context_01", "repo_name": "tiangolo/fastapi", "task_type": "comment2context", "query": "Support sub-dependencies with cached resolution in Depends parameter injection.", "gold_files": ["fastapi/params.py", "fastapi/dependencies/utils.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Held-out: dependency caching feature.", "is_held_out_repo": true}
|
| 5 |
+
{"id": "fastapi_selective_01", "repo_name": "tiangolo/fastapi", "task_type": "selective", "query": "Fix React hydration mismatch error in Server-Side Rendering nextjs layout component.", "gold_files": [], "anchor_files": [], "budget_tokens": 4000, "description": "Held-out: counterfactual React SSR query in FastAPI.", "is_held_out_repo": true}
|
data/train.jsonl
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"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\n response = self.dispatch_request()\n File \"src/flask/wrappers.py\", line 14, in get_json\nAttributeError: 'NoneType' object has no attribute 'get'\n", "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}
|
| 2 |
+
{"id": "flask_code2test_01", "repo_name": "pallets/flask", "task_type": "code2test", "query": "Find unit and regression tests for SecureCookieSessionInterface cookie saving and modification.", "gold_files": ["tests/test_sessions.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Find test suite for sessions.", "is_held_out_repo": false}
|
| 3 |
+
{"id": "flask_edit2ripple_01", "repo_name": "pallets/flask", "task_type": "edit2ripple", "query": "We are changing the RequestContext constructor in src/flask/ctx.py. What files import or depend on RequestContext?", "gold_files": ["src/flask/app.py", "src/flask/__init__.py"], "anchor_files": ["src/flask/ctx.py"], "budget_tokens": 4000, "description": "Ripple effect analysis for ctx.py.", "is_held_out_repo": false}
|
| 4 |
+
{"id": "flask_comment2context_01", "repo_name": "pallets/flask", "task_type": "comment2context", "query": "Add support for blueprint url_prefix inheritance and nested blueprint routing rules.", "gold_files": ["src/flask/blueprints.py", "src/flask/app.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Blueprint nested routing feature.", "is_held_out_repo": false}
|
| 5 |
+
{"id": "flask_selective_01", "repo_name": "pallets/flask", "task_type": "selective", "query": "Fix compilation error in Cargo.toml regarding serde_json feature flag dependency in rust kernel.", "gold_files": [], "anchor_files": [], "budget_tokens": 4000, "description": "Counterfactual Rust cargo query in Flask.", "is_held_out_repo": false}
|
| 6 |
+
{"id": "req_trace2code_01", "repo_name": "psf/requests", "task_type": "trace2code", "query": "Traceback (most recent call last):\n File \"requests/sessions.py\", line 22, in request\n return self.send(prep)\n File \"requests/adapters.py\", line 18, in send\nrequests.exceptions.ConnectionError: Failed to establish a new connection\n", "gold_files": ["requests/adapters.py", "requests/sessions.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Connection error traceback in adapter and session.", "is_held_out_repo": false}
|
| 7 |
+
{"id": "req_code2test_01", "repo_name": "psf/requests", "task_type": "code2test", "query": "Find test suites that verify HTTPBasicAuth headers and authentication credentials formatting.", "gold_files": ["tests/test_auth.py"], "anchor_files": [], "budget_tokens": 4000, "description": "Find test suite for HTTPBasicAuth.", "is_held_out_repo": false}
|
| 8 |
+
{"id": "req_edit2ripple_01", "repo_name": "psf/requests", "task_type": "edit2ripple", "query": "Modifying PreparedRequest in requests/models.py to add streaming body support. Which files interact directly with PreparedRequest?", "gold_files": ["requests/sessions.py", "requests/auth.py", "requests/adapters.py"], "anchor_files": ["requests/models.py"], "budget_tokens": 4000, "description": "Ripple impact of PreparedRequest changes.", "is_held_out_repo": false}
|
| 9 |
+
{"id": "req_comment2context_01", "repo_name": "psf/requests", "task_type": "comment2context", "query": "Add raise_for_status HTTP error handling on response codes above 400 with custom message formatting.", "gold_files": ["requests/models.py", "requests/exceptions.py"], "anchor_files": [], "budget_tokens": 4000, "description": "raise_for_status enhancement in models and exceptions.", "is_held_out_repo": false}
|
| 10 |
+
{"id": "req_selective_01", "repo_name": "psf/requests", "task_type": "selective", "query": "Optimize PyTorch GPU tensor CUDA backward autograd pass for multi-head attention weights.", "gold_files": [], "anchor_files": [], "budget_tokens": 4000, "description": "Counterfactual PyTorch CUDA query in Requests.", "is_held_out_repo": false}
|
schema.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
| 3 |
+
"title": "RepoNeedleBenchSample",
|
| 4 |
+
"description": "Schema for RepoNeedle-Bench evaluation instances.",
|
| 5 |
+
"type": "object",
|
| 6 |
+
"properties": {
|
| 7 |
+
"id": {
|
| 8 |
+
"type": "string",
|
| 9 |
+
"description": "Unique sample identifier."
|
| 10 |
+
},
|
| 11 |
+
"repo_name": {
|
| 12 |
+
"type": "string",
|
| 13 |
+
"description": "Repository origin identifier (e.g. pallets/flask, psf/requests, tiangolo/fastapi)."
|
| 14 |
+
},
|
| 15 |
+
"task_type": {
|
| 16 |
+
"type": "string",
|
| 17 |
+
"enum": ["code2test", "comment2context", "trace2code", "edit2ripple", "selective"],
|
| 18 |
+
"description": "Workflow retrieval category."
|
| 19 |
+
},
|
| 20 |
+
"query": {
|
| 21 |
+
"type": "string",
|
| 22 |
+
"description": "Input query, issue comment, traceback, or code fragment."
|
| 23 |
+
},
|
| 24 |
+
"gold_files": {
|
| 25 |
+
"type": "array",
|
| 26 |
+
"items": { "type": "string" },
|
| 27 |
+
"description": "Ground truth repository file paths required to resolve the task."
|
| 28 |
+
},
|
| 29 |
+
"anchor_files": {
|
| 30 |
+
"type": "array",
|
| 31 |
+
"items": { "type": "string" },
|
| 32 |
+
"description": "Anchor or modified source files for ripple/impact tasks."
|
| 33 |
+
},
|
| 34 |
+
"budget_tokens": {
|
| 35 |
+
"type": "integer",
|
| 36 |
+
"default": 4000,
|
| 37 |
+
"description": "Context token budget constraint."
|
| 38 |
+
},
|
| 39 |
+
"description": {
|
| 40 |
+
"type": "string",
|
| 41 |
+
"description": "Human-readable task summary."
|
| 42 |
+
},
|
| 43 |
+
"is_held_out_repo": {
|
| 44 |
+
"type": "boolean",
|
| 45 |
+
"description": "Whether the repository is part of the held-out evaluation split."
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"required": ["id", "repo_name", "task_type", "query", "gold_files", "budget_tokens"]
|
| 49 |
+
}
|
| 50 |
+
|