indexing
Build, inspect, and export bounded paperai indexes from a paperetl-style SQLite corpus with txtai-compatible vector configuration.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- indexing
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Build, inspect, and export bounded paperai indexes from a paperetl-style SQLite corpus with txtai-compatible vector configuration.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md4.5 KB
- 参考文档references/data-formats.md6.7 KB
- 参考文档references/troubleshooting.md7.0 KB
- 参考文档references/workflows.md5.6 KB
- 脚本scripts/inspect_corpus.py8.4 KB
03 SKILL.md 正文
Indexing
Use this route when the task is to prepare or inspect the searchable model
behind paperai: validate a corpus, choose a txtai/vector configuration, build
an embeddings index, train optional static word vectors, or export raw section
text. Start with the no-download checker:
python scripts/inspect_corpus.py ./corpus --config ./index.yml --maxsize 1000 --toprank 0
The checker is bundled at scripts/inspect_corpus.py. Run
that command from this sub-skill directory, or replace scripts/ with the
path where this runtime skill is installed.
The ./corpus argument is a user-owned directory containing the source
artifact articles.sqlite; inspect_corpus.py is only a bundled validation
helper and is not a replacement for paperai.index.
Route the task
- Validate inputs first. Read data-formats.md and run the checker before loading a model. It checks tables, required columns, counts, bounds, and YAML shape without importing txtai or downloading a model.
- Choose configuration. Use api-reference.md
and workflows.md to distinguish a model reference,
a word-vector database, and a full YAML mapping. Start with a positive
maxsizeortoprankfor an exploratory run;0means unbounded in the source implementation. - Build and preserve the directory contract.
paperai.indexreads<path>/articles.sqliteand saves txtai artifacts back into the same directory. Do not delete the database when replacing a failed index. Confirm the output files before handing the directory to another route. - Recover deliberately. Use troubleshooting.md for missing schemas, malformed YAML, model cache/download failures, memory pressure, and interrupted full-corpus runs. A Python import or a CPU SQLite check does not prove that a configured model or accelerator can load.
- Hand off only after local checks. Query execution belongs to the sibling querying route; report task configuration and rendering belong to reporting. This route supplies their shared corpus/model prerequisites, not their presentation behavior.
Core commands
Install paperai==2.6.0 in Python 3.10+ and verify imports before attempting a
model load:
python -m pip install "paperai==2.6.0"
python -c "import paperai, paperai.index, paperai.export; print(paperai.__file__)"
The source module accepts these positional forms:
python -m paperai.index CORPUS_DIR [VECTORS_OR_YML] [MAXSIZE] [TOPRANK]
python -m paperai.export OUTPUT.txt CORPUS_DIR
For exact signatures and output artifacts, use the linked references rather than treating either positional interface as a safe full-corpus default.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).