WhoBuilt

Intro to GraphRAG

Jun 30, 2025· 1 h 19 min· 34K views·Watch on YouTube

Speaker

Zach Blumenfeld of Neo4j leads an introductory GraphRAG workshop for AI Engineer, building a talent and skills assistant with attendees.

Why put a knowledge graph in the middle

Blumenfeld describes a common GraphRAG setup that combines agents and AI models with a knowledge graph containing structured and unstructured data. Modeling domain logic in the graph can make retrieval more accurate and explainable, especially when agents break questions into multiple steps. The workshop uses a talent assistant as its example.

Build a skills graph from structured data

The first module loads a table of people, email addresses, and skills into Neo4j. The graph has Person and Skill nodes linked by KNOWS relationships, with uniqueness constraints on email and skill name to support efficient lookups. Cypher traversals can find shared skills and similar people, while Leiden community detection groups people with related skills.

Combine graph traversal and semantic similarity

Blumenfeld embeds skill descriptions so short names such as R or AWS have more context for vector search. The workshop connects semantically similar skills, then combines those links with exact skill overlaps to score person similarity. He notes that materialized similarity links need to be refreshed when the underlying data changes.

Extract entities and document structure

The second module uses Pydantic classes and an LLM to extract people and skills from résumé-like bios, then loads them into the graph. Blumenfeld also introduces modeling document sections and chunks as graph data, which can support retrieval across document hierarchies and connections to entities.

Give an agent focused retrieval tools

The final module builds a LangGraph ReAct agent with four tools: retrieve a person's skills, find similar skills, find people with similar skills, and recommend people from a skill list. The agent selects tools for questions such as finding Kristoff's skills or skills similar to Power BI. An annotated graph schema can also guide text-to-Cypher generation.

Takeaways

  • Start with a small graph model that reflects the domain in natural language, such as Person knows Skill.
  • Add uniqueness constraints for identifiers used in frequent lookups and merges.
  • Combine exact graph relationships with vector similarity when the use case needs both precise matches and related concepts.
  • Materialized similarity relationships can speed repeated retrieval, but refresh them when source data changes.
  • Give agents focused retrieval tools and schema annotations for more controlled graph queries.

Mentioned in this talk

Search inside this talk

What was claimed 7

Related talks