AGENT SKILL

knowledge-graphs

Use TorchDrug for knowledge graph reasoning, triple datasets, embedding models, NeuralLP, KGC tasks, negative sampling, and filtered ranking troubleshooting.

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

01 前言 Front Matter

name
knowledge-graphs
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use TorchDrug for knowledge graph reasoning, triple datasets, embedding models, NeuralLP, KGC tasks, negative sampling, and filtered ranking troubleshooting.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Knowledge Graphs

Use this sub-skill when a user asks about knowledge graph reasoning, link prediction over triples, KGC datasets, filtered ranking metrics, negative sampling, or switching between TorchDrug embedding models and NeuralLP.

When to Use

  • The data is a set of (head, relation, tail) facts or benchmark knowledge graph triples.
  • The task is knowledge graph completion, missing-link prediction, filtered ranking evaluation, or rule-style reasoning.
  • The user mentions FB15k, FB15k-237, WN18, WN18RR, YAGO3-10, Hetionet, TransE, DistMult, ComplEx, RotatE, SimplE, KBGAT, or NeuralLP.
  • The user needs task-parameter guidance for KnowledgeGraphCompletion, including num_negative, fact_ratio, sample_weight, strict_negative, filtered_ranking, or full_batch_eval.

Quick Routing

  • For generic graph tensors, packing, masking, graph construction, or data.Graph mechanics, use the sibling graph-data sub-skill.
  • For core.Engine, optimizers, schedulers, checkpoints, logging, and multi-GPU training loops, use the sibling training-engine sub-skill.
  • For KG-specific model/task/dataset decisions, start with references/api-reference.md.
  • For end-to-end embedding and NeuralLP recipes, use references/reasoning-workflows.md.
  • For bad triples, relation/entity indexing errors, negative sampling surprises, dataset download issues, or ranking-memory failures, use references/troubleshooting.md.

Safe Helper

Run scripts/plan_kg_reasoning.py to print a side-effect-free API skeleton for an embedding or NeuralLP workflow. It does not download datasets, import TorchDrug, allocate GPUs, or train models.

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