Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PearsonOLT_GraphRAGFundamentals_Oct2025.pdf

 PearsonOLT_GraphRAGFundamentals_Oct2025.pdf

In this fast-paced technology industry, it is easy to feel overwhelmed by the amount of learning needed to simply keep up. Start with basic concepts of the AI industry, and then dive into technologies that support the incredible speed and developments in this space from the Java perspective. Vectors, RAG, GraphRAG, agents, MCP, and whatever comes next fit together as puzzle pieces … all you have to know is when and how to use them.
These concepts are not as complex as they seem, and once you learn the foundations, everything else (including new developments) builds on top of those blocks. This course will help you learn the terminology, see how it works through live demos, and then get hands-on experience with specific tools for building GenAI apps. We will cover vectors, RAG, and GraphRAG in detail, as well as highlight recent trends and developments in the space. Get caught up on the GenAI industry and open opportunities for deeper exploration, innovation, and just-right solutions!
Code: https://github.com/JMHReif/graphrag-fundamentals

Avatar for Jennifer Reif

Jennifer Reif

October 21, 2025
Tweet

More Decks by Jennifer Reif

Other Decks in Technology

Transcript

  1. Click to edit Master title style GraphRAG Fundamentals Improve Your

    GenAI Solutions with Connected Data Jennifer Reif Neo4j Developer Advocate, Java
  2. POLL! How familiar are you with graph databases? Select one.

    • Very familiar • Somewhat familiar • A little familiar • Not at all familiar • What is a graph database?
  3. About Jennifer Developer advocate, Neo4j • Java champion • Tech

    speaker/blogger/podcaster/author • Website+Blog: jmhreif.com • Github: github.com/JMHReif • Email: [email protected] • LinkedIn: linkedin.com/in/jmhreif • X: x.com/JMHReif
  4. Outline and Resources • Notes: bit.ly/jmhreifPearson • Outline: • Graph

    databases + Java apps • GenAI + RAG + GraphRAG • Building GraphRAG solutions Notes: bit.ly/jmhreifPearson
  5. Layers …of systems with GenAI • More layers = better

    result • Complexity vs value Notes: bit.ly/jmhreifPearson
  6. Layers of systems Today’s step-by-step Traditional systems neo4j Vector search

    / naive RAG GraphRAG Agents / MCP Notes: bit.ly/jmhreifPearson
  7. Skill Degree Company Jennifer Priya School ATTENDED ATTENDED W ORKED_FOR

    WORKED_FOR H AS_SKILL COM PLETED Degree COM PLETED HAS_SKILL Social network Explicit links
  8. Dominic Skill Company Jennifer Priya School ATTENDED ATTENDED W ORKED_FOR

    WORKED_FOR H AS_SKILL HAS_SKILL Degree C O M PLETED COM PLETED Degree HAS_SKILL Social network Explicit links COM PLETED
  9. Person Company Person Person School ATTENDED ATTENDED W ORKED_FOR WORKED_FOR

    Degree C O M PLETED COM PLETED Work, Inc. Priya Jennifer Hire Me U CMIS Dominic Degree HAS_SKILL Skill H AS_SKILL HAS_SKILL Java CS Social network Explicit links COM PLETED
  10. What is a graph? Answers through relationships • How many

    coworkers shared skills/degrees? • Who is within 2 connections of me and knows Neo4j? • Who adds new skills? • Who might be a good fi t for this project? Edward Jones Adrian Person Company Person Person School ATTENDED ATTENDED W ORKED_FOR WORKED_FOR Degree C O M PLETED COM PLETED Priya Jennifer CMIS Degree HAS_SKILL Skill H AS_SKILL HAS_SKILL Java CS Dominic Work, Inc. Hire Me U COM PLETED
  11. Skill Skill Skill School School Degree Degree Company Company Company

    Company Person Person Person Person Person Person Person Person Person Company Person Work, Inc. Priya Dominic Degree Degree CMIS Skill Java CS Non-graph social network Implicit links Person Jennifer School Hire Me U
  12. Nodes (vertices) Objects or entities • Still have entities •

    Flexible schema • Retain uniqueness Person Skill Company Person Person School Degree Priya Jennifer CMIS Java Degree CS Dominic Work, Inc. Hire Me U Username: jmhreif
  13. Relationships (edges) Connect entities • Equal importance • Paved path

    > cutting trail • Links already there Person Company Person Person School ATTENDED ATTENDED W ORKED_FOR WORKED_FOR Degree C O M PLETED COM PLETED Priya Jennifer CMIS Skill Java Degree CS Dominic Work, Inc. Hire Me U HAS_SKILL H AS_SKILL HAS_SKILL COM PLETED
  14. Beyond social networks Everywhere there are connections Supply chain Cybersecurity

    Routes, bottlenecks Access, activity Notes: bit.ly/jmhreifPearson
  15. Beyond social networks Everywhere there are connections Recommendations Preferences, next

    thing Fraud detection Suspicious transactions, rings Notes: bit.ly/jmhreifPearson
  16. Graphs add context and meaning Not just point-to-point, but HOW

    they connect Notes: bit.ly/jmhreifPearson
  17. One model to rule them all… Conceptual = Logical =

    Physical data model Notes: bit.ly/jmhreifPearson
  18. One model to rule them all… Conceptual = Logical =

    Physical data model Notes: bit.ly/jmhreifPearson
  19. Cypher / GQL Graph query language • Functional and visual

    • Based on ASCII art • Declarative • Focus on patterns A B LIKES MATCH (A)-[:LIKES]->(B) Notes: bit.ly/jmhreifPearson
  20. Cypher: write All about patterns TechCrunch Neo4j MENTIONS MERGE (:Article

    { site: ‘TechCrunch’}) -[:MENTIONS]-> (:Company { name: ‘Neo4j’}) NODE PROPERTY NODE PROPERTY LABEL LABEL Notes: bit.ly/jmhreifPearson
  21. Cypher: read All about patterns TechCrunch Neo4j MENTIONS MATCH (:Article

    { site: ‘TechCrunch’} ) -[:MENTIONS]-> ( whom ) RETURN whom Notes: bit.ly/jmhreifPearson
  22. A knowledge graph is a specific implementation of a graph

    database, where information is integrated from many different sources, representing the inherent knowledge of a particular domain. Notes: bit.ly/jmhreifPearson
  23. Layers of systems Today’s step-by-step Traditional systems neo4j Vector search

    / naive RAG GraphRAG Agents / MCP + neo4j Notes: bit.ly/jmhreifPearson
  24. POLL! How are you using GenAI? Select all that apply.

    • At work for business • At school in classes or research • For personal life - organizing, planning, decision-making, help • For learning - whether business, school, or personal • Not using GenAI at all
  25. What is GenAI? Generative Arti fi cial Intelligence • Generating

    data in response to prompts • Learns patterns from training data • Generates new data with similar characteristics • Natural language response • Use cases: professional, personal, everything! Notes: bit.ly/jmhreifPearson
  26. How do hallucinations happen? LLM limitations • Lacking recent data

    • Too broad / general search • Not enough context • Uncertainty Notes: bit.ly/jmhreifPearson
  27. Adding context to the LLM What does it do? •

    Guides it • Focuses / narrows search area • Adds to LLM knowledge • Reduces margin of error Notes: bit.ly/jmhreifPearson
  28. RAG Pull data from external source • Retrieval • Data

    retrieved from external source • Augmented • Augments response with facts • Generation • Response in natural language Notes: bit.ly/jmhreifPearson
  29. Types of context Search beyond keyword? • Databases (all kinds)

    • Documents/folders • Media (music/images/video) • Charts (reports/visuals) Notes: bit.ly/jmhreifPearson
  30. Embeddings / Vectors • Data -> array of fl oating

    point numbers • Captures meaning and how it’s used • Comparable format! Convert data to a point in space Notes: bit.ly/jmhreifPearson
  31. Vectors in the technical realm Kings and Queens king −

    man + woman ≈ queen king man wom an 1 king man wom an 2 queen? 3 Notes: bit.ly/jmhreifPearson
  32. Searching the data • Vectors -> semantic similarity • Proximity

    in vector space • Example: Library • Book classi fi cation - genre vs location of plot • More speci fi c + more relevant! Photo by Martin Adams on Unsplash …e ffi ciently Notes: bit.ly/jmhreifPearson
  33. Benefits With RAG + LLM • Guide probability with context

    (grounding) • Focuses / narrows probability area • Adds to LLM knowledge • Reduce margin of error • How did the LLM get this answer? Photo by No Revisions on Unsplash Notes: bit.ly/jmhreifPearson
  34. Where do vectors fall flat? How do you… • Limited

    metadata / connections • Verify vector representations? • Explain how it got to answer? • Similar not always highest relevance? Notes: bit.ly/jmhreifPearson
  35. Layers of systems Today’s step-by-step Traditional systems neo4j Vector search

    / naive RAG GraphRAG Agents / MCP + neo4j + neo4j Notes: bit.ly/jmhreifPearson
  36. Graphs -> how/why connections Analyze data from relationships • Relationships

    + entities • Designed for storing / navigating networks • Traceable • Explainable Notes: bit.ly/jmhreifPearson
  37. Graphs connect the dots Structured + Unstructured • Flexible schema

    = natural fi t • Document connections, paths, etc • Connect varying data structures Structured Unstructured Chunk Article Organization Industry Person City Country Notes: bit.ly/jmhreifPearson
  38. GraphRAG Graph as data source • Accuracy: extra context /

    related connections • Veri fi ability: check against understandable format • Explainability: trace path through graph for answer Notes: bit.ly/jmhreifPearson
  39. Considerations • Frameworks • Data extraction - unstructured vs structured

    • Retrieval strategies • Testing models, prompts, solutions, evals, etc Notes: bit.ly/jmhreifPearson
  40. Framework choices 1.0 and beyond! • Spring AI (project within

    Spring framework) • Langchain4j (project supported by community+vendors) • MCP can integrate solutions across frameworks
  41. “Unstructured” data Is it though? • Might be unstructured in

    appearance, length, styling • Structure is there! • Less obvious + consistent • Structure: • Themes • Moments • Stories
  42. Graph retrieval example Superhero story/movie/comic/etc • Text = “Superhero saves

    citizens and defeats villain” • Search = “Which villains does Captain America defeat?” • Vector retrieval: • Any superheroes defeating villain (similarity) • Non-comic related examples of villains • Graph retrieval: • Superhero:Captain America - DEFEATS -> Villain Notes: bit.ly/jmhreifPearson
  43. Hybrid retrieval example Superhero story/movie/comic/etc • Text = “Superhero saves

    citizens and defeats villain” • Search = “Which superheroes defeat villains?” • Vector retrieval: • Generic -> speci fi c • Graph retrieval: • Additional context on superhero details, networks, etc Notes: bit.ly/jmhreifPearson
  44. Align retrieval strategy Vector, graph, hybrid, agents? • Determine questions

    • Match retrieval strategy • Iterate! Notes: bit.ly/jmhreifPearson
  45. Layers of systems Today’s step-by-step Traditional systems neo4j Vector search

    / naive RAG GraphRAG Agents / MCP + neo4j + neo4j + neo4j Notes: bit.ly/jmhreifPearson
  46. What is an agent? Software system using AI • What

    it does: • Evaluate -> sense environment, make decisions, take actions • Respond -> break down tasks/goal, execute tools, adapt to feedback • Work fl ows -> Autonomous system Notes: bit.ly/jmhreifPearson
  47. What is MCP? Open standard • AI interact with sources,

    tools, and services • Modular, consistent access • Metaphors: • Universal adapter for AI • MCP server: microservice • Tool options: kids’ snacks • Vendor MCP servers: Docker containers Notes: bit.ly/jmhreifPearson
  48. POLL! Which tech from this course are you most excited

    about? Select one. • Graph databases • LLMs and GenAI • RAG and/or GraphRAG • Agents • MCP • Something else • All the above
  49. Resources • Code: github.com/JMHReif/graphrag-fundamentals • GraphAcademy LLM courses: graphacademy.neo4j.com/knowledge-graph-rag •

    NODES 2025: neo4j.com/nodes • Knowledge graph ebook: dev.neo4j.com/jmhreif-kg-ebook Jennifer Reif [email protected] @JMHReif github.com/JMHReif jmhreif.com linkedin.com/in/jmhreif Notes: bit.ly/jmhreifPearson