indexing
Initialize GraphRAG workspaces and run, update, inspect, or troubleshoot indexing pipelines, including standard vs fast methods, workflow selection, output tables, BYOG indexes, embeddings, cache/reporting/storage, and incremental update failures.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- indexing
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Initialize GraphRAG workspaces and run, update, inspect, or troubleshoot indexing pipelines, including standard vs fast methods, workflow selection, output tables, BYOG indexes, embeddings, cache/reporting/storage, and incremental update failures.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/indexing-api-cli.md3.4 KB
- 参考文档references/indexing-config-and-data.md4.3 KB
- 参考文档references/indexing-workflows-and-outputs.md4.4 KB
- 参考文档references/troubleshooting.md4.9 KB
- 脚本scripts/inspect_index_config.py5.0 KB
- 脚本scripts/run_mock_index_workflow.py4.4 KB
- 脚本scripts/validate_index_outputs.py7.4 KB
03 SKILL.md 正文
GraphRAG Indexing
Use this sub-skill when a task mentions graphrag init, graphrag index, graphrag update, build_index, indexing methods, workflows, output parquet tables, BYOG tables, embeddings generated during indexing, or update failures.
Route First
- For config schema details, input providers, model/env setup, and storage provider configuration, use
../configuration-data/. - For querying a completed index with global, local, DRIFT, or basic search, use
../querying/. - For generating or editing extraction/community report prompts, use
../prompt-tuning/. - For implementing custom factories/providers beyond workflow selection, use
../package-extensions/.
Common Tasks
Initialize a Workspace
graphrag init --root <project-root>
This creates a default config and prompt layout. After initialization, add input documents under the configured input location, set model credentials outside committed config when needed, and dry-run the indexer before a costly run.
Dry-Run and Build an Index
graphrag index --root <project-root> --dry-run
graphrag index --root <project-root> --method standard
standard is the default. Use --method fast for FastGraphRAG when lower cost matters more than rich LLM-derived entity and relationship descriptions. Add --verbose while debugging and --no-cache only when cached LLM responses must be ignored.
Incrementally Update an Index
graphrag update --root <project-root> --method standard
update calls the same indexing API with is_update_run=True, copies previous output tables into update storage, builds a delta index, then runs update merge workflows. Confirm previous outputs exist before updating, and verify that changed, deleted, duplicate, and unchanged document titles behave as expected for the project.
Call the Python API
import asyncio
from graphrag.api import build_index
from graphrag.config.load_config import load_config
config = load_config(root_dir="<project-root>")
results = asyncio.run(build_index(config, method="standard", verbose=True))
if any(result.error for result in results):
raise RuntimeError([result.workflow for result in results if result.error])
The verified signature is build_index(config, method='standard', is_update_run=False, callbacks=None, additional_context=None, verbose=False, input_documents=None). input_documents may be a pandas DataFrame with GraphRAG document columns to bypass file loading.
Method Choice
standard: LLM graph extraction, relationship extraction, description summarization, optional claims, community reports, and embeddings. Prefer for high-fidelity graph outputs.fast: NLP noun phrase extraction and co-occurrence relationships, LLM community reporting, and embeddings. Prefer for lower cost or large exploratory runs; check SpaCy/NLP model requirements when using non-default extractors.standard-update/fast-update: internal pipeline names selected whenbuild_index(..., is_update_run=True)orgraphrag updateis used with the base method.- Custom
workflows: a configworkflowslist overrides built-in method pipelines; use it for BYOG or partial reruns after confirming source tables exist.
Outputs to Expect
Default file table output is parquet. Core tables are documents, text_units, entities, relationships, communities, and community_reports; covariates appears when claim extraction is enabled. Embeddings are written to the configured vector store for enabled embedding names such as text_unit_text, entity_description, and community_full_content.
Use bundled helpers:
python sub-skills/indexing/scripts/inspect_index_config.py --root <project-root>
python sub-skills/indexing/scripts/validate_index_outputs.py --output <project-root>/output --use global
python sub-skills/indexing/scripts/run_mock_index_workflow.py
BYOG Pattern
For bring-your-own graph, place entities.parquet and relationships.parquet in the configured output table location before running only the downstream workflows. Add text_units.parquet and generate_text_embeddings when local, DRIFT, or basic search will need chunks or vectors.
Minimal global-search BYOG workflow:
workflows: [create_communities, create_community_reports]
Expanded BYOG workflow for non-global search:
workflows: [create_communities, create_community_reports, generate_text_embeddings]
FastGraphRAG-style BYOG reporting can use create_community_reports_text when entities and relationships lack descriptions but have valid text_unit_ids links.
References
- See
references/indexing-api-cli.mdfor CLI/API entry points and lifecycle details. - See
references/indexing-config-and-data.mdfor config, storage, input, BYOG, cache, and vector considerations. - See
references/indexing-workflows-and-outputs.mdfor built-in workflow order and output table expectations. - See
references/troubleshooting.mdfor common failures and targeted fixes.
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).