Datasets:
Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221---pretty_name: Beyond Reference Skillslanguage:- entask_categories:- text-retrievaltags:- agent-skills- relevance-judgments- qrelssize_categories:- 1K<n<10Ksource_datasets:- WeihangSu/SRA-Bench- Shiyu-Lab/Skill-Usage# license: TODOconfigs:- config_name: labels default: true data_files: - split: bigcodebench path: human/final/flags/bigcodebench-flags.tsv - split: champ path: human/final/flags/champ-flags.tsv - split: logicbench path: human/final/flags/logicbench-flags.tsv - split: medcalcbench path: human/final/flags/medcalcbench-flags.tsv - split: theoremqa path: human/final/flags/theoremqa-flags.tsv - split: skill_usage path: human/final/flags/skill_usage-flags.tsv- config_name: queries data_files: - split: bigcodebench path: queries/bigcodebench.jsonl - split: champ path: queries/champ.jsonl - split: logicbench path: queries/logicbench.jsonl - split: medcalcbench path: queries/medcalcbench.jsonl - split: theoremqa path: queries/theoremqa.jsonl - split: skill_usage path: queries/skill_usage.jsonl---
# Beyond Reference Skills
Graded relevance labels and quality flags for agent skill retrieval on **SRA-Bench** (50 tasks, 26,262-skillcorpus) and **Skill-Usage** (25 tasks, 34,396-skill corpus). Each task's judgment pool is the union of 12retrievers' top 5, plus any reference skill none of them returned. Three annotators graded every task–skillpair 0–3 and flagged skills that are malicious, contain incorrect information or are not actionable. Alongsidethe human labels are the queries the retrievers were given, LLM-judge labels (gpt-oss-120b) and utilitylabels: how agent models do on each task with each judged skill injected, against a no-skill baseline.
The skills themselves are not included: they come from[WeihangSu/SRA-Bench](https://huggingface.co/datasets/WeihangSu/SRA-Bench) and[Shiyu-Lab/Skill-Usage](https://huggingface.co/datasets/Shiyu-Lab/Skill-Usage).
**Paper:** TODO · **Code:** TODO (GitHub) · **Agent runs:** TODO (Hugging Face)
| | SRA-Bench | Skill-Usage ||---|---|---|| Tasks | 50 (10 per dataset) | 25 || Judged task–skill pairs | 1,525 | 750 || Skills in the corpus | 26,262 | 34,396 || Utility models | Llama-3.1-8B-Instruct, GLM-4.5-Air-FP8, Qwen3.6-27B-FP8 | GLM-4.5-Air-FP8, Qwen3.6-27B-FP8 |
SRA-Bench's tasks come from five datasets: BigCodeBench, CHAMP, LogicBench, MedCalc-Bench and TheoremQA.Report the two benchmarks separately.
## Evaluate a retriever
The qrels are in TREC format, so `ir_measures`, `trec_eval` and PyTerrier read them directly. This examplescores BM25 on SRA-Bench with PyTerrier (`pip install python-terrier huggingface_hub`; needs Java 11 orlater). It downloads the qrels and queries from this dataset and the skills from SRA-Bench:
```pythonimport json, re, tempfileimport pandas as pdimport pyterrier as ptfrom huggingface_hub import hf_hub_downloadfrom ir_measures import nDCG, P, R, Judged
LABELS = "jdh235/beyond-reference-skills"DATASETS = ["bigcodebench", "champ", "logicbench", "medcalcbench", "theoremqa"] # SRA-Bench
def download(repo, path): return hf_hub_download(repo, path, repo_type="dataset")
qrels = pd.concat(pt.io.read_qrels(download(LABELS, f"human/final/qrels/{ds}-relevance.qrels")) for ds in DATASETS)queries = pd.concat(pd.read_json(download(LABELS, f"queries/{ds}.jsonl"), lines=True) for ds in DATASETS)queries = queries.rename(columns={"query_id": "qid"})skills = json.load(open(download("WeihangSu/SRA-Bench", "corpus/corpus.json")))
# BM25 as in the judgment pool: lowercased, punctuation removed, no stemming or stopwordsdef tokenize(text): return " ".join(re.sub(r"[^\w\s]", " ", text.lower()).split())
index = pt.IterDictIndexer(tempfile.mkdtemp(), meta={"docno": 128}, tokeniser="WhitespaceTokeniser", stemmer=None, stopwords=None, properties={"max.term.length": "10000"}).index( {"docno": s["skill_id"], "text": tokenize("\n".join(s[k] for k in ("name", "description", "content") if s.get(k)))} for s in skills)bm25 = pt.apply.query(lambda q: tokenize(q["query"])) >> pt.terrier.Retriever( index, wmodel="BM25", controls={"termpipelines": ""})
# Swap bm25 for your own retriever: any PyTerrier pipeline that returns skill_ids as docnoprint(pt.Experiment([bm25], queries, qrels, eval_metrics=[nDCG@5, P(rel=2)@5, R(rel=2)@5, Judged@5], names=["BM25"]))```
BM25 scores nDCG@5 0.276, P(rel=2)@5 0.176, R(rel=2)@5 0.246 and Judged@5 1.0: it was one of the poolretrievers, so all of its top 5 is judged. A retriever outside the pool will have some unjudged skills.
**Skill-Usage.** Set `DATASETS = ["skill_usage"]` and load the skills from Skill-Usage's archive (788 MB)instead. BM25 then scores nDCG@5 0.578.
```pythonimport io, zipfile
archive = zipfile.ZipFile(download("Shiyu-Lab/Skill-Usage", "skills-34k/skills.zip"))skills = []for line in open(download("Shiyu-Lab/Skill-Usage", "skills-34k/skills_meta.jsonl")): meta = json.loads(line) try: text = io.TextIOWrapper(archive.open(f"{meta['skill_id']}/SKILL.md"), encoding="utf-8", errors="replace").read() except KeyError: # no SKILL.md text = "" content = re.sub(r"^---\s*\n.*?\n---\s*\n", "", text, count=1, flags=re.DOTALL).strip() # drop the frontmatter skills.append({"skill_id": meta["skill_id"], "name": meta.get("name", ""), "description": meta.get("description", ""), "content": content})```
**A run file.** To score a run you already have in TREC format:
```pythonimport ir_measuresfrom huggingface_hub import hf_hub_downloadfrom ir_measures import nDCG, P, R, Judged
qrels = list(ir_measures.read_trec_qrels(hf_hub_download( "jdh235/beyond-reference-skills", "human/final/qrels/skill_usage-relevance.qrels", repo_type="dataset")))run = list(ir_measures.read_trec_run("my_run.trec"))print(ir_measures.calc_aggregate([nDCG@5, P(rel=2)@5, R(rel=2)@5, Judged@5], qrels, run))```
Its query IDs must be the `query_id`s here and its document IDs the corpus's `skill_id`s. Ten Skill-Usage`skill_id`s contain spaces, which a TREC run file can't hold. None of them is judged, so write them with thespaces replaced (by `_`, say) rather than leaving them out, which would move lower-ranked skills into the top 5.
**How to measure.** A skill counts as relevant when graded 2 or 3, so set `rel=2` in binary measures. Only eachtask's pool was judged: measure at depth 5 and report `Judged@5`, the share of the top 5 with a label.Unjudged skills count as non-relevant.
## Beyond retrieval
The labels also support studying whether skills help the agents that use them:
- **End-to-end utility.** `utility/{benchmark}/{model}/{dataset}-utility.json` gives, per task, a model's rewards over three runs with no skill, and with each judged skill injected on its own. Relate the grades to whether a skill actually helps, or compare reference skills with the others.- **Skill selection.** The agent runs (TODO link) record which offered skills agents chose to open under progressive disclosure, and how they did. Join them with the grades to study how agents select skills.- **Skill quality.** The flags mark skills that are malicious, contain incorrect information or are not actionable in the task's environment. They cover only the judged skills, so an unflagged skill is not known to be safe.- **LLM judges.** `llm_judge/gpt-oss-120b/` has the judge's grade and flags for every pair, to compare with the human labels or to benchmark another judge against.- **Annotator agreement.** `human/first_round/` has each annotator's grades and flags, and `human/reannotation/` the second round.
## Queries
`queries/{dataset}.jsonl` has the exact query every retriever was given, one `{"query_id", "query"}` per line.For SRA-Bench this is the agent's prompt for the task: the dataset's prompt template around the question,followed by the system prompt. For Skill-Usage it is the task's `instruction.md`.
The queries are optional. The grades judge each skill against the task, not against a particular query, soyou can write your own queries from the source benchmarks instead. A `query_id` is the `instance_id` inSRA-Bench's `instances/{dataset}.json`, or the task's folder name in the[Skill-Usage repository](https://github.com/UCSB-NLP-Chang/Skill-Usage)'s `tasks/` (we used commit`03446d16f7b659ccc93ac5bd512f62e9b7fabb45`). To download the labels without them:
```bashhf download jdh235/beyond-reference-skills --repo-type dataset --exclude "queries/*"```
## Files
`{dataset}` is `bigcodebench`, `champ`, `logicbench`, `medcalcbench` or `theoremqa` (SRA-Bench), or`skill_usage`.
| Path | Contents ||---|---|| `human/final/qrels/{dataset}-relevance.qrels` | Final grade per pair: `query_id 0 skill_id grade` (0–3) || `human/final/flags/{dataset}-flags.tsv` | Final grade and consensus quality flags per pair (tab-separated, header row; flag 1 = flagged). The dataset viewer shows these as the `labels` config || `human/first_round/task_subset_{1,2,3}/` | Each annotator's first-round grades (`{dataset}-annotation.json`) and flags (`flags.json`) || `human/reannotation/` | Second-round grades for re-annotated pairs, and second-round flags (`flags/round2/`) || `queries/{dataset}.jsonl` | The query for each annotated task (see [Queries](#queries)); the `queries` config in the viewer || `llm_judge/gpt-oss-120b/{dataset}.jsonl` | One line per pair: the judge's full trajectory, sampling settings, and its answer in `content` (`rating`, `malicious`, `incorrect_info`, `not_actionable`, `reasoning`) || `utility/{sra_bench,skill_usage}/{model}/{dataset}-utility.json` | Per task: the baseline's rewards over three runs, and each judged skill's rewards with that skill injected |
## How the labels were made
**Final grade.** The re-annotation grade if the pair was re-annotated (its first-round grades differed by twoor more), otherwise the median of the three first-round grades.
**Final flags.** Flags are given per skill, so a skill's flags repeat on each of its pairs. A flag anyannotator marked in the first round was re-annotated by all three, and is final if two of the threesecond-round answers mark it; any other flag is final as not flagged.
## Licence
TODO
## Citation
```bibtexTODO```README.mdAdded+221