Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Knowledge Graph Builder

БесплатноБез исполняемых скриптовНе проверен

Design and build knowledge graphs. Use when modeling complex relationships, building semantic search, or creating knowledge bases. Covers schema design…

daffy0208от daffy0208★ 39 звёзд на GitHub20 установок в других каталогах

Об этом скилле

Knowledge Graph Builder

Build structured knowledge graphs for enhanced AI system performance through relational knowledge.

Core Principle

Knowledge graphs make implicit relationships explicit, enabling AI systems to reason about connections, verify facts, and avoid hallucinations.

When to Use Knowledge Graphs

Use Knowledge Graphs When:

  • ✅ Complex entity relationships are central to your domain
  • ✅ Need to verify AI-generated facts against structured knowledge
  • ✅ Semantic search and relationship traversal required
  • ✅ Data has rich interconnections (people, organizations, products)
  • ✅ Need to answer "how are X and Y related?" queries
  • ✅ Building recommendation systems based on relationships
  • ✅ Fraud detection or pattern recognition across connected data

Don't Use Knowledge Graphs When:

  • ❌ Simple tabular data (use relational DB)
  • ❌ Purely document-based search (use RAG with vector DB)
  • ❌ No significant relationships between entities
  • ❌ Team lacks graph modeling expertise
  • ❌ Read-heavy workload with no traversal (use traditional DB)

6-Phase Knowledge Graph Implementation

Phase 1: Ontology Design

Goal: Define entities, relationships, and properties for your domain

Entity Types (Nodes):

  • Person, Organization, Location, Product, Concept, Event, Document

Relationship Types (Edges):

  • Hierarchical: IS_A, PART_OF, REPORTS_TO
  • Associative: WORKS_FOR, LOCATED_IN, AUTHORED_BY, RELATED_TO
  • Temporal: CREATED_ON, OCCURRED_BEFORE, OCCURRED_AFTER

Properties (Attributes):

  • Node properties: id, name, type, created_at, metadata
  • Edge properties: type, confidence, source, timestamp

Example Ontology:

# RDF/Turtle format
@prefix : <http://example.org/ontology#> .

:Person a owl:Class ;
    rdfs:label "Person" .

:Organization a owl:Class ;
    rdfs:label "Organization" .

:worksFor a owl:ObjectProperty ;
    rdfs:domain :Person ;
    rdfs:range :Organization ;
    rdfs:label "works for" .

Validation:

  • Entities cover all domain concepts
  • Relationships capture key connections
  • Ontology reviewed with domain experts
  • Classification hierarchy defined (is-a relationships)

Phase 2: Graph Database Selection

Decision Matrix:

Neo4j (Recommended for most):

  • Pros: Mature, Cypher query language, graph algorithms, excellent visualization
  • Cons: Licensing costs for enterprise, scaling complexity
  • Use when: Complex queries, graph algorithms, team can learn Cypher

Amazon Neptune:

  • Pros: Managed service, supports Gremlin and SPARQL, AWS integration
  • Cons: Vendor lock-in, more expensive than self-hosted
  • Use when: AWS infrastructure, need managed service, compliance requirements

ArangoDB:

  • Pros: Multi-model (graph + document + key-value), JavaScript queries
  • Cons: Smaller community, fewer graph-specific features
  • Use when: Need document DB + graph in one system

TigerGraph:

  • Pros: Best performance for deep traversals, parallel processing
  • Cons: Complex setup, higher learning curve
  • Use when: Massive graphs (billions of edges), real-time analytics

Technology Stack:

graph_database: 'Neo4j Community' # or Enterprise for production
vector_integration: 'Pinecone' # For hybrid search
embeddings: 'text-embedding-3-large' # OpenAI
etl: 'Apache Airflow' # For data pipelines

Neo4j Schema Setup:

// Create constraints for uniqueness
CREATE CONSTRAINT person_id IF NOT EXISTS
FOR (p:Person) REQUIRE p.id IS UNIQUE;

CREATE CONSTRAINT org_name IF NOT EXISTS
FOR (o:Organization) REQUIRE o.name IS UNIQUE;

// Create indexes for performance
CREATE INDEX entity_search IF NOT EXISTS
FOR (e:Entity) ON (e.name, e.type);

CREATE INDEX relationship_type IF NOT EXISTS
FOR ()-[r:RELATED_TO]-() ON (r.type, r.confidence);

Phase 3: Entity Extraction & Relationship Building

Goal: Extract entities and relationships from data sources

Data Sources:

  • Structured: Databases, APIs, CSV files
  • Unstructured: Documents, web content, text files
  • Semi-structured: JSON, XML, knowledge bases

Entity Extraction Pipeline:

class EntityExtractionPipeline:
    def __init__(self):
        self.ner_model = load_ner_model()  # spaCy, Hugging Face
        self.entity_linker = EntityLinker()
        self.deduplicator = EntityDeduplicator()

    def process_text(self, text: str) -> List[Entity]:
        # 1. Extract named entities
        entities = self.ner_model.extract(text)

        # 2. Link to existing entities (entity resolution)
        linked_entities = self.entity_linker.link(entities)

        # 3. Deduplicate and resolve conflicts
        resolved_entities = self.deduplicator.resolve(linked_entities)

        return resolved_entities

Relationship Extraction:

class RelationshipExtractor:
    def extract_relationships(self, entities: List[Entity],
                            text: str) -> List[Relationship]:
        relations
Полный SKILL.md на GitHub

Установить Knowledge Graph Builder в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdmanifest.yaml

FAQ

Что делает скилл Knowledge Graph Builder?

Design and build knowledge graphs. Use when modeling complex relationships, building semantic search, or creating knowledge bases. Covers schema design, entity relationships, and graph database selection.

Как установить скилл Knowledge Graph Builder?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Knowledge Graph Builder запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Knowledge Graph Builder с