AGENT SKILL

beir

Route BEIR repository tasks for benchmark data loading, retrieval evaluation, reranking, generation, and training workflows.

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

01 前言 Front Matter

name
beir
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Route BEIR repository tasks for benchmark data loading, retrieval evaluation, reranking, generation, and training workflows.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

BEIR Repo Skill

Use this skill for BEIR, the Python benchmark framework for information retrieval datasets, retrievers, rerankers, query generation, and SentenceTransformers-style training.

First Checks

  • Install the public package with pip install beir, or use an editable install only when working on a checkout.
  • Verify the core import with python -c "import beir; print(beir.__all__)".
  • Run python scripts/check_beir_environment.py to inspect core and optional dependencies without contacting external services.
  • Read references/repo-provenance.md before deciding whether this skill matches a current checkout or should be refreshed.
  • Use references/troubleshooting.md for cross-cutting install, optional backend, data, service, credential, and scale failures.

Route by Task

  • Use data-loading for BEIR corpus.jsonl, queries.jsonl, qrels/<split>.tsv, Hugging Face datasets, local validation, downloads, runfiles, and result JSON persistence.
  • Use retrieval-evaluation for EvaluateRetrieval, dense exact search, FAISS, sparse retrieval, BM25/Elasticsearch, API embeddings, custom model protocols, metrics, embedding caches, and runfile export.
  • Use reranking when first-stage retrieval results need a cross-encoder, MonoT5, SBERT, or custom pair-scoring second stage.
  • Use generation for synthetic query generation, generated qrels, passage expansion, output prefixes, and fake-model smoke checks.
  • Use training for TrainRetriever, pair/triplet construction, IR evaluators, BEIR losses, hard-negative workflows, and safe training-run planning.

Common Workflow Order

  1. Start in data-loading to validate local files or understand remote dataset requirements.
  2. Move to retrieval-evaluation to choose a backend and compute BEIR metrics.
  3. Add reranking only after you have candidate results from a first-stage retriever.
  4. Use generation when you need generated queries, qrels, or expanded corpora before retrieval or training.
  5. Use training when preparing model fine-tuning data or planning a long SentenceTransformers run.

Bundled Smoke Tests

Run these from inside the skills/beir/ directory or pass the full script paths from elsewhere:

python scripts/check_beir_environment.py
python sub-skills/data-loading/scripts/make_tiny_beir_dataset.py /tmp/beir-tiny
python sub-skills/data-loading/scripts/validate_beir_dataset.py /tmp/beir-tiny --split test
python sub-skills/retrieval-evaluation/scripts/retrieval_smoke.py
python sub-skills/reranking/scripts/rerank_smoke.py
python sub-skills/generation/scripts/generation_smoke.py
python sub-skills/training/scripts/training_data_smoke.py --exercise-max-corpus-error

These checks are offline and deterministic. They do not download BEIR datasets, model weights, or contact Elasticsearch/API services.

Dependency Boundaries

  • Core BEIR data loading and metric evaluation need the package runtime dependencies from pyproject.toml.
  • FAISS workflows require faiss-cpu or a compatible GPU FAISS installation.
  • BM25 workflows require the elasticsearch extra and a running Elasticsearch-compatible service; installing the Python package alone is not enough.
  • Cohere and Voyage API embedding workflows require provider packages, environment variables, network access, and account credentials.
  • vLLM, LoRA, NVEmbed, LLM2Vec, PEFT, TILDE, MonoT5, and full training workflows can require large model downloads, GPU memory, and careful PyTorch/Transformers compatibility.

Refresh Guidance

Refresh this skill if BEIR package metadata, public APIs, examples, optional dependency names, supported Python versions, retrieval model wrappers, generation wrappers, or training helpers change. The provenance file records the source commit and evidence paths used to generate this version.

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