技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
graphrag【数据与研究】Use Microsoft GraphRAG from CLI or Python: configure data/model/storage/vector settings, build or update indexes, query completed indexes, tune indexing prompts, and extend package factories safely.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task mentions Microsoft GraphRAG, graph-based RAG, graphrag init, graphrag index, graphrag query, graphrag prompt-tune, GraphRAG settings, completed index tables, or custom GraphRAG providers.
GraphRAG is a Python package and CLI for extracting structured knowledge graphs from unstructured text, writing index tables/vector stores, and querying those completed indexes with global, local, DRIFT, or basic search.
Confirm GraphRAG is installed in the target environment:
python - <<'PY'
import graphrag
print("graphrag import ok")
PY
graphrag --help
Identify the user’s workflow:
sub-skills/configuration-data/sub-skills/indexing/sub-skills/querying/sub-skills/prompt-tuning/sub-skills/package-extensions/Keep live-service calls guarded. Indexing, querying, and prompt tuning often need OpenAI/Azure credentials, model deployments, vector stores, or storage services. Prefer bundled validators and offline contract checks before running cost-incurring commands.
sub-skills/configuration-data/ for settings.yaml, .env interpolation, model/auth config, input formats (text, csv, json, jsonl, markitdown, parquet), file/blob/Cosmos storage, JSON/memory/no-op cache, LanceDB/Azure AI Search/Cosmos vector stores, and safe config/input diagnostics.sub-skills/indexing/ for graphrag init, graphrag index, graphrag update, Python build_index(...), standard vs fast indexing, custom workflow lists, BYOG tables, output table validation, embeddings, and incremental update failure recovery.sub-skills/querying/ for graphrag query, global/local/DRIFT/basic search, streaming APIs, completed-index table contracts, vector-store names and ID keys, community levels, dynamic community selection, and query prerequisite checks.sub-skills/prompt-tuning/ for graphrag prompt-tune, Python generate_indexing_prompts(...), selection methods, output prompt files, multilingual/domain/entity-type tuning, and prompt output validation.sub-skills/package-extensions/ for custom cache/storage/table/input/chunker/vector/LLM providers, factory register_* and create_* patterns, graph helper checks, workflow factory registration, and optional dependency diagnostics.sub-skills/configuration-data/ to initialize or validate settings.yaml, .env, input layout, storage, cache, and vector-store settings.sub-skills/indexing/ to run graphrag init, graphrag index, or graphrag update, and validate output tables.sub-skills/querying/ to choose global/local/DRIFT/basic search and check completed-index prerequisites before running model-backed queries.sub-skills/configuration-data/ for model credentials and input readiness.sub-skills/prompt-tuning/ to generate extract_graph.txt, summarize_descriptions.txt, and community_report_graph.txt.sub-skills/indexing/ to run an index with the updated prompts.sub-skills/package-extensions/ to pick the correct factory and offline mock pattern.sub-skills/configuration-data/ only when the custom provider must be wired through GraphRAG YAML.references/cli-command-map.md summarizes the verified public CLI commands and when to route to each sub-skill.references/capability-routing.md maps natural user requests to the owning sub-skill and notes key exclusions.references/troubleshooting.md covers cross-cutting install/import, credentials, optional dependencies, service, and cost-safety failures.references/repo-provenance.md records the source snapshot used to generate this skill. Read it before deciding whether this skill is stale for a different checkout.3.1.0; the sub-skills call out known docs drift where it affects JSONL/parquet/MarkItDown support or prompt output filenames.