A knowledge graph is a structured representation of real-world entities and the relationships between them, stored in a way that makes both the data and its meaning queryable. Unlike a relational database, which organises data into tables with fixed schemas, a knowledge graph places relationships on equal footing with entities — a relationship is not just a foreign-key join but a first-class object with its own identity, direction, type, and properties. Neo4j’s native property graph model is purpose-built for this kind of interconnected data, and it underpins every session of Going Meta.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jbarrasa/goingmeta/llms.txt
Use this file to discover all available pages before exploring further.
The Property Graph Model
Neo4j stores data as a labelled property graph with four core primitives:Nodes
Represent entities — people, organisations, concepts, documents, events. A node can have one or more labels (e.g.
Person, Article, Concept) and a map of properties (key-value pairs).Relationships
Connect two nodes and are always directed (from a start node to an end node). Every relationship has a type (e.g.
KNOWS, refers_to, broader) and can also carry properties.Properties
Key-value attributes on both nodes and relationships. Values can be strings, numbers, booleans, dates, or arrays. Properties store the descriptive data about an entity or connection.
Labels & Types
Labels classify nodes into categories; relationship types classify connections. Both are used for pattern matching in Cypher queries and index creation.
Creating a Simple Knowledge Graph with Cypher
Cypher is Neo4j’s declarative query language. It uses an ASCII-art syntax where nodes are written as() and relationships as -->. The following example creates a minimal knowledge graph of articles and their conceptual topics — the same pattern used in Going Meta Session 2.
The
[:broader*1..] syntax means “follow one or more broader relationships”. This kind of variable-length path query is trivial in Cypher but requires recursive CTEs or CONNECT BY clauses in SQL — a concrete illustration of why graph databases suit hierarchical and network data.Knowledge Graphs vs. Relational Databases
| Dimension | Relational Database | Knowledge Graph (Neo4j) |
|---|---|---|
| Data model | Tables, rows, columns | Nodes, relationships, properties |
| Schema | Fixed, pre-defined | Flexible, schema-optional |
| Relationships | Foreign-key joins (expensive at scale) | First-class traversals (O(1) per hop) |
| Semantics | Implicit in column names | Explicit in labels, types, ontologies |
| Query language | SQL | Cypher (also SPARQL via n10s) |
| Multi-hop queries | Complex nested joins | Natural variable-length paths |
How Going Meta Builds Knowledge Graphs
The series demonstrates multiple strategies for populating a knowledge graph, each suited to different data sources:- LOAD CSV (structured data)
- RDF / n10s (semantic data)
- LLM extraction (unstructured text)
Session 2 starts by loading articles from a CSV file into Neo4j, then enriching them with concept nodes imported from a SKOS taxonomy:
The Role of Knowledge Graphs in GenAI
A knowledge graph acts as a structured, curated memory for an LLM application. Rather than retrieving semantically similar text chunks (pure vector RAG), a GraphRAG system can:- Follow explicit relationship paths to find precise facts
- Use ontology class hierarchies to broaden or narrow queries
- Combine structured Cypher traversals with vector similarity in a single query
- Provide the LLM with a concise, factually grounded context window