Home Artificial Intelligence Harnessing the Power of Knowledge Graphs: Enriching an LLM with Structured Data

Harnessing the Power of Knowledge Graphs: Enriching an LLM with Structured Data

Harnessing the Power of Knowledge Graphs: Enriching an LLM with Structured Data

A step-by-step guide to making a knowledge graph and exploring its potential to boost an LLM

Towards Data Science

For accompanying code, see notebook here.

Lately, large language models (LLMs), have turn out to be ubiquitous. Perhaps essentially the most famous LLM is ChatGPT, which was released by OpenAI in November 2022. ChatGPT is capable of generate ideas, give personalized recommendations, understand complicated topics, act as a writing assistant, or assist you to construct a model to predict the Academy Awards. Meta has announced their very own LLM called LLaMA, Google has LaMDA, and there’s even an open-source alternative, BLOOM.

LLMs have excelled in natural language processing (NLP) tasks just like the ones listed above because LLMs have historically focused on unstructured data — data that doesn’t have a pre-defined structure, and is normally text-heavy. I asked ChatGPT, “why have LLMs historically focused on unstructured data?” The reply was:

“LLMs have historically focused on unstructured data resulting from its abundance, availability, and the challenges it poses. Unstructured data provides an enormous source for training language models, allowing them to learn patterns, context, and semantics. LLMs excel in handling the complexities and nuances of unstructured data, capturing the subtleties of language and leveraging the wealthy context, opinions, and artistic expressions it comprises. While efforts are underway to bridge the gap between LLMs and structured data, the historical emphasis on unstructured data stems from its unique characteristics and the beneficial information it offers, allowing LLMs to supply more human-like responses.”

Structured data is normally quantitative and well-organized, often into rows and columns, and, as ChatGPT notes, there continues to be a spot between LLMs and structured data.

Knowledge graphs (KG), alternatively, are excellent at querying structured data. A knowledge graph is,

“directed labeled graph by which domain specific meanings are related to nodes and edges. A node could represent any real-world entity, for instance, people, company, computer, etc. An edge label captures the connection…


Please enter your comment!
Please enter your name here