Lab 16: Knowledge Graph + LLM
Overview
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Knowledge Graph + LLM Architecture │
├──────────────────────────────────────────────────────────────┤
│ TEXT CORPUS → NLP Pipeline │
│ ├── NER: Entity extraction (Person, Org, Location, Event) │
│ ├── RE: Relation extraction (works_at, located_in) │
│ └── Coreference resolution (he/she/it → entity) │
├──────────────────────────────────────────────────────────────┤
│ KNOWLEDGE GRAPH (Neo4j / RDF Store) │
│ Nodes: entities | Edges: relations | Properties: attributes │
├──────────────────────────────────────────────────────────────┤
│ QUERY: Natural language → Cypher/SPARQL → Graph results │
│ ↓ retrieved subgraph │
│ LLM → structured answer with citations │
└──────────────────────────────────────────────────────────────┘Step 1: Why Knowledge Graphs for LLMs?
Dimension
Vector DB RAG
Knowledge Graph RAG
Step 2: Entity and Relation Extraction
Category
Examples
NLP Labels
Step 3: Neo4j and Cypher Query Language
Step 4: SPARQL Basics
Step 5: GraphRAG (Microsoft)
Step 6: KG-Augmented Generation Patterns
Step 7: Enterprise KG Use Cases
Step 8: Capstone — Threat Intel KG Traversal
Summary
Concept
Key Points
Last updated
