
What is a Knowledge Graph?
A knowledge graph is a structured representation of real-world entities and the relationships between them, stored as a network of nodes (entities) and edges (relationships). It organizes information in a way that machines can reason over β connecting people, places, concepts, products, and events into a queryable web of knowledge.
Why It Matters
Knowledge graphs power Google's Knowledge Panel (those info boxes in search results), Amazon's product recommendations, and enterprise search systems. In AI, they provide structured context that complements LLMs β enabling more accurate, factual, and explainable responses. Combining knowledge graphs with LLMs (GraphRAG) is an active research frontier for reducing hallucinations.
How It Works
Structure:
- Nodes (entities) β people, organizations, concepts, products, locations
- Edges (relationships) β "works_at", "located_in", "is_a", "related_to"
- Properties β attributes attached to nodes and edges (dates, descriptions, scores)
- Stored as triples: (subject, predicate, object) β (Albert Einstein, born_in, Ulm)
Building a knowledge graph:
- Entity extraction β identify entities in text (NER β named entity recognition)
- β identify relationships between entities