index-build
Use PixelRAG to build visual retrieval indexes from rendered documents, tile chunks, embeddings, FAISS, or Qdrant.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- index-build
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use PixelRAG to build visual retrieval indexes from rendered documents, tile chunks, embeddings, FAISS, or Qdrant.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/cli-reference.md2.6 KB
- 参考文档references/config-and-data-formats.md2.7 KB
- 参考文档references/troubleshooting.md2.4 KB
- 参考文档references/workflows.md2.8 KB
- 脚本scripts/pixelrag_tiny_index_config.py2.4 KB
03 SKILL.md 正文
PixelRAG Index Build
Use this sub-skill when a task asks to make documents searchable with PixelRAG, build a local visual index, debug pixelrag.yaml, run chunk/embed/build-index stages, or choose FAISS versus Qdrant.
Start Here
- If the user only has URLs, PDFs, HTML, or images and no tiles yet, first read
../render-capture/SKILL.md. - Pick an orchestration level:
- End-to-end:
pixelrag index build --config pixelrag.yaml. - Stage-by-stage:
pixelrag chunk,pixelrag embed, andpixelrag build-index.
- End-to-end:
- Decide device and backend:
device: autochooses CUDA, MPS, then CPU in the local embedder path.- CPU/MPS is suitable for small demos; full Qwen embedding on CPU is slow.
- FAISS is the default local backend; Qdrant is for server-backed or disk/quantized vector storage.
- Validate generated artifacts before serving:
tiles/,embeddings/shard_*.npz,index.faissor Qdrantsummary.json,metadata.npz, andarticles.json.
Read or Run
- Read workflows.md for end-to-end and stage-by-stage recipes.
- Read config-and-data-formats.md for
pixelrag.yaml, source adapters, chunk manifests, embeddings, and index layouts. - Read cli-reference.md for flags and command selection.
- Read troubleshooting.md for stale tiles, article IDs, Qdrant modes, GPU/model issues, and local-source surprises.
- Run pixelrag_tiny_index_config.py to generate a tiny local-source config without downloading models.
Common Routes
| Request | Action |
|---|---|
| "Index this folder of PDFs/Markdown/images" | Generate a local-source pixelrag.yaml; use pixelrag index build --device auto for small runs or CUDA for production. |
| "Use Qdrant instead of FAISS" | Set index.backend: qdrant and provide URL/collection/client/quantization config as needed. |
| "Re-run after source files changed" | Trust the source-stamped tile manifests; use --force only for a clean rebuild. |
| "Department-filter search" | Preserve subdirectory layout under the local source; articles.json stores the first subdirectory as department. |
| "I already have embeddings" | Use pixelrag build-index build --embeddings-dir ... --output-dir .... |
| "Now query this index" | Route to ../serve-search/SKILL.md. |
Validation Checklist
pixelrag index build --helplists--device {auto,cpu,mps,cuda}.- Local source only includes
.pdf,.html,.htm,.png,.jpg,.jpeg,.md, and.txt. - Wide tiles are chunked into columns no wider than 875 px and rows of 1024 px where applicable.
article_idis propagated intochunks.jsonand embedding metadata.articles.jsontitles, URLs/paths, and department fields match the source set.- Qdrant
appendandrecreateare explicit choices, never accidental overwrites.
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).