No history yet

Introduction to Knowledge Graphs

What Is a Knowledge Graph?

Think about how your brain stores information. It doesn't use neat tables with rows and columns. Instead, it creates a web of interconnected ideas. You know that Leonardo da Vinci painted the Mona Lisa, that the Mona Lisa is in the Louvre Museum, and that the Louvre is in Paris. These facts are linked together.

A knowledge graph does the same thing for computers. It's a way of representing information that focuses on the relationships between things. Instead of just storing isolated data points, it builds a network of facts that shows how everything connects.

At its core, a knowledge graph is a model of the real world, complete with its complex relationships.

This structure is made of three simple parts.

Node

noun

Represents an entity, which can be a person, place, object, or concept. In our example, 'Leonardo da Vinci' and 'Mona Lisa' are nodes.

Nodes are the main subjects of our knowledge graph.

Edge

noun

Represents the relationship between two nodes. The edge labeled 'painted' connects 'Leonardo da Vinci' to 'Mona Lisa', describing their relationship.

Edges give context to the nodes, explaining how they interact. A node can also have properties, which are extra details about that entity. For instance, the 'Leonardo da Vinci' node could have a 'birth date' property of '1452'.

Beyond Traditional Databases

For decades, most data has been stored in relational databases. Think of these as highly organized spreadsheets with strict rules. Information is sorted into tables with rows and columns. This system is powerful for handling structured, predictable data, like a list of customer transactions.

Lesson image

However, the real world is messy and interconnected. A relational database struggles to represent complex relationships. To find out which artists have paintings in museums in Paris, you would need to perform complex 'joins' across multiple tables, a process that can be slow and complicated.

Knowledge graphs excel here. Because they store relationships directly, they can navigate these connections quickly and intuitively. They are flexible and can easily grow as new information and new types of relationships are discovered.

FeatureRelational DatabaseKnowledge Graph
StructureTables (rows and columns)Network (nodes and edges)
FocusStoring data efficientlyRepresenting relationships
FlexibilityRigid schemaFlexible and evolves easily
QueryingSQL, requires joinsTraverses direct connections

Knowledge Graphs in Action

You probably interact with knowledge graphs every day without realizing it. When you search on Google, the information box that appears on the side with a summary, pictures, and key facts is powered by its Knowledge Graph. It understands that when you search for a movie, you also might want to know its cast, director, and release date.

Knowledge graphs encode real-world facts and are critical in a variety of applications and domains such as natural language understanding, recommender systems, drug discovery, and image understanding.

Other applications are widespread:

  • Recommendation Engines: Services like Netflix and Amazon suggest products or movies by analyzing a knowledge graph of your viewing history, product purchases, and how they relate to other items and users.
  • Social Networks: Platforms like LinkedIn use a graph to show you how you're connected to other professionals and recommend new connections.
  • Scientific Research: In biomedicine, researchers use knowledge graphs to map the relationships between genes, proteins, and diseases, helping to uncover new treatment possibilities.
Lesson image

By structuring information in a way that mirrors how we think, knowledge graphs allow computers to understand context, draw inferences, and uncover insights that would otherwise remain hidden in disconnected data tables. They turn data into knowledge.

Ready to test your understanding?

Quiz Questions 1/5

What is the primary way a knowledge graph represents information?

Quiz Questions 2/5

In a knowledge graph about Leonardo da Vinci, his birth date of '1452' would be considered a(n) ______ of the 'Leonardo da Vinci' ______.

Now that you understand what knowledge graphs are and why they're useful, you're ready to see how they're built.