AGENT SKILL

evaluation-and-fusion

Evaluate Pyserini run files, convert run formats, fuse retrieval runs, and use reproducibility matrices safely.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
evaluation-and-fusion
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Evaluate Pyserini run files, convert run formats, fuse retrieval runs, and use reproducibility matrices safely.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Evaluation And Fusion

Use this sub-skill when the task involves trec_eval, qrels, TREC/MS MARCO/KILT/DPR/QA retrieval evaluation, run-file validation, run conversion, reciprocal-rank fusion, interpolation, score normalization, or Pyserini two-click reproducibility matrices.

Do not use this sub-skill to generate search runs from an index. Route Lucene indexing/search/fetch workflows to ../index-search-fetch/SKILL.md, dense encoding/Faiss/hybrid retrieval generation to ../dense-encoding/SKILL.md, and Java/eval-jar/source-checkout build failures to ../install-and-runtime/SKILL.md or ../repo-development/SKILL.md.

Quick Routing

  • TREC evaluation: Validate a six-column TREC run and qrels, then run python -m pyserini.eval.trec_eval with explicit metrics.
  • MS MARCO evaluation: Keep three-column MS MARCO runs for msmarco_passage_eval/msmarco_doc_eval, or convert to six-column TREC before trec_eval.
  • KILT, DPR, and QA retrieval: Use the dedicated JSON/JSONL evaluators only after checking the expected schema and avoiding implicit annotation downloads.
  • Run filtering: Use pyserini.trectools.TrecRun and Qrels to inspect topics, retain or discard judged documents, normalize scores, or write a clean TREC run.
  • Fusion: Use python -m pyserini.fusion for rrf, interpolation, average, and normalize on valid TREC runs with compatible query/document identifiers.
  • Reproducibility matrices: Prefer --display-commands --dry-run first; treat full two-click commands as opt-in because they may download indexes, models, topics, qrels, or runs.

Default Safe Workflow

  1. Validate the candidate run before evaluation or fusion:

    python scripts/validate_trec_run.py run.trec --qrels qrels.txt --strict-ranks --summary
    
  2. If the run is MS MARCO format, convert it before using trec_eval:

    python -m pyserini.eval.convert_msmarco_run_to_trec_run --input run.msmarco.tsv --output run.trec
    
  3. Evaluate with explicit metrics and a qrels key or qrels path:

    python -m pyserini.eval.trec_eval -c -m ndcg_cut.10 -m recall.100 qrels.txt run.trec
    
  4. Build a fusion command without executing it:

    python scripts/fusion_recipe_builder.py --method rrf --runs bm25.trec dense.trec --output fused.trec --runtag demo --k 100 --depth 1000
    
  5. Validate the fused run and evaluate it with the same qrels and metrics as the input runs.

References

  • references/run-evaluation.md covers TREC, MS MARCO, KILT, DPR, QA, TrecRun, Qrels, qrels aliases, and common metrics.
  • references/reproducibility.md explains two-click reproduction modules, dry-run/display-command safety, nondeterminism, and matrix triage.
  • references/troubleshooting.md maps malformed runs, run/qrels mismatches, missing eval jars, unjudged documents, and expensive reproduction failures to fixes.
  • scripts/validate_trec_run.py --help validates TREC runs and qrels without importing Pyserini or starting Java.
  • scripts/fusion_recipe_builder.py --help generates reproducible Pyserini fusion commands with method-specific checks.

Acceptance Checklist

  • Confirm whether the run is six-column TREC or three-column MS MARCO before choosing an evaluator.
  • Keep query IDs and document IDs as strings; do not coerce them to integers unless a specific evaluator requires it.
  • Use the same qrels/topic split and metric definitions for baseline, candidate, and fused runs.
  • Validate every input run before fusion and validate the fused output before evaluation.
  • Treat prebuilt-index reproduction and neural retrieval commands as network/model/cache-sensitive unless the user has explicitly approved them.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351