Documentation Index
Fetch the complete documentation index at: https://mintlify.com/StarTrail-org/PixelRAG/llms.txt
Use this file to discover all available pages before exploring further.
pixelrag_index orchestrates the full pipeline (source → render → chunk → embed → index) from a pixelrag.yaml config. It is the highest-level entry point in the PixelRAG toolkit. The pixelrag index build CLI command and the build() Python function both call the same four-stage pipeline: render documents to tiles, chunk tiles into 1024 px strips, embed chunks with Qwen3-VL-Embedding-2B, and build a FAISS (or Qdrant) index. Install with pip install 'pixelrag[index]'.
build()
Parameters
Configuration dictionary as returned by
load_config(). Controls source, rendering, embedding, and index parameters.Process only the first
N documents from the source. Useful for testing a config without running the full build. None (default) processes all documents.When
True, delete any existing tiles/ and embeddings/ directories before starting. Useful for a clean rebuild when the source set has changed significantly. Without --force, the pipeline skips already-rendered tiles and reuses existing embeddings.Returns
Path — the output directory (same as config["output"]), containing index.faiss, metadata.npz, summary.json, and articles.json.
Stages
- Render — calls
pixelrag_render.render_urls(for web/kiwix sources) orrender_pdf(for PDF sources) to producetiles/from each document. - Chunk — runs
pixelrag_embed.chunkto split 8192 px tiles into 1024 px strips and writechunks.jsonmanifests. - Embed — runs
pixelrag_embed.embed(GPU) orpixelrag_embed.embed_cpu(CPU/MPS) to produce.npzembedding shards inembeddings/. - Index — runs
pixelrag_embed.index buildto merge shards and build the FAISS index (or upload to Qdrant).
Example
load_config()
pixelrag.yaml configuration file and merge it with the built-in defaults. Returns a plain dict.
Parameters
Path to a YAML config file. When
None, the function searches for pixelrag.yaml then pixelrag.yml in the current working directory. If neither is found, the built-in defaults are returned as-is.Returns
dict with the merged config. Built-in defaults are:
Example pixelrag.yaml
CLI Reference
pixelrag index build
Run the full pipeline from a config file.| Option | Default | Description |
|---|---|---|
--config, -c | auto-discover | Path to pixelrag.yaml |
--source, -s | from config | Source path (overrides source.path in config) |
--source-type | from config | Source type: local, web, kiwix, pdf |
--output, -o | from config | Output directory |
--device | from config | Embedding device: auto, cpu, mps, cuda |
--limit, -n | none | Maximum number of documents to process |
--force, -f | false | Delete existing tiles and embeddings for a clean rebuild |
pixelrag monitor
Monitor live pipeline progress. Shows per-stage status and throughput.pixelrag monitor tracks progress by watching the output directory structure. Run it in a separate terminal while pixelrag index build is running.