Macklin contrasts an opaque vector representation of an apple with a knowledge graph that shows its properties and relationships, such as being red, round, and coming from a tree. She says graph connections make it possible to trace how information relates and how an agent reached a decision, which can help in regulated areas such as finance, medicine, and legal work.
RAG Needs a Map: Using GraphRAG to Retrieve Connected Context
Speaker
Nyah Macklin, senior software engineer and senior developer advocate at Neo4j, explains GraphRAG and leads a hands-on workshop at AI Engineer with colleagues Jeremy Adams-Castañeda and Ryan Knight.
In standard RAG, documents are chunked, embedded, and searched for relevant passages to send to an LLM. GraphRAG adds a knowledge graph to the retrieval path. Macklin says vector RAG can be enough for search-like questions, while multi-hop questions and tasks that combine information across documents, such as source code analysis or supply chain research, can benefit from graph traversal. She recommends combining vector and graph retrieval.
Macklin walks through turning unstructured text into a graph: gather sources, split text into chunks, generate embeddings, and use an LLM to extract entities and relationships. The workshop uses a schema of node types such as technology, concept, and process, with relationships such as “related to” and “part of.” She explains that a schema guides the LLM toward consistent node and relationship types.
Participants use GraphRAG for Python, a Neo4j Aura database, and a GitHub Codespace to build and inspect a graph from GraphAcademy course materials. Macklin configures an Aura agent with similarity search over lesson content and a natural-language-to-Cypher tool. The demo answers course questions and shows how graph queries can help with aggregation: after a rerun created duplicate lesson nodes, querying the graph showed the correct count of 15 lessons.
Takeaways
- Use vector retrieval for search-like questions and add graph traversal when answers require multiple hops.
- Combine vector similarity with graph relationships to retrieve relevant passages alongside connected context.
- Define node and relationship types to guide LLM-based graph extraction toward a consistent schema.
- Use graph queries for counts and aggregations that can be unreliable when answered from retrieved text alone.
- Inspect graph nodes and relationships to trace where an agent’s answer came from.
Mentioned in this talk
Search inside this talk
What was claimed 10
- works atNyah Macklin works at
Neo4j
Senior Developer Advocate, Artificial Intelligence“I'm a senior software engineer and senior developer advocate here at Neo4j.”
YouTube Verified2 sources· Talk, Web· archived
- ceo ofEmil Eifrem CEO of
Neo4j
CEO“Emil Eifrem: At Neo4j, we work with some of the largest companies in the world”
0:13inThinner Agents on a Smarter Substrate: The Ontology-based Semantic LayerYouTube Unverified2 sources· Talk
- usesNyah Macklin uses
GraphAcademy“Today, we're going to use a platform called GraphAcademy to proceed through this workshop.”
YouTube Unverified1 source· Talk
- feature
GraphAcademy: Free online learning platform with hands-on courses“GraphAcademy is our completely free online learning platform”
YouTube Unverified1 source· Talk
- feature
Neo4j AuraDB: Hosted cloud platform with a free instance option“This is our hosted cloud platform, and we're doing this all for free.”
YouTube Unverified1 source· Talk
- usesNyah Macklin uses
OpenAI“We do have an OpenAI API key that will give you access to build today.”
YouTube Unverified1 source· Talk
- feature
Neo4j: Supports full-text search, vector search, and text-to-Cypher retrievers
“Neo4j specifically supports full-text search, vector search, and text-to-Cypher retrievers.”
YouTube Unverified1 source· Talk
- feature
GraphRAG Python package: Open-source package for knowledge graph building, retrieval, and agentic work“for knowledge graph building and retrieval, and agentic work”
YouTube Unverified1 source· Talk










