What are Knowledge Graphs?

Learn how knowledge graphs model entities and relationships as nodes and edges, traverse them with multi-hop queries, and when to reach for a graph instead of a relational or vector database.

Day 3 Progress0%

What is a Knowledge Graph?

A knowledge graph is a structured representation of real-world entities and the relationships between them. Instead of rows in tables, a knowledge graph stores facts as a network of nodes and edges.

The Three Building Blocks

  1. Nodes (entities): The things you care about — people, products, places, concepts
  2. Edges (relationships): How entities relate — works_at, invented, located_in
  3. Properties: Attributes attached to nodes or edges — names, dates, scores

Real-World Examples

  • Google's Knowledge Graph powers the info panels on search results — billions of entities and relationships about people, places, and things.
  • Wikidata is an open, community-maintained KG with over 100 million items.
  • Facebook's Social Graph models users, friendships, pages, and interests.
  • Pharmaceutical KGs link drugs, proteins, diseases, and clinical trials to accelerate discovery.

Why Graphs Instead of Tables?

Relational databases excel at structured, uniform data. But the real world is messy and relationship-heavy. In a KG:

  • Adding a new relationship type doesn't require a schema migration
  • Multi-hop questions ("friends of friends who like jazz") are first-class operations
  • The graph itself is the data — relationships are explicit and queryable
Key Takeaways
  • Knowledge graphs store entities and relationships as nodes and edges
  • Graphs make relationship-heavy queries fast and natural
  • Real-world KGs power search, recommendations, and AI grounding

AI Learning Assistant

Powered by advanced LLM

Get personalized help with knowledge graph concepts, modeling, and query strategies.

Course Stats

Estimated Time
60 min
Lessons
5 sections