executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
prompt-tuningRun, plan, and diagnose GraphRAG prompt tuning for indexing prompt templates, including graphrag prompt-tune and generate_indexing_prompts outputs for entity extraction, entity summarization, community report summarization, multilingual/domain guidance, and entity-type discovery.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task mentions GraphRAG prompt tuning, auto/manual tuning, graphrag prompt-tune, generate_indexing_prompts, extract_graph prompts, entity extraction prompts, entity summarization prompts, community report prompts, multilingual tuning, domain tuning, or discovered entity types.
Do not use this sub-skill for full indexing execution; route that to ../indexing/. Do not use it for initial workspace setup, config loading, or input data layout except where prompt tuning depends on those fields; route setup work to ../configuration-data/. Do not cover general query prompts except to explain that this sub-skill only produces indexing prompt templates.
graphrag prompt-tune --root <project> --output prompts for operator workflows.await generate_indexing_prompts(config, ...) when embedding prompt tuning in Python automation.--selection-method random for the default representative sample.--selection-method top for deterministic head-of-corpus inspection.--selection-method all only for small corpora.--selection-method auto --n-subset-max <n> --k <k> for embedding-based representative selection.--domain "<domain>" avoids an extra domain inference step.--language "<target language>" controls prompt language and can request translated output guidance.--discover-entity-types lets the LLM infer entity types; --no-discover-entity-types uses untyped extraction templates.graphrag prompt-tune \
--root <project> \
--domain "environmental news" \
--language English \
--selection-method random \
--limit 15 \
--max-tokens 2000 \
--chunk-size 200 \
--min-examples-required 2 \
--output prompts
The CLI writes:
extract_graph.txtsummarize_descriptions.txtcommunity_report_graph.txtAfter generation, configure indexing to use those prompt files:
extract_graph:
prompt: "prompts/extract_graph.txt"
summarize_descriptions:
prompt: "prompts/summarize_descriptions.txt"
community_reports:
prompt: "prompts/community_report_graph.txt"
from graphrag.api.prompt_tune import generate_indexing_prompts
from graphrag.config.load_config import load_config
config = load_config(root_dir=project_root)
extract_graph, summarize_descriptions, community_report = await generate_indexing_prompts(
config=config,
limit=15,
selection_method="random",
domain="environmental news",
language="English",
max_tokens=2000,
discover_entity_types=True,
min_examples_required=2,
n_subset_max=300,
k=15,
verbose=True,
)
Persist the tuple using the live CLI filenames when writing files yourself. The API initializes prompt-tuning.log, loads/chunks input documents, creates the configured completion model, optionally infers domain/language/entity types, generates entity/relationship examples, and returns the three indexing prompt strings.
Use the bundled validator to check generated output directories:
python sub-skills/prompt-tuning/scripts/validate_prompt_tune_contract.py prompts
python sub-skills/prompt-tuning/scripts/validate_prompt_tune_contract.py prompts --check-placeholders
--check-placeholders checks for expected indexing template placeholders and suspicious unmatched braces. It is intentionally static and does not call GraphRAG, LLMs, storage, or input readers.
references/prompt-tune-api-cli.md for CLI/API options and behavior.references/prompt-template-outputs.md for output filenames, config mapping, and placeholders.references/troubleshooting.md for failures around config/model setup, input loading, chunk sampling, LLM parsing, token budgets, braces, multilingual tuning, and filename drift.