kg_ontology

Resolve extracted surface spans into canonical knowledge-graph node identities using WordNet synsets and hypernym context.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/thistleknot/skills --skill kg-ontology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kg_ontology
Source: https://github.com/thistleknot/skills/tree/main/kg_ontology
Command: npx skills add https://github.com/thistleknot/skills --skill kg-ontology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resolves noisy entity and predicate surface forms into stable canonical node identities so your knowledge graph doesn’t fragment into duplicates and mismatched concepts across documents.

Core Features & Use Cases

  • Canonical identity resolution for DKG: Collapses surface spans (e.g., SOW / “Statement of Work” / “sow”) into a single canonical entity/predicate identity suitable for downstream triplets and graph storage.
  • Synset + hypernym driven disambiguation: Uses a multi-stage approach (synset augmentation + LLM selection) to pick best synsets and preserve hierarchical hypernym context for retrieval without exposing ontology scaffolding in the visible graph.
  • BM25 vertical alignment without graph traversal: Injects synset and first-level hypernym tokens into bm25_text so cross-entity matching works via lexical retrieval rather than expensive topology traversal.
  • Layer separation & provenance-only debug: Keeps evidence (surface phrases, candidate lists) separate from ontology winners, hiding debug structures (e.g., alias links, subClassOf, candidate senses) from the default user-facing graph.

Quick Start

Use the kg_ontology skill to convert extracted triplets into canonical (subject, predicate, object) node identifiers using WordNet synsets and hidden hypernym scaffolding for BM25 vertical alignment.

Frequently Asked Questions about kg_ontology

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve duplicate entities in a knowledge graph built from noisy text?

Canonicalize knowledge graph entities by resolving surface spans into stable node identities using WordNet synsets and hierarchical hypernym context. This collapses duplicate concepts like SOW and Statement of Work into a single canonical entity for downstream graph storage.

What is the best way to align BM25 retrieval with a knowledge graph without expensive topology traversal?

Align BM25 retrieval lexically by injecting synset and first-level hypernym tokens into the bm25_text field. This enables cross-entity matching via vertical lexical retrieval rather than performing expensive graph topology traversal.

How does synset disambiguation work for canonicalizing graph predicates and entities?

Synset disambiguation uses a two-stage flow of synset augmentation followed by LLM synset selection. This mechanism picks the best WordNet synsets to resolve extracted subject, predicate, and object spans into deterministic canonical node identities.

Can I keep ontology scaffolding hidden while building a Graph-RAG pipeline?

Keep ontology scaffolding hidden from the default visible graph by separating evidence and provenance from ontology winners. Debug structures like alias links and candidate senses are persisted but kept separate from the user-facing graph.

Why does my knowledge graph fragment into mismatched concepts across multiple documents?

Graphs fragment when noisy surface forms are not canonicalized into stable node identities. Resolve extracted triplets using WordNet synsets to ensure deterministic identity behavior and cross-document entity matching.

Do I need graph traversal for cross-document entity matching in Graph-RAG pipelines?

Avoid graph traversal by injecting synset and hierarchical hypernym context tokens into BM25 text. This approach handles cross-document entity matching through lexical retrieval instead of relying on complex topology queries.