AGENT SKILL

pdf-indexing

Guides classic LLM-assisted PageIndex PDF tree extraction, TOC recovery, summaries, and document descriptions.

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

01 前言 Front Matter

name
pdf-indexing
license
MIT
metadata
{ "disco-role": "operating" }
description
Guides classic LLM-assisted PageIndex PDF tree extraction, TOC recovery, summaries, and document descriptions.
disable-model-invocation
true

03 SKILL.md 正文

Classic PDF Indexing

Use this sub-skill when the user wants the original PageIndex PDF pipeline: TOC detection, TOC transformation, page-number reconciliation, recursive splitting, node summaries, document descriptions, or page_index(...) usage.

Do not use it for:

  • fast no-LLM PDF extraction -> use ../flash-indexing/
  • Markdown heading trees -> use ../markdown-indexing/
  • workspace retrieval or agent tools -> use ../retrieval-client/

Required context

Read these shared references as needed:

  • ../../references/workflows.md#classic-pdf-tree-extraction for the end-to-end workflow.
  • ../../references/api-reference.md#classic-pdf-tree-extraction for verified signatures.
  • ../../references/cli-reference.md#bundled-pageindex-cli-wrapper for flags and examples.
  • ../../references/configuration.md for model defaults and credentials.
  • ../../references/data-formats.md#pdf--flash-tree-nodes for output shape.
  • ../../references/troubleshooting.md#classic-pdf-extraction for common failures.

Operating flow

  1. Confirm that pageindex imports with python ../../scripts/check_env.py.

  2. Confirm model access. The classic PDF path uses LLM calls for TOC handling even when node summaries are disabled.

  3. Use the bundled wrapper rather than a source checkout script path:

    python ../../scripts/pageindex_cli.py --pdf_path document.pdf
    
  4. Tune document-size behavior with --toc-check-pages, --max-pages-per-node, and --max-tokens-per-node.

  5. Tune output density with --if-add-node-summary, --if-add-doc-description, --if-add-node-text, and --if-add-node-id.

  6. Inspect the resulting structure tree with 1-based inclusive start_index / end_index page ranges.

Important behavior

  • The pipeline wraps and sanitizes untrusted document text before model calls and validates physical page markers.
  • TOC-with-page-number, TOC-without-page-number, and no-TOC branches are all model-backed.
  • The pipeline rejects reordered or modified TOC entries returned by a model and nullifies page indexes not supported by the current chunk.
  • Very broad nodes can be recursively split when they exceed configured page/token thresholds.
  • The pipeline applies deterministic merge logic before final formatting.

Common decisions

  • If the user lacks model credentials, route to ../flash-indexing/ and use --flash --no-summary for first-pass structure.
  • If the user wants every node to carry raw text, set --if-add-node-text yes, but warn about large JSON outputs.
  • If the user wants a document summary, set --if-add-doc-description yes and keep summary/model access available.
  • If page numbers look wrong, inspect model output stability and retry with better model settings before changing structural thresholds.

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