Neo4j Nodes 2025 Conference Workshop
A hands-on workshop exploring GraphRAG — understanding not just what it is, but why it works and how each component contributes. The goal is to equip you with transferable skills and concepts you can remix for your own use cases.
GraphRAG combines knowledge graphs with retrieval-augmented generation to get better answers from language models. But GraphRAG is more than a single technique — it's an intersection of key technologies whose impact is still being discovered.
This workshop breaks down GraphRAG into its fundamental building blocks:
| Concept | What You'll Learn |
|---|---|
| Graphs | Nodes, edges, entities, and relationships |
| RAG | Retrieval Augmented Generation — putting relevant information into context |
| Semantic Search | Finding similar content through meaning, not just keywords |
| Embeddings | Converting text into numerical vectors that preserve semantic relationships |
| Cosine Similarity | Comparing vector directions in high-dimensional space |
| Structured Data Extraction | Getting structured output from unstructured text |
| Constrained Decoding | Guiding language models to produce schema-compliant responses |
| GraphRAG Pipeline | How all these pieces fit together end-to-end |
- Create a Neo4j account: Visit console.neo4j.io and sign up
- Create a free instance: Click "Create instance" in the Neo4j console
- Save your credentials: Download the credentials file when prompted
- Visit llm-graph-builder.neo4jlabs.com
- Click "Connect to Neo4j"
- Upload your credentials file or enter connection details manually
- Start exploring!
Text is converted into numerical vectors using specialized embedding models. These vectors capture semantic meaning — similar concepts end up with similar directions in vector space.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
# "The sun is shining" → 384-dimensional vector
embedding = model.encode("The sun is shining")Recommended model: all-MiniLM-L6-v2 — lightweight, fast, and effective for semantic similarity.
Language models can return structured data that fits a defined schema:
from pydantic import BaseModel
from openai import OpenAI
class CalendarEvent(BaseModel):
name: str
date: str
participants: list[str]
response = client.responses.parse(
input=[
{"role": "system", "content": "Extract the event information."},
{"role": "user", "content": "Alice and Bob are going to a science fair on Friday."},
],
text_format=CalendarEvent,
)
# → CalendarEvent(name='Science Fair', date='Friday', participants=['Alice', 'Bob'])This uses constrained decoding — the model is restricted to only generating tokens that satisfy the schema.
- Preprocessing: Extract entities and relations from documents using structured data extraction
- Embedding: Convert entities into vectors for semantic search
- Storage: Add to a graph database (Neo4j)
- Querying: Find similar entities via cosine similarity, traverse the graph for related information
- Generation: Feed retrieved context to the language model alongside the question
| Tool | Description |
|---|---|
| Microsoft GraphRAG | Widely adopted, popular implementation |
| GraphRAG Visualizer | Visualize Microsoft GraphRAG outputs |
| nano-graphrag | Small, easy to hack on |
| Neo4j GraphRAG Python | Neo4j ecosystem integration |
| LLM Graph Builder | Interactive web tool for building graphs |
Language models work best with markdown. These tools help convert documents:
| Tool | Description |
|---|---|
| Docling | IBM Research — document understanding |
| MarkItDown | Microsoft — document to markdown conversion |
- all-MiniLM-L6-v2 — 384 dimensions, fast and lightweight
- sentence-transformers — Framework for using and training embedding models
GraphRAG is a gateway technology. Each building block is valuable on its own:
- Embeddings power recommendation systems, anomaly detection, clustering, and more
- Structured extraction lets you build APIs over unstructured data
- Graph databases reveal hidden connections in any relational data
- RAG makes language models actually useful for domain-specific tasks
You don't need to adopt GraphRAG wholesale — understand the components, then remix them for your own problems.
Johan — AI/Data engineering consultant with over 15 years of building software, focused on ethical tech.
.
├── README.md # This file
├── index.html # Workshop presentation (Reveal.js)
├── CLAUDE.md # Project context and guidelines
└── deepresearch.png # Deep Research screenshot
The presentation is built with Reveal.js and includes interactive visualizations:
- Graph visualization — D3.js force-directed graph showing entities and relationships
- Vector space visualization — 2D cosine similarity demonstration
- Token probability charts — How constrained decoding works
- Dimension distance distributions — Why cosine similarity beats Euclidean distance in high dimensions
To view the slides locally, simply open index.html in a browser.
Workshop presented at Neo4j Nodes 2025 — slides available at resolveworks.github.io/nodes2025