In simple words, knowledge graphs are way to represent the relationship between things. Or A knowledge graph formally represents semantics by describing entities and their relationships. Or it is a way of representing data.

Knowledge Graph as every graph have nodes which represent the entities and edges which represent the relationship between entities. Knowledge Graphs can integrate structured and unstructured data.

For example: In the following sentence, Human needs sleep, the relationship between Human and sleep is needs. human and sleep are entities which are connected by the relationship sleep.

image.png

Knowledge Graphs are around for a long time now. Page rank algorithm used by Google from 2000-2012 was a knowledge graph. Then later google officially introduced Knowledge Graph in a blog post and adapt them in google search.

Introducing the Knowledge Graph: things, not strings

How Knowledge Graph works?

Working of Knowledge Graph is very simple. They extract data from various data sources(structured + unstructured data) and normalize that into a common format. How?Schemas(entities and relationships), identities and context work together to provide structure to diverse data. Schemas provide the framework for the knowledge graph, identities classify the underlying nodes appropriately, and the context determines the setting in which that knowledge exists. These components help distinguish words with multiple meanings.

This allows products, like Google’s search engine algorithm, to determine the difference between Apple, the brand, and apple, the fruit.(credit: IBM)

In machine learning Knowledge Graphs are used as a graph input to GNN, as features but that is outside of the scope of this blog.

Use Cases of Knowledge Graphs:

  1. Search engines are the biggest use case of Knowledge Graphs. They are use in the backend to represent structured and unstructured data. For example, in the image, we can see the side panel about Moscone center. Google represent the unstructured data(from wikipedia) such as Address, parking as structured data in the backend and show it to the user.
  2. Recommendation System: Understand how items or users are connected.

image.png

I just give two use case of Knowledge Graphs but there are lot more use cases of Knowledge Graphs in different sectors. One of the most important use case of Knowledge Graph in today’s world is GraphRAG which I’ll discuss next.