AGENT SKILL

indexing-and-search

Build ColBERT indexes, load existing indexes, run single-query and batch retrieval, tune search hyperparameters, and save rankings safely.

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

01 前言 Front Matter

name
indexing-and-search
license
MIT
metadata
{ "disco-role": "operating" }
description
Build ColBERT indexes, load existing indexes, run single-query and batch retrieval, tune search hyperparameters, and save rankings safely.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

ColBERT Indexing and Search

Use this sub-skill when the task is to turn a TSV passage collection into a ColBERT index, open an existing ColBERT index, retrieve top-k passages for one query or many queries, tune retrieval speed/quality settings, validate collection/query/ranking inputs, or diagnose index path and ranking-output issues.

Route the task

  • For public imports, verified signatures, path resolution, return shapes, overwrite modes, and CPU/GPU behavior, read references/api-reference.md.
  • For copy-editable indexing, existing-index loading, single-query search, batch search, ranking save, index_root, mmap, and tuning workflows, read references/index-search-workflows.md.
  • For checkpoint, optional dependency, backend, TSV/config, API misuse, overwrite, qid_to_pids, and output-location failures, read references/troubleshooting.md.
  • For deterministic preflight checks of user-provided collection, query, and ranking TSV files before expensive ColBERT runs, use scripts/validate_colbert_inputs.py.
  • For an editable minimal script that exposes index, search, and search-all subcommands with public ColBERT APIs, adapt scripts/minimal_index_search_template.py.

Core boundaries

  • Cover Indexer, Searcher, Run, RunConfig, ColBERTConfig, Collection, Queries, Ranking, index_root, overwrite/reuse/resume, load_index_with_mmap, and ncells/ndocs search tuning.
  • Keep training, distillation, triples, and checkpoint training workflows in ../training-and-distillation/.
  • Keep TSV/qrels/evaluation details beyond basic indexing/search I/O in ../data-and-evaluation/.
  • Keep mutable add/remove/persist index serving workflows in ../index-updates-and-serving/.
  • Keep tokenizer internals, checkpoint architecture, and model compatibility analysis in ../modeling-and-tokenization/.

Fast starting point

  1. Validate TSV shapes before expensive work: python scripts/validate_colbert_inputs.py --collection collection.tsv --queries queries.tsv.
  2. Index with explicit checkpoint, root, experiment, index_name, and overwrite policy.
  3. Search by reusing the same root, experiment, and index_name, or pass explicit index_root when the index is outside the default layout.
  4. Save batch results with Ranking.save(...); use an absolute output path or print the returned path because relative paths are resolved by the active Run context.

Verified package facts

  • Distribution: colbert-ai 0.2.22; import package: colbert.
  • Verified imports include colbert, colbert.infra, colbert.data, colbert.modeling.checkpoint, utility, and baleen.
  • CPU import inspection works, but practical indexing and training usually require CUDA/GPU; CPU search is possible and mmap search is CPU-only.
  • Important signatures: Indexer(checkpoint, config=None, verbose=3), Searcher(index, checkpoint=None, collection=None, config=None, index_root=None, verbose=3), Collection(path=None, data=None), Queries(path=None, data=None), and Ranking(path=None, data=None, metrics=None, provenance=None).

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