← Back
AI Engineer October 11, 2026 52m

RAG Needs a Map: Using GraphRAG to Retrieve Connected Context — Nyah Macklin, Neo4j

Not yet indexed — Search & Ask will be available once this episode finishes processing.

Read full transcript 41 segments
  1. Hello everyone. Hello everyone. Thank you very much for stopping by Thank you very much for stopping by Thank you very much for stopping by today, and today, and today, and welcome to rag. welcome to rag. welcome to rag. Need a map Need a map Need a map using graph rag to using graph rag to using graph rag to get the get the get the associated associated associated context. So before context. So before context. So before we start we start we start today, and I know there today, and I know there today, and I know there are people who are are people who are are people who are adding little by little, but before adding little by little, but before adding little by little, but before we start we start we start today, I just today, I just today, I just want to do want to do want to do a little survey a little survey a little survey to see who is already to see who is already to see who is already using rag in using rag in using rag in their pipelines, a their pipelines, a their pipelines, a regular vector regular vector regular vector base rag. Okay, cool. base rag. Okay, cool. base rag. Okay, cool. Perfectly. Are there people who are Perfectly. Are there people who are Perfectly. Are there people who are already using already using already using graph base rag in their graph base rag in their graph base rag in their pipelines? OK. pipelines? OK. Of course. Still Of course. Still working this out. So, I working this out. So, I working this out. So, I only see a few only see a few only see a few people, and for those who are people, and for those who are people, and for those who are already using graph already using graph already using graph base rag in their base rag in their base rag in their pipelines, could pipelines, could pipelines, could you please explain you please explain you please explain what graph rag is? Several what graph rag is? Several what graph rag is? Several types. Okay, people like that types. Okay, people like that types. Okay, people like that . This is completely . This is completely . This is completely normal. Hmm, what we're normal. Hmm, what we're normal. Hmm, what we're going to do going to do going to do is for those who are is for those who are is for those who are new to this new to this new to this concept, um, it's going to be concept, um, it's going to be concept, um, it's going to be kind of a kind of a kind of a one-on-one one-on-one one-on-one conversation about graph rag, um. conversation about graph rag, um. conversation about graph rag, um. So, if you're already an So, if you're already an So, if you're already an expert, then you already expert, then you already expert, then you already know what we're know what we're know what we're talking about so you talking about so you talking about so you can, um, set the can, um, set the can, um, set the level, but, um, in level, but, um, in level, but, um, in general, I want to general, I want to general, I want to make sure that people make sure that people make sure that people know what we're going to know what we're going to talk about today. So, talk about today. So, to briefly to briefly to briefly introduce myself, my name is introduce myself, my name is introduce myself, my name is Nye McLean, and I'm a Nye McLean, and I'm a Nye McLean, and I'm a Senior Senior Software Engineer and Senior Software Engineer and Senior Software Engineer and Senior Developer Advocate Developer Advocate Developer Advocate here at Neo4j. My here at Neo4j. My here at Neo4j. My research research research focuses on focuses on focuses on graph theory, graph theory, graph theory, graph algorithms, and graph algorithms, and graph algorithms, and also, um, also, um, also, um, context context context engineering, engineering, engineering, trying trying trying to understand, um, the to understand, um, the to understand, um, the multiple architectures multiple architectures that exist, um, for that exist, um, for that exist, um, for building agents, and building agents, and building agents, and also which also which also which architectures are best architectures are best architectures are best suited to suited to suited to uncovering this

  2. uncovering this uncovering this black black black box phenomenon, um, to be box phenomenon, um, to be box phenomenon, um, to be able to decipher, able to decipher, able to decipher, track, and track, and track, and explain how explain how explain how AI systems work AI systems work AI systems work . So I, um, . So I, um, . So I, um, spend a lot of time spend a lot of time spend a lot of time thinking about the thinking about the thinking about the governance and governance and governance and security of AI, which also security of AI, which also security of AI, which also turns out to be very turns out to be very turns out to be very important when, um, important when, um, important when, um, you think about how your you think about how your you think about how your agent makes agent makes agent makes decisions and how your decisions and how your decisions and how your agent is built. agent is built. agent is built. But I've been doing this But I've been doing this But I've been doing this work for about work for about work for about ten years now, and I'm ten years now, and I'm ten years now, and I'm happy to invite you happy to invite you happy to invite you all to go back to all to go back to all to go back to basics and try to basics and try to basics and try to understand what a understand what a understand what a graph horn is. So this is a graph horn is. So this is a graph horn is. So this is a " " Graphic Horn 101" type seminar for Graphic Horn 101" type seminar for Graphic Horn 101" type seminar for those who are new to this those who are new to this those who are new to this concept. I'm joined today by concept. I'm joined today by two incredible two incredible team members, as well team members, as well team members, as well as another as another as another team member. I have my team member. I have my team member. I have my colleague Jeremy Adams colleague Jeremy Adams colleague Jeremy Adams Castañeda up Castañeda up Castañeda up front here. Jeremy front here. Jeremy front here. Jeremy waves to everyone. If you waves to everyone. If you waves to everyone. If you have any questions, have any questions, have any questions, please contact please contact please contact Jeremy. I also Jeremy. I also Jeremy. I also have my colleague Ryan have my colleague Ryan have my colleague Ryan Knight, who I think is here somewhere Knight, who I think is here somewhere Knight, who I think is here somewhere . Oh, great. . Oh, great. . Oh, great. Hello, Ryan. Nice to Hello, Ryan. Nice to Hello, Ryan. Nice to see you. Ryan will see you. Ryan will see you. Ryan will be joining me, be joining me, be joining me, and I also have a and I also have a and I also have a special guest, the special guest, the special guest, the speaker from the previous speaker from the previous speaker from the previous session. Zach, who is session. Zach, who is session. Zach, who is behind. He is an behind. He is an behind. He is an incredible incredible AI research engineer from the AI research engineer from the Neo4j team. He is also here to Neo4j team. He is also here to Neo4j team. He is also here to join us and join us and join us and help with any help with any questions you may have. So if questions you may have. So if you have any questions you have any questions , just raise your , just raise your , just raise your hand during the seminar hand during the seminar , and one of my colleagues , and one of my colleagues , and one of my colleagues will join you will join you will join you at your table and at your table and at your table and help you help you help you figure it out.

  3. figure it out. So just a few So just a few notes on notes on notes on organization before organization before organization before we get started. Today we get started. Today we get started. Today we will be we will be we will be using a using a using a platform called platform called platform called Graph Academy to take Graph Academy to take Graph Academy to take this workshop. Has anyone this workshop. Has anyone this workshop. Has anyone signed up or signed up or signed up or used Graph Academy used Graph Academy used Graph Academy before, or even before, or even before, or even heard of Graph Academy? Okay heard of Graph Academy? Okay , not at all. This is great. , not at all. This is great. , not at all. This is great. So, Graph Academy is our So, Graph Academy is our So, Graph Academy is our completely free completely free completely free and forever and forever and forever free online free online learning platform learning platform learning platform where you can where you can where you can learn about all the learn about all the learn about all the concepts I'm going to concepts I'm going to concepts I'm going to talk about today. talk about today. talk about today. It will guide you It will guide you It will guide you through creating through creating through creating agents. She'll walk agents. She'll walk agents. She'll walk you through the study of you through the study of you through the study of agent memory, about agent memory, about agent memory, about context graphs, context graphs, context graphs, if you've all heard that if you've all heard that if you've all heard that phrase. There are many phrase. There are many phrase. There are many different free different free different free online courses that are online courses that are online courses that are fully accessible. These are fully accessible. These are fully accessible. These are not courses where you can not courses where you can not courses where you can sit back sit back sit back and listen to the lecturer or and listen to the lecturer or and listen to the lecturer or talk. These are talk. These are talk. These are practical courses of the type of practical courses of the type of practical courses of the type of construction construction construction using the keyboard using the keyboard . So, that's the main . So, that's the main . So, that's the main goal of Graph Academy, and it's an goal of Graph Academy, and it's an goal of Graph Academy, and it's an absolutely wonderful absolutely wonderful absolutely wonderful resource that you resource that you resource that you can can can use use use again absolutely again absolutely again absolutely free of charge at free of charge at any time. So, we're any time. So, we're any time. So, we're going to going to going to use this use this use this today, and what I want today, and what I want today, and what I want you all to do you all to do you all to do to get started is that to get started is that to get started is that since we're since we're since we're using Graph using Graph using Graph Academy, I want you to Academy, I want you to Academy, I want you to create a create a create a Graph Graph Graph Academy account for me. And it should be a Academy account for me. And it should be a Academy account for me. And it should be a quick process. You quick process. You quick process. You will be taken to will be taken to will be taken to graphacademy.neo4j.com and then you graphacademy.neo4j.com and then you graphacademy.neo4j.com and then you can start can start can start creating this creating this creating this account. And account. And account. And again, these are again, these are again, these are free resources.

  4. free resources. free resources. You can take this and You can take this and You can take this and use it, um, use it, um, use it, um, during your time during your time during your time here at AI Engineer, or as you here at AI Engineer, or as you here at AI Engineer, or as you further further further explore Graph and Rag. explore Graph and Rag. explore Graph and Rag. I also have I also have I also have links here to all the links here to all the links here to all the links we'll links we'll links we'll be talking about be talking about be talking about today. All, um, all the today. All, um, all the today. All, um, all the notes we have. I notes we have. I notes we have. I will also be able to will also be able to will also be able to present to you all the present to you all the present to you all the slides from this deck at the end. slides from this deck at the end. Um, but, um, you Um, but, um, you go to go to go to dev.neo4j.com/workshops-genai-notes, and dev.neo4j.com/workshops-genai-notes, and dev.neo4j.com/workshops-genai-notes, and all the information you need is there all the information you need is there all the information you need is there . I'll . I'll . I'll get to that now. And you'll get to that now. And you'll get to that now. And you'll see that if I see that if I see that if I can, I always can, I always can, I always have to fight have to fight have to fight these things. So these things. So these things. So you'll see here, here's the you'll see here, here's the you'll see here, here's the document that you'll document that you'll document that you'll go to if you go to if you go to if you click this click this click this link, notes in the link, notes in the link, notes in the toolbar. toolbar. toolbar. So, here are some So, here are some So, here are some links you will links you will links you will see after see after see after signing up on signing up on signing up on graphacademy.com. I also graphacademy.com. I also graphacademy.com. I also want you to create a want you to create a want you to create a Neo4j Aura instance. This is Neo4j Aura instance. This is Neo4j Aura instance. This is our hosted our hosted our hosted cloud platform. We cloud platform. We cloud platform. We do all of this do all of this do all of this for free, so for free, so for free, so please don't please don't please don't click on click on click on instances you instances you instances you pay for. I want pay for. I want pay for. I want you to click on the you to click on the you to click on the free free free copy. And again copy. And again copy. And again , remember that , remember that , remember that we try to we try to we try to do all of this for do all of this for do all of this for free.

  5. free. free. Click on the Click on the Click on the free free free copy. If you copy. If you copy. If you want more, want more, want more, ahem, more ahem, more ahem, more tools in tools in tools in the future, you the future, you the future, you can feel free to can feel free to can feel free to click on the click on the click on the pro pro pro version or version or version or something. But, um, we'll something. But, um, we'll something. But, um, we'll create a create a create a free free free instance, and that will instance, and that will instance, and that will allow you allow you allow you to connect to what to connect to what to connect to what we're we're we're going to look at today, or going to look at today, or going to look at today, or to the agents. So to the agents. So to the agents. So we create agents on the we create agents on the we create agents on the Aura platform. But you Aura platform. But you Aura platform. But you can see here. can see here. can see here. Now I know people Now I know people Now I know people love a good love a good love a good free API key. free API key. free API key. Don't worry, I haven't Don't worry, I haven't Don't worry, I haven't disclosed disclosed disclosed my API key here, but we my API key here, but we my API key here, but we have a public AI API key have a public AI API key that will give you that will give you access to the build access to the build access to the build today. So we today. So we today. So we wanted to make it wanted to make it wanted to make it as simple as possible for as simple as possible for as simple as possible for you all and you all and you all and as easy as possible as easy as possible as easy as possible to get started. Therefore, we to get started. Therefore, we to get started. Therefore, we provide you with a provide you with a provide you with a free API key free API key free API key that you can that you can that you can use for use for use for building, but we have building, but we have building, but we have limitations on this. You limitations on this. You limitations on this. You cannot simply cannot simply cannot simply run " run " load account", load account", load account", but please but please but please copy this API key copy this API key copy this API key or save it to or save it to or save it to your computer. your computer. your computer. Again, it will be Again, it will be Again, it will be here in this here in this here in this document when you document when you document when you view it view it so you can so you can access it later. But I access it later. But I just wanted to just wanted to just wanted to show you this show you this show you this document. There are a few document. There are a few document. There are a few different ways to different ways to different ways to get started with Neo4j, get started with Neo4j, get started with Neo4j, but that's okay. So but that's okay. So but that's okay. So while you're all working while you're all working while you're all working on getting these on getting these on getting these instances up and running and instances up and running and instances up and running and creating these creating these creating these accounts, we're accounts, we're accounts, we're just going to start with just going to start with just going to start with some of the stuff some of the stuff some of the stuff that we're going to that we're going to that we're going to talk about today. And talk about today. And talk about today. And I'll just give you a I'll just give you a I'll just give you a quick introduction, and quick introduction, and quick introduction, and then we'll actually then we'll actually then we'll actually dive into what

  6. dive into what dive into what we're going to talk about we're going to talk about we're going to talk about at Graph Academy. So, first of all at Graph Academy. So, first of all , and this is something that , and this is something that , and this is something that many of you have already many of you have already many of you have already heard about, because you are already heard about, because you are already heard about, because you are already working with rag and with the working with rag and with the working with rag and with the rag vector base. rag vector base. But to overcome the But to overcome the black black black box problem of AI, right box problem of AI, right ? We often need ? We often need ? We often need the knowledge itself and the the knowledge itself and the the knowledge itself and the data itself to be data itself to be data itself to be transparent. So we transparent. So we transparent. So we see here the human see here the human see here the human idea of ​​an apple, idea of ​​an apple, idea of ​​an apple, right? In the center. And right? In the center. And right? In the center. And then we also have on then we also have on then we also have on the right a the right a the right a vectorized vectorized vectorized representation of an apple. representation of an apple. representation of an apple. So for the So for the So for the vectorized vectorized vectorized representation of an apple, representation of an apple, representation of an apple, you see a you see a you see a sequence of numbers here, sequence of numbers here, sequence of numbers here, right? These are, uh, right? These are, uh, right? These are, uh, floating floating floating point numbers, for those of you who point numbers, for those of you who point numbers, for those of you who are engineers yourself. Uh, are engineers yourself. Uh, are engineers yourself. Uh, but these are not necessarily but these are not necessarily human-readable, uh , vectors. If you , vectors. If you , vectors. If you yourself have not memorized the yourself have not memorized the yourself have not memorized the vector representation vector representation vector representation of an apple. Uh, but of an apple. Uh, but of an apple. Uh, but each individual object each individual object each individual object can be represented as a can be represented as a can be represented as a vector or as the vector or as the vector or as the data itself. Uh, but every data itself. Uh, but every data itself. Uh, but every single object that single object that single object that exists on Earth can be exists on Earth can be exists on Earth can be represented here. But represented here. But represented here. But then, on the left, we then, on the left, we then, on the left, we see a representation of see a representation of see a representation of the apple as a the apple as a the apple as a knowledge graph, right knowledge graph, right ? So, this apple, we ? So, this apple, we ? So, this apple, we see that see that see that the apple itself comes from the apple itself comes from the apple itself comes from a tree, that the apple, um, a tree, that the apple, um, a tree, that the apple, um, has a specific shape has a specific shape has a specific shape and a specific and a specific and a specific appearance, the apple is round appearance, the apple is round , um, this particular , um, this particular , um, this particular apple is red, um, and the apple is red, um, and the apple is red, um, and the apple itself is a fruit apple itself is a fruit . We are not talking about the . We are not talking about the . We are not talking about the company. So, company. So, company. So, knowledge graphs can make what knowledge graphs can make what knowledge graphs can make what humans understand humans understand humans understand also understandable to

  7. also understandable to also understandable to machines. And this creates machines. And this creates machines. And this creates knowledge graphs, which knowledge graphs, which knowledge graphs, which often create a often create a often create a combination of both. So, combination of both. So, combination of both. So, you can understand you can understand you can understand both. This is a graph both. This is a graph both. This is a graph that is readable by both that is readable by both that is readable by both machine and machine and machine and human, ahem, the shape of human, ahem, the shape of human, ahem, the shape of an apple. And if you're an apple. And if you're an apple. And if you're running late and running late and running late and don't have access to these, don't have access to these, don't have access to these, um, materials, um, materials, um, materials, Jeremy and Ryan will be fine Jeremy and Ryan will be fine Jeremy and Ryan will be fine . They have QR . They have QR codes. Just codes. Just codes. Just raise your hand and raise your hand and raise your hand and they will come over and they will come over and they will come over and give you a QR code for the give you a QR code for the give you a QR code for the materials I materials I materials I just had on the slide. just had on the slide. But most people But most people now can either now can either now can either structure their structure their structure their data as, um, actually, data as, um, actually, data as, um, actually, as tables and as tables and as tables and rows, or you rows, or you rows, or you can have data can have data can have data structured in structured in structured in vectors, as I vectors, as I vectors, as I showed earlier. But showed earlier. But showed earlier. But if you structure if you structure if you structure your data into tables your data into tables your data into tables and rows, then you often and rows, then you often and rows, then you often have to have to have to perform a number of perform a number of perform a number of different complex different complex different complex joins on that data joins on that data joins on that data to understand how those to understand how those to understand how those rows in those tables are rows in those tables are rows in those tables are related to each other. And related to each other. And related to each other. And then we often then we often then we often realize that this will realize that this will realize that this will significantly slow down the significantly slow down the significantly slow down the performance of our performance of our performance of our program. And we can't program. And we can't let that happen, especially let that happen, especially when most of us when most of us when most of us have the have the have the San San Francisco mentality of moving Francisco mentality of moving Francisco mentality of moving fast and breaking things fast and breaking things , right? Just , right? Just , right? Just run it run it run it halfway and then halfway and then halfway and then move it to move it to move it to production, we'll figure out, production, we'll figure out, production, we'll figure out, you know, we'll figure out you know, we'll figure out you know, we'll figure out any issues in the any issues in the any issues in the future. So, this is the future. So, this is the future. So, this is the slowest slowest slowest way to do things.

  8. way to do things. way to do things. We don't have time for this, do we We don't have time for this, do we We don't have time for this, do we ? We must ? We must ? We must move quickly, we move quickly, we move quickly, we must be precise, must be precise, must be precise, and we must be and we must be and we must be clear. So if clear. So if clear. So if you structure all of you structure all of you structure all of this same data in a this same data in a this same data in a knowledge graph, then the connections, knowledge graph, then the connections, knowledge graph, then the connections, relationships, and groupings relationships, and groupings relationships, and groupings actually become actually become actually become much much much clearer. So clearer. So clearer. So now your agent can now your agent can now your agent can physically physically physically jump over, jump over, jump over, right? From one node, and right? From one node, and right? From one node, and when I say node, I when I say node, I when I say node, I mean one mean one mean one circle to the next circle to the next circle to the next circle through this circle through this circle through this connection that we connection that we connection that we see, right? And see, right? And see, right? And a line is a connection, we a line is a connection, we a line is a connection, we can go can go can go from one node to the from one node to the from one node to the next node of next node of next node of information and be information and be information and be able to track able to track able to track and explain what and explain what and explain what happened in the past. happened in the past. happened in the past. That's a huge That's a huge That's a huge improvement, right? improvement, right? improvement, right? Once you can Once you can Once you can traverse traverse traverse nodes through things nodes through things like agent memory, like agent memory, like agent memory, which I'm not really which I'm not really which I'm not really going to going to going to go into in this go into in this go into in this talk. I have a talk. I have a talk. I have a whole separate performance whole separate performance whole separate performance that breaks down the that breaks down the that breaks down the agent's memory into pieces. agent's memory into pieces. agent's memory into pieces. But with this But with this But with this concept of concept of concept of agent memory, you agent memory, you agent memory, you can now have that can now have that can now have that memory and the context memory and the context memory and the context of how that agent of how that agent of how that agent came to the decision came to the decision came to the decision that it made in that it made in that it made in the past. And it's the past. And it's the past. And it's incredible for incredible for incredible for working in working in working in regulated areas regulated areas regulated areas like financial like financial like financial use cases use cases . You don't want vibe . You don't want vibe banking, do you?

  9. banking, do you? banking, do you? Nobody wants vibe Nobody wants vibe banking. You don't banking. You don't banking. You don't want your agent to want your agent to want your agent to just have access to just have access to just have access to your money and then your money and then your money and then spend it all. I've spend it all. I've spend it all. I've seen it seen it seen it happen before. happen before. happen before. But things like But things like But things like medicine, medicine, medicine, regulated spaces regulated spaces , legal spaces, , legal spaces, , legal spaces, that's where that context that's where that context , that history, and that , that history, and that , that history, and that memory are really memory are really memory are really important. But important. But important. But once you have a once you have a knowledge graph representation, your knowledge graph representation, your capabilities for capabilities for capabilities for your agent to provide your agent to provide your agent to provide you with those clear, you with those clear, you with those clear, trackable, and trackable, and trackable, and accurate answers accurate answers accurate answers actually become actually become actually become much better, and much better, and much better, and some might say some might say some might say limitless. So, limitless. So, limitless. So, again, again, again, since this is an since this is an since this is an individual individual individual workshop, I wanted to workshop, I wanted to workshop, I wanted to make sure people make sure people make sure people understood understood understood the architecture of a graph the architecture of a graph the architecture of a graph rag system. So, in a rag system. So, in a rag system. So, in a regular rag regular rag pipeline, you don't pipeline, you don't pipeline, you don't use use use knowledge graphs, right? In a knowledge graphs, right? In a knowledge graphs, right? In a basic rag pipeline basic rag pipeline ...In a regular rag ...In a regular rag pipeline, you can pipeline, you can pipeline, you can take, for example, take, for example, take, for example, multiple PDF files and multiple PDF files and multiple PDF files and then split them into then split them into then split them into chunks and then chunks and then chunks and then index those index those index those chunks using a chunks using a text embedding model. text embedding model. And then when it comes And then when it comes And then when it comes time to query those time to query those time to query those pieces of text, you pieces of text, you pieces of text, you get the same get the same get the same embedding model, embedding model, embedding model, then you try to then you try to then you try to get the first K or the get the first K or the get the first K or the first X of matching first X of matching first X of matching documents and documents and documents and pass that to LLM. And pass that to LLM. And pass that to LLM. And then your LLM will return to then your LLM will return to then your LLM will return to you the final you the final you the final answer from these answer from these answer from these documents. And this is exactly what the documents. And this is exactly what the documents. And this is exactly what the pipeline pipeline pipeline for this poker looks like, as for this poker looks like, as you're probably used to, right? But, you're probably used to, right? But, on the other hand, a graph rag on the other hand, a graph rag is essentially a rag, but it's a is essentially a rag, but it's a is essentially a rag, but it's a place where the search path place where the search path place where the search path actually includes a actually includes a actually includes a knowledge graph. So, graph knowledge graph. So, graph knowledge graph. So, graph rag is where the rag is where the rag is where the search path actually search path actually search path actually includes the knowledge graph. And

  10. includes the knowledge graph. And includes the knowledge graph. And so, as you can see, the so, as you can see, the so, as you can see, the architecture is architecture is architecture is a little different here. a little different here. a little different here. So, in the rag So, in the rag So, in the rag pipeline illustration I showed pipeline illustration I showed pipeline illustration I showed earlier, the regular rag earlier, the regular rag earlier, the regular rag pipeline did not pipeline did not pipeline did not use a use a use a knowledge graph. But as you knowledge graph. But as you knowledge graph. But as you can see, down here can see, down here can see, down here we actually have a we actually have a we actually have a knowledge graph embedded in knowledge graph embedded in knowledge graph embedded in this space. So when this space. So when this space. So when people ask me people ask me people ask me when to use when to use when to use rag and when to use graph rag, rag and when to use graph rag, rag and when to use graph rag, I usually like I usually like I usually like to say that if to say that if to say that if you're trying to you're trying to you're trying to answer answer answer a question that can be a question that can be a question that can be solved solved solved with a search with a search with a search engine, then for, and that's the engine, then for, and that's the engine, then for, and that's the simplest term, simplest term, simplest term, right? Then right? Then right? Then vector rag is vector rag is vector rag is usually enough. usually enough. usually enough. However, if you want to However, if you want to However, if you want to ask a question ask a question ask a question that involves what we that involves what we that involves what we call these call these call these multiple jumps multiple jumps . So, we saw an . So, we saw an . So, we saw an example of a knowledge graph example of a knowledge graph example of a knowledge graph earlier, we saw earlier, we saw earlier, we saw nodes. If you nodes. If you nodes. If you are trying to make are trying to make are trying to make these multiple transitions these multiple transitions these multiple transitions or at least three or at least three or at least three transitions, then graph rag transitions, then graph rag transitions, then graph rag becomes virtually becomes virtually becomes virtually necessary because necessary because necessary because you can see and you can see and you can see and decipher where the decipher where the decipher where the agent had to go agent had to go agent had to go to get their to get their to get their response. But if response. But if response. But if you're trying to you're trying to you're trying to do something like do something like do something like analyze analyze analyze source code, or source code, or source code, or if you have a if you have a supply chain question, or something that supply chain question, or something that requires aggregating or requires aggregating or requires aggregating or merging data from merging data from merging data from different documents, different documents, different documents, then graph rag actually then graph rag actually then graph rag actually becomes really becomes really becomes really useful. And I'm not useful. And I'm not useful. And I'm not going to criticize the going to criticize the going to criticize the vector base rag.

  11. vector base rag. vector base rag. I think it's I think it's I think it's incredibly powerful incredibly powerful incredibly powerful for most of our for most of our use cases. But here are use cases. But here are some examples where some examples where some examples where vector, um, rag and vector, um, rag and vector, um, rag and vector databases vector databases vector databases might not be able to might not be able to might not be able to handle these handle these handle these things, where graph and things, where graph and things, where graph and the ability to traverse the ability to traverse the ability to traverse between nodes and between nodes and between nodes and get this get this get this historical context, historical context, historical context, um, might be um, might be um, might be useful. I'm not useful. I'm not useful. I'm not going to go into going to go into going to go into all of these things, but I all of these things, but I all of these things, but I wanted people to be able wanted people to be able wanted people to be able to see where, um, where there to see where, um, where there to see where, um, where there might be might be might be differences. So, differences. So, differences. So, in general, when people in general, when people in general, when people ask, "Okay, ask, "Okay, ask, "Okay, should I should I should I use graph use graph use graph rag vs. vector base rag?", I rag vs. vector base rag?", I rag vs. vector base rag?", I say that using say that using say that using both is key. We both is key. We both is key. We want want want to use both graph to use both graph and vector, um, and ehm graph, we're and vector, um, and ehm graph, we're and vector, um, and ehm graph, we're not saying that graph will not saying that graph will not saying that graph will completely, um, completely, um, completely, um, completely replace completely replace completely replace your vector layer. We your vector layer. We your vector layer. We say that if you say that if you say that if you use use use both, you get both, you get both, you get the benefits of both. So the benefits of both. So the benefits of both. So let's add more, shall we let's add more, shall we let's add more, shall we ? Let's ? Let's ? Let's make sure make sure make sure our agents are as our agents are as our agents are as helpful as possible. helpful as possible. helpful as possible. OK. So I'll OK. So I'll OK. So I'll pause and we'll move on pause and we'll move on pause and we'll move on to Graph Academy. Regarding Graph to Graph Academy. Regarding Graph to Graph Academy. Regarding Graph Academy, the first link, Academy, the first link, Academy, the first link, graphacademy.com, we'll graphacademy.com, we'll graphacademy.com, we'll go to this go to this go to this seminar, um, Jedi.

  12. seminar, um, Jedi. And I want us to And I want us to skip the first skip the first skip the first few chapters of few chapters of few chapters of this. So, um, this. So, um, this. So, um, of course I've already taken the of course I've already taken the of course I've already taken the course, but I can course, but I can course, but I can drop it. So we're going drop it. So we're going drop it. So we're going to continue this course, to continue this course, to continue this course, and what we're going to and what we're going to and what we're going to do is do is do is skip some of skip some of skip some of these, um, more these, um, more these, um, more introductory things, like introductory things, like introductory things, like , what is , what is , what is generative AI? We do generative AI? We do generative AI? We do n't need to know that. n't need to know that. n't need to know that. If you need to If you need to If you need to know that, that's know that, that's know that, that's great too. Hmm, but, um, great too. Hmm, but, um, great too. Hmm, but, um, for this conversation, we'll for this conversation, we'll for this conversation, we'll just move just move just move down. We will move on to the down. We will move on to the down. We will move on to the section on graph section on graph section on graph rag. OK? So, we have rag. OK? So, we have rag. OK? So, we have already covered already covered already covered graph rag, the graph rag, the graph rag, the search process, and the search process, and the search process, and the differences between a differences between a differences between a regular rag process regular rag process regular rag process and a graph rag process. We and a graph rag process. We and a graph rag process. We see that we...First of see that we...First of see that we...First of all, we see a all, we see a all, we see a typical process here typical process here typical process here that I've already covered. that I've already covered. that I've already covered. You have your You have your You have your retrievers, your retrievers, your retrievers, your user, your user, your user, your application, and your LLM, and application, and your LLM, and application, and your LLM, and then your then your then your data store, which is usually, data store, which is usually, data store, which is usually, ahem, vector ahem, vector ahem, vector storage. Hmm, but storage. Hmm, but storage. Hmm, but then if we then if we then if we go lower, then go lower, then go lower, then we'll also see a we'll also see a we'll also see a slight difference, hmm. slight difference, hmm.

  13. And what I would like to And what I would like to touch on here is the touch on here is the touch on here is the concept of retrievers concept of retrievers . Many of you already . Many of you already . Many of you already know what know what know what retrievers are. Just retrievers are. Just retrievers are. Just help quickly help quickly help quickly so I don't have to so I don't have to so I don't have to reread this. reread this. reread this. Good. Actually, not as Good. Actually, not as Good. Actually, not as much as I thought much as I thought . So that's okay. . So that's okay. . So that's okay. It's okay. It's okay. It's okay. Let's quickly Let's quickly Let's quickly get to this. get to this. get to this. So, the retriever is a So, the retriever is a So, the retriever is a key component of the key component of the key component of the processing process, processing process, processing process, right? The retriever is right? The retriever is right? The retriever is actually responsible actually responsible actually responsible for searching and retrieving for searching and retrieving for searching and retrieving relevant relevant relevant information from information from information from external external external data sources. And what I like to data sources. And what I like to data sources. And what I like to say is, okay, say is, okay, say is, okay, let's make this, let's make this, let's make this, um, bigger. um, bigger. um, bigger. Thank you very much. Hmm, something I Thank you very much. Hmm, something I Thank you very much. Hmm, something I often like often like often like to repeat, or to repeat, or to repeat, or ways I ways I ways I like to like to like to remember who remember who remember who retrievers are. Hmm, the retrievers are. Hmm, the retrievers are. Hmm, the easy way, um, easy way, um, easy way, um, is that is that is that retrievers are retrievers are retrievers are golden retrievers, golden retrievers, golden retrievers, right? We all right? We all right? We all know about know about know about golden golden golden retrievers. They retrievers. They retrievers. They love to catch balls. love to catch balls. love to catch balls. They love to catch They love to catch They love to catch things. So, a retriever things. So, a retriever is, uh, if you think is, uh, if you think is, uh, if you think about this about this about this golden golden golden retriever, he likes to retriever, he likes to retriever, he likes to walk and gather the walk and gather the walk and gather the necessary information necessary information . So, a search engine . So, a search engine . So, a search engine typically takes typically takes typically takes unstructured unstructured unstructured input, such as input, such as input, such as a question or a a question or a a question or a prompt, like when we prompt, like when we prompt, like when we use use chatbots, and then it chatbots, and then it chatbots, and then it searches for structured searches for structured searches for structured data to provide data to provide data to provide context for the context for the context for the answer. So that's just a answer. So that's just a answer. So that's just a little bit about what little bit about what little bit about what Neo4j specifically Neo4j specifically Neo4j specifically announces about announces about announces about support for support for support for full-text full-text full-text search, vector search, vector search, vector search, and, uh, search, and, uh, search, and, uh, text or text or text or encrypted search encrypted search encrypted search engines. And we also engines. And we also engines. And we also have a number of different have a number of different have a number of different data sources. So these data sources. So these data sources. So these data sources in, uh, data sources in, uh, data sources in, uh, regular regular regular rag pipelines and processes can rag pipelines and processes can rag pipelines and processes can change, uh, change, uh, change, uh, documents, APIs, documents, APIs, documents, APIs, knowledge graphs. Uh, but, uh, knowledge graphs. Uh, but, uh, knowledge graphs. Uh, but, uh, if we were if we were if we were to use, uh, to use, uh, to use, uh, this, uh, this this, uh, this news news news agency chatbot, the process would agency chatbot, the process would agency chatbot, the process would look like this,

  14. look like this, look like this, right? The News API will be right? The News API will be right? The News API will be used used used to retrieve to retrieve to retrieve the latest articles and the latest articles and the latest articles and headlines. The headlines. The headlines. The knowledge graph will then be knowledge graph will then be knowledge graph will then be used used used to understand the to understand the to understand the connections between different connections between different connections between different topics, uh, for example topics, uh, for example , how they relate , how they relate , how they relate to each other in a to each other in a to each other in a historical historical historical context. And then the context. And then the document database will document database will store and store and store and retrieve, uh, retrieve, uh, retrieve, uh, articles, reports, or articles, reports, or articles, reports, or textual information. textual information. So, this is just an example of what So, this is just an example of what it might it might it might look like in an look like in an look like in an unnamed architecture. But let unnamed architecture. But let unnamed architecture. But let 's continue. 's continue. 's continue. Right? Right? Right? Using graph rag Using graph rag Using graph rag has many different has many different has many different advantages. I advantages. I advantages. I will briefly address this issue. will briefly address this issue. will briefly address this issue. But one of them is, um, But one of them is, um, But one of them is, um, richer context, richer context, richer context, and improved and improved and improved accuracy and accuracy and accuracy and explainability, as explainability, as explainability, as we've already seen in the we've already seen in the we've already seen in the knowledge graph. If you can, knowledge graph. If you can, knowledge graph. If you can, um, walk through the um, walk through the um, walk through the knowledge graph, um, and then knowledge graph, um, and then knowledge graph, um, and then use that use that use that plus things like plus things like plus things like agent memory, then agent memory, then agent memory, then you can get you can get you can get this rich this rich this rich historical context historical context historical context that's really that's really that's really necessary and necessary and necessary and useful for useful for useful for building your building your building your agents. So let's agents. So let's agents. So let's continue. And then I continue. And then I continue. And then I heard a few heard a few heard a few people, um, and my people, um, and my people, um, and my colleague, a little earlier, colleague, a little earlier, colleague, a little earlier, went through this went through this went through this line to see line to see line to see if people had created if people had created if people had created knowledge graphs before?

  15. knowledge graphs before? knowledge graphs before? Can I get Can I get Can I get some hands on to some hands on to some hands on to see if see if see if anyone has created anyone has created anyone has created knowledge graphs? Just a knowledge graphs? Just a knowledge graphs? Just a few. Okay, just few. Okay, just few. Okay, just a few. Okay, a little bit, a few. Okay, a little bit, a few. Okay, a little bit, yes. Okay, here it is. yes. Okay, here it is. yes. Okay, here it is. Okay, hello, world. Okay, hello, world. Okay, hello, world. This is great. No This is great. No This is great. No problem. That's why we're problem. That's why we're problem. That's why we're all here to all here to all here to learn more. Um, learn more. Um, learn more. Um, just making sure just making sure just making sure we understand what a we understand what a we understand what a knowledge graph is. We knowledge graph is. We knowledge graph is. We covered this a little bit in covered this a little bit in covered this a little bit in the example, but a the example, but a the example, but a knowledge graph in general is, ahem, an knowledge graph in general is, ahem, an knowledge graph in general is, ahem, an organized organized organized representation of representation of representation of real- real- real- world entities and their world entities and their world entities and their relationships. So, if I'm a relationships. So, if I'm a relationships. So, if I'm a node, right? I am a circle, I am a node, right? I am a circle, I am a node, right? I am a circle, I am a node, and then my node, and then my node, and then my colleague Jeremy colleague Jeremy colleague Jeremy is also a node. Yes, Jeremy is also a node. Yes, Jeremy , we are knots. And then , we are knots. And then , we are knots. And then we actually have a we actually have a we actually have a relationship, we are colleagues relationship, we are colleagues relationship, we are colleagues and friends. So we and friends. So we and friends. So we have two different have two different have two different relationships here, but this is the relationships here, but this is the relationships here, but this is the simplest simplest simplest architecture of a architecture of a architecture of a knowledge graph. And then we knowledge graph. And then we knowledge graph. And then we can also be connected can also be connected can also be connected to different people. to different people. to different people. We have our colleague Zach We have our colleague Zach We have our colleague Zach and then another and then another and then another colleague Ryan. There are colleague Ryan. There are colleague Ryan. There are so many different so many different so many different ways, but it's ways, but it's ways, but it's just a representation just a representation , it's just a , it's just a , it's just a representation of data representation of data representation of data in its simplest form. in its simplest form. in its simplest form. So, what is a So, what is a So, what is a knowledge graph? You can knowledge graph? You can knowledge graph? You can see another see another see another example of this example of this example of this knowledge graph here. So to knowledge graph here. So to knowledge graph here. So to save time, I'll save time, I'll save time, I'll just scroll down.

  16. just scroll down. And we will move on to And we will move on to this part of this part of this part of building the knowledge graph. building the knowledge graph. building the knowledge graph. So for everyone So for everyone So for everyone following, we following, we following, we are in the are in the knowledge graph building section. So knowledge graph building section. So let's quickly let's quickly let's quickly create a knowledge graph. create a knowledge graph. So, building So, building knowledge graphs in this lesson knowledge graphs in this lesson knowledge graphs in this lesson will look at the process of will look at the process of will look at the process of building building building knowledge graphs from knowledge graphs from knowledge graphs from unstructured unstructured unstructured text using text using text using LLM. The general process LLM. The general process LLM. The general process is to is to is to make sure that we make sure that we make sure that we collect collect collect data sources and then we data sources and then we data sources and then we fragment that fragment that fragment that information and information and information and fragment that data. fragment that data. fragment that data. Of course, we also Of course, we also Of course, we also vectorize this data vectorize this data vectorize this data and then extract and then extract and then extract nodes and connections from it. nodes and connections from it. And then, of course, And then, of course, we generate the graph. So we generate the graph. So we generate the graph. So in this example, in this example, in this example, if we want to if we want to if we want to build a build a build a knowledge graph based on the knowledge graph based on the Neo4j Wikipedia page, which we can Neo4j Wikipedia page, which we can see here, we're see here, we're see here, we're collecting text from that collecting text from that collecting text from that page, right? page, right? page, right? Let's take the entire text Let's take the entire text Let's take the entire text and then break and then break and then break it into chunks, as it into chunks, as it into chunks, as you can see here. you can see here. you can see here. We would generate We would generate We would generate embeddings and embeddings and embeddings and vectors from each of vectors from each of vectors from each of these fragments, and these fragments, and these fragments, and then extract then extract then extract entities and relationships entities and relationships entities and relationships using LLM. You using LLM. You using LLM. You can do this can do this can do this manual extraction if manual extraction if manual extraction if you want, but we you want, but we you want, but we believe that believe that believe that using LLM can using LLM can using LLM can reduce the time reduce the time reduce the time required for this required for this required for this extraction. So we would extraction. So we would extraction. So we would send an LLM with a send an LLM with a send an LLM with a corresponding request.

  17. corresponding request. corresponding request. Um, a quick Um, a quick Um, a quick search example: your task is search example: your task is to identify the entities to identify the entities to identify the entities and relationships and relationships and relationships requested in the query requested in the query requested in the query from the given text. from the given text. from the given text. Then you should Then you should Then you should generate a generate a generate a result in result in result in JSON format containing a list of JSON format containing a list of JSON format containing a list of JSON objects. Then we'll JSON objects. Then we'll JSON objects. Then we'll insert...Oh, sorry, insert...Oh, sorry, insert...Oh, sorry, parse these parse these parse these entities and relationships, the entities and relationships, the entities and relationships, the result in LLM. result in LLM. result in LLM. Let's put this in Let's put this in Let's put this in JSON format. And then we'll JSON format. And then we'll JSON format. And then we'll generate a graph from generate a graph from generate a graph from all of this. So what we all of this. So what we all of this. So what we see here is Cypher, a query language see here is Cypher, a query language optimized for optimized for graphs. Has anyone graphs. Has anyone graphs. Has anyone used used used Cypher before? Sprat. Good. Cypher before? Sprat. Good. Cypher before? Sprat. Good. Good. Okay, a few Good. Okay, a few Good. Okay, a few people. Um, if you're a people. Um, if you're a people. Um, if you're a Cypher expert, I Cypher expert, I Cypher expert, I have, um, if you have, um, if you have, um, if you answer some of answer some of answer some of my questions, I my questions, I my questions, I have gifts too. have gifts too. have gifts too. So, folks, um, So, folks, um, So, folks, um, since you're since you're since you're taking this taking this taking this seminar, I want it to seminar, I want it to seminar, I want it to be more be more be more interactive than a interactive than a interactive than a regular seminar. regular seminar. regular seminar. So, I'll be asking So, I'll be asking So, I'll be asking questions, and if you're questions, and if you're questions, and if you're brave enough brave enough brave enough to answer to answer to answer one of my questions one of my questions one of my questions live, that will live, that will live, that will also be also be also be broadcast broadcast broadcast live, but live, but live, but then I have some then I have some then I have some free, er, free, er, free, er, unique swag for unique swag for unique swag for you. So, that includes t- you. So, that includes t- you. So, that includes t- shirts, that includes, shirts, that includes, shirts, that includes, uh, special swag uh, special swag uh, special swag that you can't that you can't that you can't get anywhere else, get anywhere else, get anywhere else, socks, etc. But, uh socks, etc. But, uh , special swag on , special swag on , special swag on top of that. So, top of that. So, top of that. So, uh, thank you all for being uh, thank you all for being uh, thank you all for being willing to willing to willing to take a chance and take a chance and take a chance and answer some answer some answer some questions we questions we questions we might have. But might have. But might have. But you'll see here, uh, you'll see here, uh, you'll see here, uh, finally, an example of a finally, an example of a finally, an example of a generated graph.

  18. generated graph. generated graph. So we have a graph So we have a graph So we have a graph database database database developed by Neo4j, which is developed by Neo4j, which is developed by Neo4j, which is a company, uh, and, uh, a company, uh, and, uh, a company, uh, and, uh, Neo4j didn't develop Neo4j didn't develop Neo4j didn't develop graph databases graph databases graph databases in general, but simply Neo4j in general, but simply Neo4j is a graph database is a graph database developed by Neo4j together developed by Neo4j together developed by Neo4j together with the company. And it's with the company. And it's with the company. And it's implemented in Java. And implemented in Java. And implemented in Java. And a little note, a little note, a little note, Neo4j, the name comes Neo4j, the name comes Neo4j, the name comes from Neo, which is Matrix, from Neo, which is Matrix, from Neo, which is Matrix, well, those who know well, those who know well, those who know Matrix. And then Neo for Java. Matrix. And then Neo for Java. Matrix. And then Neo for Java. So, for those who have So, for those who have So, for those who have this short snippet, this short snippet, this short snippet, you know, uh, this you know, uh, this you know, uh, this note about Neo4j. So note about Neo4j. So note about Neo4j. So we can continue. we can continue. Oh, yes. Yes. Let's. Oh, yes. Yes. Let's. Yes. Yes, let's Yes. Yes, let's Yes. Yes, let's do this. do this. do this. OK. So, OK. So, OK. So, since it's already half an since it's already half an since it's already half an hour, we want hour, we want hour, we want you to get the most out of it you to get the most out of it you to get the most out of it , and people , and people , and people wanted to get involved in wanted to get involved in wanted to get involved in building a building a building a knowledge graph. On the left knowledge graph. On the left knowledge graph. On the left sidebar there is a sidebar there is a sidebar there is a graph rag link for graph rag link for graph rag link for Python. Python. Python. Yes, Yes, that's the link, so that's the link, so go there. If go there. If go there. If you scroll down, you scroll down, you scroll down, it will take you to, uh, it will take you to, uh, it will take you to, uh, here we'll talk a little bit here we'll talk a little bit here we'll talk a little bit about the about the about the graph rag package for Python, an graph rag package for Python, an graph rag package for Python, an open source package that open source package that open source package that Neo4j provides for Neo4j provides for Neo4j provides for building and searching building and searching building and searching knowledge graphs and knowledge graphs and knowledge graphs and agent work. And agent work. And agent work. And also on this page also on this page also on this page are all the credentials are all the credentials are all the credentials you will need you will need you will need for all the examples for all the examples for all the examples we will we will we will use. And use. And use. And then, uh, Nia, do you then, uh, Nia, do you then, uh, Nia, do you want to pick this up and want to pick this up and want to pick this up and talk about talk about talk about credentials in the credentials in the GitHub codespace?

  19. GitHub codespace? Of course. So let Of course. So let Of course. So let 's get started, uh, let's get started, 's get started, uh, let's get started, 's get started, uh, let's get started, we mentioned that we're we mentioned that we're we mentioned that we're in the in the in the Python graphs section now, and we Python graphs section now, and we Python graphs section now, and we want to, uh, want to, uh, want to, uh, scroll down and scroll down and scroll down and click "open" click "open" click "open" in in in GitHub Codespaces. Once we GitHub Codespaces. Once we GitHub Codespaces. Once we open it, we'll, uh open it, we'll, uh , need to , need to , need to log into GitHub if you haven't log into GitHub if you haven't log into GitHub if you haven't already, already, already, but once we but once we but once we open it, we'll just open it, we'll just open it, we'll just leave all these leave all these leave all these system requests system requests system requests unchanged, and then unchanged, and then unchanged, and then we'll create a code we'll create a code we'll create a code space. This is going to take a space. This is going to take a space. This is going to take a little while, so we're going little while, so we're going little while, so we're going to do a few things to do a few things to do a few things in advance, not in advance, not in advance, not necessarily necessarily necessarily in advance, but while in advance, but while in advance, but while it's being generated. And so it's being generated. And so it's being generated. And so while this is while this is while this is being generated, I just being generated, I just being generated, I just wanted to show you wanted to show you wanted to show you all that we're going to be all that we're going to be all that we're going to be creating this creating this setup environment. And so setup environment. And so we'll create a copy of we'll create a copy of we'll create a copy of this env.example, and you this env.example, and you this env.example, and you can just can just can just click "copy click "copy click "copy here" and we'll actually here" and we'll actually here" and we'll actually create that in our create that in our create that in our codespaces section codespaces section codespaces section . And yes, this . And yes, this will certainly continue, will certainly continue, Wi-Fi is not always fun, Wi-Fi is not always fun, Wi-Fi is not always fun, but it will continue. but it will continue. but it will continue. Eventually, it will have a Eventually, it will have a Eventually, it will have a whole folder structure, whole folder structure, whole folder structure, and it will have a folder called and it will have a folder called and it will have a folder called .env.example. So instead, .env.example. So instead, .env.example. So instead, we're going to create an we're going to create an we're going to create an .env file and put .env file and put .env file and put all these, um, um, all these, um, um, all these, um, um, all these credentials in there.

  20. all these credentials in there. And actually, we won't And actually, we won't be inserting be inserting be inserting these credentials these credentials , because we want to, , because we want to, , because we want to, specifically (and I specifically (and I specifically (and I wrote this down in my notes) wrote this down in my notes) wrote this down in my notes) create an instance of create an instance of create an instance of Neo4j Aura. And so, I have this Neo4j Aura. And so, I have this Neo4j Aura. And so, I have this in my notes to in my notes to in my notes to start with. So, start with. So, start with. So, create an instance of create an instance of create an instance of Neo4j Aura. And again, Neo4j Aura. And again, Neo4j Aura. And again, I mentioned that we I mentioned that we I mentioned that we should create a should create a should create a free free free instance specifically instance specifically instance specifically for this workshop. for this workshop. for this workshop. You can also You can also You can also create a professional create a professional create a professional instance. But I instance. But I instance. But I already have one already have one already have one set up. And so, set up. And so, set up. And so, this instance, um, this instance, um, this instance, um, instance number three. instance number three. instance number three. You should have You should have You should have "um, Aura" written on it, I "um, Aura" written on it, I "um, Aura" written on it, I think Aura is free think Aura is free . Hmm, but what we're going to do . Hmm, but what we're going to do is we're is we're is we're actually actually actually going to connect to going to connect to going to connect to this instance. And this instance. And this instance. And so once you so once you so once you create this create this create this instance, you'll actually have the instance, you'll actually have the connection data that you connection data that you can download can download can download directly to directly to directly to your computer so you don't your computer so you don't your computer so you don't lose it. And, um, what lose it. And, um, what lose it. And, um, what we're going to do is we're going to do is we're going to do is plug this in here. plug this in here. Yes, and, um, actually, there Yes, and, um, actually, there 's a crossroads here. Don't be 's a crossroads here. Don't be 's a crossroads here. Don't be discouraged if for discouraged if for discouraged if for some reason you can't some reason you can't create an create an Aura instance in time. This would be perfect Aura instance in time. This would be perfect Aura instance in time. This would be perfect for the last for the last for the last part of the exercise if part of the exercise if part of the exercise if you can, but those other you can, but those other you can, but those other credentials that we credentials that we credentials that we saw in GraphAcademy saw in GraphAcademy saw in GraphAcademy are in are in are in a small, ahem, a small, ahem, a small, ahem, free free free instance that instance that instance that is is is inside inside inside GraphAcademy itself. So you can GraphAcademy itself. So you can GraphAcademy itself. So you can use them. In use them. In use them. In any case, any case, any case, we need the we need the we need the connection details for the connection details for the connection details for the Neo4j database because that's where Neo4j database because that's where Neo4j database because that's where we're we're we're going to going to going to build this

  21. build this build this knowledge graph. Yes. knowledge graph. Yes. knowledge graph. Yes. Perfectly. So what I'm Perfectly. So what I'm Perfectly. So what I'm doing now is doing now is doing now is I'm taking the information about I'm taking the information about I'm taking the information about my instance and my instance and my instance and then I'm just then I'm just then I'm just inserting it here into inserting it here into inserting it here into our, um, our graph. our, um, our graph. Perfectly. We see it Perfectly. We see it there, and then I'll also there, and then I'll also there, and then I'll also take the OpenAI key. Yes, take the OpenAI key. Yes, take the OpenAI key. Yes, and I'll make it and I'll make it and I'll make it bigger too. Move bigger too. Move bigger too. Move this terminal down. this terminal down. Move this aside. Perfectly. So, we Perfectly. So, we also need this also need this also need this OpenAI key that we OpenAI key that we OpenAI key that we had, that we took, and had, that we took, and had, that we took, and we'll take it we'll take it we'll take it directly from the directly from the directly from the notes. So just notes. So just notes. So just copy and paste copy and paste copy and paste the key and post the key and post the key and post it. Perfectly. Okay, it. Perfectly. Okay, it. Perfectly. Okay, this will save if you this will save if you this will save if you have have have autosave, or you autosave, or you autosave, or you need to save need to save need to save it yourself. And it yourself. And it yourself. And now we have this. And so now we have this. And so now we have this. And so once we once we once we have this M-file, we'll have this M-file, we'll have this M-file, we'll need to need to need to test test test our environment very quickly. So our environment very quickly. So , we'll go to test , we'll go to test , we'll go to test environment.py and just environment.py and just environment.py and just run that run that run that environment. You can environment. You can environment. You can run it run it run it using this if using this if using this if you're using VS you're using VS you're using VS Code, or you can Code, or you can Code, or you can use run it use run it use run it using your using your using your hopefully hopefully Python virtual environment. But Python virtual environment. But let's let's let's make sure we make sure we make sure we do it. Okay, we do it. Okay, we do it. Okay, we see here at the bottom that see here at the bottom that see here at the bottom that it's trying it's trying it's trying to connect. Perfectly.

  22. to connect. Perfectly. to connect. Perfectly. Five tests were conducted Five tests were conducted Five tests were conducted , and the result was , and the result was , and the result was positive. Everything is positive. Everything is positive. Everything is fine. So, are there any fine. So, are there any problems? If so, problems? If so, make sure you make sure you make sure you actually created a actually created a actually created a dot env file, not just the one in dot env file, not just the one in dot env file, not just the one in this example. this example. this example. Yes, yes. Yes, yes. Yes, yes. And you can And you can And you can rename the file rename the file rename the file or create a new one. And, or create a new one. And, or create a new one. And, um, that's basically it um, that's basically it um, that's basically it now that we know we're now that we know we're now that we know we're connecting to the connecting to the connecting to the Neo4j database and our Neo4j database and our Neo4j database and our OpenAI key is successfully OpenAI key is successfully OpenAI key is successfully launched. launched. Perfectly. So now, Perfectly. So now, um, the test um, the test um, the test environment is up and running, environment is up and running, environment is up and running, that's successful. Now we that's successful. Now we that's successful. Now we can take a look and can take a look and can take a look and we can see we can see we can see here, hmm, if you here, hmm, if you here, hmm, if you go to workshop.genai, go to workshop.genai, go to workshop.genai, you'll see here that you'll see here that you'll see here that we have a couple of different we have a couple of different we have a couple of different solutions. So we have the solutions. So we have the solutions. So we have the date, the date, the date, the raw data itself, raw data itself, raw data itself, the solutions themselves, and then the the solutions themselves, and then the the solutions themselves, and then the agent, and then the agent, and then the knowledge graph builder and the knowledge graph builder and the structured structured knowledge graph builder. So, we knowledge graph builder. So, we click on this click on this Structured Knowledge Builder , and it will create this , and it will create this , and it will create this knowledge graph right in knowledge graph right in knowledge graph right in our Aura instance.

  23. our Aura instance. our Aura instance. So if you're back in VS So if you're back in VS So if you're back in VS Code, then we can Code, then we can Code, then we can just, um, run just, um, run just, um, run this, and this process will take this, and this process will take this, and this process will take a little while, but it will a little while, but it will a little while, but it will actually generate a actually generate a actually generate a knowledge graph, and we knowledge graph, and we knowledge graph, and we can see can see can see it populate in it populate in it populate in real time in the real time in the real time in the Neo4j Aura instance, um, Neo4j Aura instance, um, Neo4j Aura instance, um, Aura. So let's Aura. So let's Aura. So let's get back to Aura. And get back to Aura. And get back to Aura. And what I did, and also, what I did, and also, what I did, and also, um, here. So, again um, here. So, again um, here. So, again , I'm going to , I'm going to , I'm going to connect. We connect. We connect. We will proceed to the request. will proceed to the request. And we see that I've already And we see that I've already done that, so I've already done that, so I've already done that, so I've already pre-filled pre-filled pre-filled it, just because it, just because it, just because it's going to take some time. it's going to take some time. it's going to take some time. So it's probably So it's probably So it's probably going to do some going to do some going to do some deduplication, um, deduplication, um, deduplication, um, based on the fact based on the fact that I've already that I've already that I've already run it. Um, however, run it. Um, however, run it. Um, however, um, all this information um, all this information um, all this information will be, um, filled in will be, um, filled in will be, um, filled in here, and then we can here, and then we can here, and then we can query it, um, and query it, um, and query it, um, and see what, um, what see what, um, what see what, um, what exists in, um, in the exists in, um, in the exists in, um, in the instance. And we instance. And we instance. And we see that this see that this see that this knowledge graph, the more knowledge graph, the more knowledge graph, the more times you query, times you query, times you query, the more you'll the more you'll the more you'll see that it see that it see that it will actually, um, will actually, um, will actually, um, continue to continue to continue to fill up. So, fill up. So, fill up. So, now we're just now we're just now we're just going to see what, um, going to see what, um, going to see what, um, connections and, um, um, um, connections and, um, um, um, connections and, um, um, um, nodes are already here. So nodes are already here. So nodes are already here. So we have P, and then, match we have P, and then, match we have P, and then, match P. Oops, that was a P. Oops, that was a P. Oops, that was a small syntax

  24. small syntax small syntax error. Oh, thank you. The error. Oh, thank you. The coincidence P is equal. That's coincidence P is equal. That's it. Perfectly. So it. Perfectly. So it. Perfectly. So now we can now we can now we can see, and I've zoomed in see, and I've zoomed in see, and I've zoomed in so we can so we can so we can see what's see what's see what's going on here. But going on here. But going on here. But now we can now we can now we can see all these different see all these different see all these different nodes and connections, nodes and connections, nodes and connections, just based on the just based on the just based on the data that we had, data that we had, data that we had, that we put into the that we put into the that we put into the knowledge graph. And you knowledge graph. And you knowledge graph. And you can click on can click on can click on that data and you that data and you that data and you can also view the can also view the can also view the data. It's not just a data. It's not just a visualization tool, it's visualization tool, it's also a also a also a query tool, a way for query tool, a way for query tool, a way for you to you to you to query the query the query the data itself. But this is a data itself. But this is a data itself. But this is a ready-made knowledge graph. ready-made knowledge graph. ready-made knowledge graph. Your knowledge graph will be Your knowledge graph will be Your knowledge graph will be much smaller, and much smaller, and much smaller, and the more times you the more times you the more times you run this run this run this particular query, P particular query, P particular query, P equals empty, equals empty, equals empty, like, in fact, a node. like, in fact, a node. like, in fact, a node. So, empty node, So, empty node, So, empty node, dash, dash, empty dash, dash, empty dash, dash, empty node, then node, then node, then return this P. You'll return this P. You'll return this P. You'll see that the see that the see that the more times you more times you more times you run this, the run this, the run this, the more times you'll more times you'll more times you'll see the see the see the knowledge graph grow. It's knowledge graph grow. It's knowledge graph grow. It's just a general query just a general query just a general query like: show us like: show us like: show us all the nodes, right?

  25. all the nodes, right? all the nodes, right? Show us all the Show us all the Show us all the nodes and connections. nodes and connections. Perfectly. Good. So, Perfectly. Good. So, once we once we once we get those knots and get those knots and get those knots and ties, and for those of you who are ties, and for those of you who are ties, and for those of you who are having trouble with this having trouble with this having trouble with this process, process, process, feel free to raise your feel free to raise your feel free to raise your hand and we have colleagues hand and we have colleagues hand and we have colleagues who will come and who will come and who will come and help you. But help you. But help you. But once you start once you start once you start generating this generating this generating this knowledge graph, then we want to knowledge graph, then we want to create an agent. Oh, I create an agent. Oh, I see a pair of hands right see a pair of hands right see a pair of hands right behind me. So behind me. So behind me. So you may not see this you may not see this you may not see this agent section yet. If agent section yet. If agent section yet. If not, let him not, let him not, let him see your hand in see your hand in see your hand in your, um, thing. your, um, thing. your, um, thing. Okay, but I know Okay, but I know Okay, but I know some people are probably some people are probably some people are probably not there yet. Hmm, but if not there yet. Hmm, but if not there yet. Hmm, but if you don't see this you don't see this you don't see this agents section, I agents section, I agents section, I want you to go want you to go want you to go to your organization, to your organization, to your organization, your Neo4j organization your Neo4j organization . Hmm, and then we'll . Hmm, and then we'll . Hmm, and then we'll click on all the click on all the click on all the organizations. And we'll organizations. And we'll organizations. And we'll just enable just enable just enable GenAI capabilities for GenAI capabilities for GenAI capabilities for that organization. And that organization. And that organization. And here we are in this new here we are in this new here we are in this new organization. Then we organization. Then we organization. Then we will move on to will move on to will move on to the settings. I the settings. I the settings. I already have it enabled, but already have it enabled, but already have it enabled, but for those who don't know for those who don't know for those who don't know how to enable it or have how to enable it or have how to enable it or have never never never used Neo4j Aura before used Neo4j Aura before , hmm, here we have it, you , hmm, here we have it, you , hmm, here we have it, you have to click on have to click on have to click on these two. They'll be, these two. They'll be, these two. They'll be, um, they'll be um, they'll be um, they'll be grayed out, but I want grayed out, but I want grayed out, but I want you to click on you to click on you to click on them to turn them on.

  26. them to turn them on. them to turn them on. So, generate So, generate So, generate AI assistance, AI assistance, AI assistance, generative generative generative AI assistance, and then specifically the AI assistance, and then specifically the AI assistance, and then specifically the Aura agent, because Aura agent, because Aura agent, because today we're going to today we're going to today we're going to create an agent. create an agent. So, oh, there are a few hands, So, oh, there are a few hands, great. So, once great. So, once great. So, once we have that we have that we have that organization, we will organization, we will organization, we will return to our return to our return to our specific specific specific organization. We organization. We organization. We will return to will return to will return to our instance. our instance. Let's open our Let's open our instance in instance in instance in query mode. Let's see query mode. Let's see query mode. Let's see our agent, um, our agent, um, our agent, um, let's see how let's see how let's see how our our our knowledge graph fills up. And then we knowledge graph fills up. And then we knowledge graph fills up. And then we click here, agents. click here, agents. click here, agents. And this agent is here. So, And this agent is here. So, And this agent is here. So, I already have an agent here I already have an agent here , but what we're going to , but what we're going to , but what we're going to do is create an do is create an do is create an agent. So, we're agent. So, we're agent. So, we're going to create an going to create an going to create an agent from scratch. And we're agent from scratch. And we're agent from scratch. And we're going to going to going to bind this bind this bind this agent to this agent to this agent to this particular particular particular instance. It should instance. It should instance. It should automatically automatically automatically populate populate populate based on the last based on the last based on the last instance you instance you instance you created. And we created. And we created. And we will set it up. So what will set it up. So what will set it up. So what we want this we want this we want this agent to do, uh, we'll agent to do, uh, we'll agent to do, uh, we'll call this agent, call this agent, call this agent, we'll call it, um, uh we'll call it, um, uh , GenAI Basics. Um, well, , GenAI Basics. Um, well, , GenAI Basics. Um, well, actually we'll call actually we'll call actually we'll call it GraphRAG Basics.

  27. it GraphRAG Basics. GraphRAG Fundamentals Agent. Ideally. And then, to Ideally. And then, to describe, um, to describe describe, um, to describe describe, um, to describe this agent, we're this agent, we're this agent, we're going to say going to say going to say that this agent provides, um that this agent provides, um , information to Neo4j GraphRAG , information to Neo4j GraphRAG , information to Neo4j GraphRAG based on this based on this based on this particular Graph particular Graph particular Graph Academy course that we have. Academy course that we have. So we have this So we have this agent, and again, agent, and again, agent, and again, for those following, for those following, for those following, it will provide it will provide it will provide Neo4j GraphRAG information Neo4j GraphRAG information Neo4j GraphRAG information based on this based on this based on this particular Graph particular Graph particular Graph Academy course. And finally, we Academy course. And finally, we Academy course. And finally, we will provide instructions will provide instructions will provide instructions for this agent here.

  28. for this agent here. for this agent here. So, this instruction So, this instruction So, this instruction will be one that we will be one that we will be one that we can just can just can just copy and copy and copy and paste. What I will do is paste. What I will do is paste. What I will do is include this in the include this in the include this in the GenAI notes section GenAI notes section GenAI notes section so you can all so you can all so you can all see it. I'll move on to see it. I'll move on to see it. I'll move on to the notes. But this is an the notes. But this is an the notes. But this is an easy way easy way easy way to create your to create your to create your agent. Agent description agent. Agent description agent. Agent description for all of you so you for all of you so you for all of you so you can copy and can copy and can copy and paste it and your paste it and your paste it and your agent actually agent actually agent actually worked with us here. And worked with us here. And worked with us here. And if you have any if you have any if you have any questions, please questions, please don't hesitate to don't hesitate to don't hesitate to raise your hand. Okay raise your hand. Okay , so we'll just , so we'll just , so we'll just copy that to copy that to copy that to our agent as well. We have our agent as well. We have our agent as well. We have the instruction and we'll the instruction and we'll the instruction and we'll keep everything pretty much keep everything pretty much keep everything pretty much the same, also the same, also the same, also the location of the the location of the the location of the agent instance and agent instance and agent instance and then the internals, and what then the internals, and what then the internals, and what we want to do we want to do ideally is create ideally is create that agent. But that agent. But that agent. But really, do really, do really, do we want this? Yeah, okay, we want this? Yeah, okay, we want this? Yeah, okay, but before we but before we but before we create this create this create this agent, we're going to try agent, we're going to try agent, we're going to try adding similarity search to it adding similarity search to it adding similarity search to it . So . So . So if you don't already have if you don't already have similarity search added to your similarity search added to your agent, or vector agent, or vector agent, or vector search, or vector search, or vector search, or vector indexes specifically indexes specifically indexes specifically added to your added to your added to your agent, then we agent, then we agent, then we actually need to actually need to actually need to do that for do that for do that for this query to appear.

  29. this query to appear. this query to appear. So you'll get a So you'll get a So you'll get a separate prompt separate prompt separate prompt saying that saying that saying that vector search is vector search is vector search is needed for this. needed for this. needed for this. So where we So where we So where we find a good place find a good place find a good place to get that to get that to get that information, we'll information, we'll information, we'll close that, we close that, we close that, we can leave it can leave it can leave it open, but what we'll open, but what we'll open, but what we'll do is do is do is go to the go to the go to the Python section, there's another Python section, there's another Python section, there's another section there, let's section there, let's section there, let's see, in the see, in the see, in the graph rack for Python. Here graph rack for Python. Here graph rack for Python. Here we go, and I'll we go, and I'll we go, and I'll put this in the notes put this in the notes put this in the notes for you all as well. I for you all as well. I for you all as well. I like being in like being in like being in full screen full screen full screen mode. Well, because. I'll mode. Well, because. I'll mode. Well, because. I'll just...maybe just...maybe just...maybe just exit just exit just exit full screen full screen full screen mode. Good. mode. Good. mode. Good. Let me Let me Let me insert this for you insert this for you insert this for you all. So, we all. So, we all. So, we will create a vector will create a vector will create a vector index. So we want to index. So we want to index. So we want to follow this follow this follow this link here. link here. Create a vector Create a vector index. Steeply. And here's index. Steeply. And here's index. Steeply. And here's what you need to what you need to what you need to do: click on do: click on do: click on this link, and it this link, and it this link, and it will take you will take you will take you to a sample code to a sample code to a sample code to create a to create a to create a vector index, and vector index, and vector index, and I'll show you where we're going to I'll show you where we're going to I'll show you where we're going to put that put that put that information now. We have information now. We have information now. We have this creative this creative this creative vector index. You vector index. You vector index. You just copy just copy just copy it. And then we'll it. And then we'll it. And then we'll add it. Regarding the add it. Regarding the add it. Regarding the vector index, I'll vector index, I'll vector index, I'll ask Jeremy: do ask Jeremy: do ask Jeremy: do you remember where we you remember where we you remember where we put our put our put our vector index?

  30. vector index? vector index? Yes, right in the Yes, right in the Yes, right in the Cypher query window. Cypher query window. Cypher query window. Yes, you are right. You are Yes, you are right. You are Yes, you are right. You are absolutely right. absolutely right. absolutely right. Good. So let's Good. So let's Good. So let's go back. So we'll get out go back. So we'll get out go back. So we'll get out of here. of here. of here. This will depend on This will depend on This will depend on which instance which instance which instance you are using. you are using. you are using. If you If you If you are using an are using an are using an Aura instance, you will Aura instance, you will Aura instance, you will need to need to need to navigate to the navigate to the navigate to the Query interface in the Query interface in the Query interface in the Aura console. So Aura console. So Aura console. So you may you may you may need to open need to open need to open another window. another window. another window. Yes. Yes. Yes. So you can So you can So you can leave your leave your leave your agent or close it agent or close it agent or close it for a minute and for a minute and for a minute and move on to requests. move on to requests. move on to requests. Right. Right. Right. And then you can And then you can And then you can create this create this create this vector index. vector index. vector index. So, as So, as So, as Jeremy mentioned, we're actually going Jeremy mentioned, we're actually going Jeremy mentioned, we're actually going to paste this to paste this to paste this vector index vector index vector index right here into the right here into the right here into the Cypher query window. And so you Cypher query window. And so you Cypher query window. And so you run this, and then run this, and then run this, and then you see that it you see that it you see that it expands this team, expands this team, expands this team, and it...I think it's precisely and it...I think it's precisely and it...I think it's precisely because I've already...No, it's because I've already...No, it's because I've already...No, it's successful. Oh, yes, it already successful. Oh, yes, it already successful. Oh, yes, it already exists. That's right, because I've exists. That's right, because I've exists. That's right, because I've already started it. But already started it. But already started it. But you're going to you're going to you're going to do...you're do...you're do...you're going to create going to create ...you're going to ...you're going to ...you're going to run this command, run this command, run this command, and then it's actually going and then it's actually going and then it's actually going to show you the to show you the to show you the vector index that was created.

  31. vector index that was created. vector index that was created. So once you've already So once you've already So once you've already created this created this created this vector index, you vector index, you vector index, you can go to the can go to the can go to the agent section and agent section and agent section and then, uh, then, uh, then, uh, access this access this access this query that we query that we query that we saw there. So, I'm saw there. So, I'm saw there. So, I'm going to do the going to do the going to do the same thing again, create same thing again, create same thing again, create from scratch. Configure. And from scratch. Configure. And from scratch. Configure. And we are going to we are going to we are going to do the same. Graph rag do the same. Graph rag , great. Autofill , great. Autofill , great. Autofill . Good . Good . Good description, yes. Nice, and description, yes. Nice, and description, yes. Nice, and then we have the then we have the then we have the same request. Perfectly. And same request. Perfectly. And same request. Perfectly. And then we're going to then we're going to then we're going to do the do the do the adding adding adding tool section. Now, tool section. Now, tool section. Now, similar to searching, you similar to searching, you similar to searching, you should see the should see the should see the same prompt. But same prompt. But same prompt. But for the for the for the similarity search tool, we'll similarity search tool, we'll similarity search tool, we'll create a tool create a tool create a tool that says we're that says we're that says we're going to search for the going to search for the going to search for the content of this lesson content of this lesson content of this lesson and we can actually and we can actually and we can actually gather information from gather information from gather information from this lesson without having to this lesson without having to this lesson without having to go through the go through the go through the lesson. Search by lesson. Search by lesson. Search by lesson content. And lesson content. And lesson content. And then we have a description, then we have a description, then we have a description, which I'll also insert.

  32. which I'll also insert. And I'll insert it. And I'll insert it. Make sure Make sure Make sure you have this description as well. you have this description as well. Description of Description of similarity search. Perfectly. similarity search. Perfectly. similarity search. Perfectly. So, now it's in So, now it's in So, now it's in the notes so you the notes so you the notes so you can use it too can use it too can use it too . And . And . And then we'll select then we'll select then we'll select exactly the vector exactly the vector exactly the vector index that we just index that we just index that we just created, this is a created, this is a slice embedding. We'll slice embedding. We'll say we'll also say we'll also say we'll also use use use about the about the about the top five. And then we'll top five. And then we'll top five. And then we'll choose our choose our embedding provider, which is OpenAI. embedding provider, which is OpenAI. Embedding model, Embedding model, Embedding model, we'll just we'll just we'll just use use use text embedding text embedding text embedding with three small with three small with three small snippets. This is snippets. This is snippets. This is great. And then the great. And then the great. And then the default size default size default size is 1536. And is 1536. And is 1536. And then we want to then we want to then we want to make sure that we, uh make sure that we, uh , return , return , return unlinked unlinked unlinked graph data, which is very, very graph data, which is very, very graph data, which is very, very important, especially important, especially important, especially because we're because we're because we're using this, uh using this, uh , graph interface. , graph interface. , graph interface. So we're going to So we're going to So we're going to return this return this return this graph data. And what you want graph data. And what you want graph data. And what you want to do, we can to do, we can to do, we can use use use natural language here, but you natural language here, but you natural language here, but you can also can also can also use use use Cypher itself. But, uh, Cypher for Cypher itself. But, uh, Cypher for Cypher itself. But, uh, Cypher for this Cypher request, uh, this Cypher request, uh, this Cypher request, uh, we have...There's a Cypher request we have...There's a Cypher request we have...There's a Cypher request that we already have.

  33. that we already have. that we already have. I'm trying to remember where it is I'm trying to remember where it is I'm trying to remember where it is . Oh, . Oh, . Oh, is there a light mode? That's a is there a light mode? That's a is there a light mode? That's a great question. Oh, because it's great question. Oh, because it's great question. Oh, because it's so hard so hard so hard to see. Yes, to see. Yes, to see. Yes, let me let me let me make it bigger. make it bigger. Perfectly. So, for Perfectly. So, for this Cypher request, we'll this Cypher request, we'll this Cypher request, we'll take this Cypher, and I'll take this Cypher, and I'll take this Cypher, and I'll be sure to insert be sure to insert be sure to insert it for you all. This is the it for you all. This is the it for you all. This is the Cypher query we Cypher query we Cypher query we are going to are going to are going to use. use. So this is, uh, oh, So this is, uh, oh, actually, I should actually, I should actually, I should just insert the just insert the just insert the Cypher query itself, not just a Cypher query itself, not just a Cypher query itself, not just a link to the link to the link to the Cypher query. Steeply. Good. Cypher query. Steeply. Good. Cypher query. Steeply. Good. So, here's the Cypher that we're So, here's the Cypher that we're So, here's the Cypher that we're going to include going to include going to include in our agent. And what in our agent. And what in our agent. And what we're going to do is we're going to do is we're going to do is insert it here into insert it here into insert it here into our Aura agent.

  34. our Aura agent. our Aura agent. Same Cypher query, Same Cypher query, Same Cypher query, don't change anything, don't change anything, don't change anything, but the point is but the point is but the point is if you look at if you look at if you look at this Cypher query, we this Cypher query, we this Cypher query, we need this need this need this Cypher query to include Cypher query to include Cypher query to include nodes, as you can nodes, as you can nodes, as you can see here, nodes, and see here, nodes, and see here, nodes, and then also scores. then also scores. then also scores. So, nodes and then So, nodes and then So, nodes and then scores or similarity. scores or similarity. scores or similarity. And so, we And so, we And so, we see that this see that this see that this Cypher query specifically Cypher query specifically Cypher query specifically uses nodes uses nodes uses nodes and points in its and points in its and points in its query. But it's a very query. But it's a very query. But it's a very useful query, and I'll useful query, and I'll useful query, and I'll also make sure to also make sure to also make sure to include the link include the link include the link where we got this where we got this where we got this query from so you can query from so you can query from so you can have it for later. have it for later. Perfectly. Good. Now Perfectly. Good. Now we can create we can create we can create this agent, this agent, this agent, right? Or we can right? Or we can right? Or we can add this add this add this specific specific specific tool. Good. tool. Good. tool. Good. So, we have everything here. So, we have everything here. So, we have everything here. We are going to We are going to We are going to use internal use internal , which is free. , which is free. , which is free. We have these two We have these two We have these two tools: tools: tools: lesson content search, then lesson content search, then lesson content search, then similarity search, similarity search, similarity search, and then and then and then Cypher, a natural Cypher, a natural Cypher, a natural language tool. And we're going to language tool. And we're going to language tool. And we're going to create an agent. So create an agent. So , we see the , we see the , we see the GraphRAG Fundamentals agent right here GraphRAG Fundamentals agent right here . So we don't . So we don't . So we don't need to need to need to configure it anymore. But configure it anymore. But configure it anymore. But if you need to, if you need to, if you need to, while we're building while we're building while we're building this knowledge graph, you this knowledge graph, you this knowledge graph, you can update this can update this can update this agent, you can agent, you can agent, you can click the click the click the update agent button, update agent button, update agent button, which will take all the which will take all the which will take all the information from the information from the information from the knowledge graph. So, now we knowledge graph. So, now we knowledge graph. So, now we can can can chat with this chat with this chat with this specific agent. And specific agent. And specific agent. And we can ask we can ask we can ask various, uh, questions various, uh, questions various, uh, questions about this agent. And I would like to about this agent. And I would like to about this agent. And I would like to move move move this further, but I can't.

  35. this further, but I can't. this further, but I can't. But that's okay. But that's okay. But that's okay. So, these specific So, these specific So, these specific questions we can questions we can questions we can ask a lot of ask a lot of ask a lot of different questions, uh, different questions, uh, different questions, uh, and, uh, now you can and, uh, now you can and, uh, now you can learn everything that's learn everything that's learn everything that's actually in the actually in the actually in the Graph Academy course. For example, do Graph Academy course. For example, do Graph Academy course. For example, do we have information on we have information on we have information on how, for example, how, for example, how, for example, temperature affects temperature affects temperature affects LLM? And this will take all LLM? And this will take all LLM? And this will take all the information based on the the information based on the the information based on the knowledge graph that we knowledge graph that we knowledge graph that we created in Neo4j, and only created in Neo4j, and only created in Neo4j, and only that information from the that information from the that information from the knowledge graph to, uh, give knowledge graph to, uh, give knowledge graph to, uh, give you the answer. And I'll you the answer. And I'll you the answer. And I'll make sure that I... make sure that I... And then, the most interesting thing is And then, the most interesting thing is , when people , when people , when people come back and come back and come back and look at look at look at this data catalog later, you'll this data catalog later, you'll this data catalog later, you'll notice that all of these notice that all of these PDFs were from the PDFs were from the PDFs were from the introductory GenAI course at introductory GenAI course at introductory GenAI course at Graph Academy. Graph Academy. Graph Academy. Yes, we taught this at Yes, we taught this at Yes, we taught this at Graph Academy at Graph Academy, Graph Academy at Graph Academy, Graph Academy at Graph Academy, sort of a meta, sort of a meta, sort of a meta, but that's it. but that's it. but that's it. No, that's perfect. And as No, that's perfect. And as No, that's perfect. And as Jeremy mentioned, all of Jeremy mentioned, all of Jeremy mentioned, all of this information this information this information is taught at Graph Academy. is taught at Graph Academy. is taught at Graph Academy. So, you have all So, you have all So, you have all the information in Graph Academy the information in Graph Academy the information in Graph Academy at your fingertips right here in at your fingertips right here in at your fingertips right here in this agent itself.

  36. this agent itself. this agent itself. But, the answer is: But, the answer is: But, the answer is: temperature is a temperature is a temperature is a parameter that parameter that parameter that controls the amount of controls the amount of controls the amount of randomness in the randomness in the randomness in the generated text generated text , right? You have a , right? You have a , right? You have a higher temperature, a higher temperature, a higher temperature, a lower temperature, and lower temperature, and lower temperature, and what that's based on what that's based on ... And then, and also ... And then, and also ... And then, and also sources of information sources of information sources of information where you can where you can where you can learn more in learn more in learn more in Graph Academy... But not Graph Academy... But not Graph Academy... But not only can you only can you only can you query the content of query the content of query the content of Graph Academy, but you can Graph Academy, but you can Graph Academy, but you can do things like do things like do things like get get get aggregated aggregated aggregated information based on information based on information based on Graph Academy. So, we Graph Academy. So, we Graph Academy. So, we can ask can ask can ask questions like, questions like, questions like, how many lessons are in how many lessons are in how many lessons are in this course? And so this course? And so this course? And so typically when you typically when you typically when you build your own build your own build your own proprietary company or proprietary company or proprietary company or develop develop develop pipelines, they often do a pipelines, they often do a pipelines, they often do a pretty poor job of doing pretty poor job of doing pretty poor job of doing this, this, this, as I mentioned about as I mentioned about as I mentioned about aggregation and aggregation and aggregation and concatenation. But, concatenation. But, concatenation. But, let's see. let's see. let's see. We see that there We see that there We see that there are 30 are 30 are 30 different lessons in this particular course, and different lessons in this particular course, and different lessons in this particular course, and it's actually 15 lessons it's actually 15 lessons , but now there are 30 , but now there are 30 , but now there are 30 because I re because I re because I re -ran the -ran the -ran the knowledge graph builder, which knowledge graph builder, which knowledge graph builder, which had the original 15 had the original 15 had the original 15 lessons, and then I lessons, and then I lessons, and then I re-ran re-ran re-ran this builder, which this builder, which this builder, which created 30 different created 30 different created 30 different lessons. So if we, lessons. So if we, lessons. So if we, um, check in Aura, um, check in Aura, um, check in Aura, where we are. Oh, where we are. Oh, where we are. Oh, yes. So if we yes. So if we yes. So if we go back and go back and go back and just ask, just ask, just ask, right? We are beyond this. And right? We are beyond this. And right? We are beyond this. And we just need to we just need to we just need to figure out how many figure out how many figure out how many lessons, then we'll lessons, then we'll lessons, then we'll see that it will see that it will see that it will actually give us the actually give us the actually give us the correct number.

  37. correct number. correct number. And you can even And you can even And you can even just click on the just click on the just click on the lesson node type on lesson node type on lesson node type on the left. the left. the left. Yes. Yes. Yes. For the cheat code. For the cheat code. So we'll see the So we'll see the correct answer, correct answer, correct answer, which is that which is that which is that 15 lessons are here in this 15 lessons are here in this 15 lessons are here in this space, and then, um, space, and then, um, space, and then, um, because I because I because I restarted this, but I restarted this, but I restarted this, but I didn't repopulate didn't repopulate didn't repopulate it inside the thing. it inside the thing. So it says 15 So it says 15 lessons, which is how many lessons, which is how many lessons, which is how many lessons are in, um, lessons are in, um, lessons are in, um, this this this Graph Academy course. Graph Academy course. Graph Academy course. So, Nia, some people So, Nia, some people So, Nia, some people have been wondering, now that have been wondering, now that have been wondering, now that we've gone through the we've gone through the we've gone through the full course, we've full course, we've full course, we've built a knowledge graph from built a knowledge graph from built a knowledge graph from some raw some raw some raw data, we've been connected data, we've been connected data, we've been connected to an agent that can to an agent that can to an agent that can use this use this use this now, now, now, using a using a using a combination of vector combination of vector combination of vector and Cypher queries in the and Cypher queries in the and Cypher queries in the Graph Rag format. They Graph Rag format. They Graph Rag format. They were wondering, can were wondering, can were wondering, can we look at the code we look at the code we look at the code that does this really that does this really that does this really fast? So, um, fast? So, um, fast? So, um, can we look can we look can we look at the code for this at the code for this at the code for this structured knowledge structured knowledge structured knowledge graph builder file graph builder file graph builder file ... ... ... Hmm... Hmm... Hmm... and just quickly and just quickly and just quickly skim through it skim through it skim through it to see its to see its to see its elements. elements. elements. Absolutely. So, Absolutely. So, Absolutely. So, let's move on to let's move on to let's move on to our our our structured structured knowledge graph builder. Perfectly. So, knowledge graph builder. Perfectly. So, here is all the code that here is all the code that here is all the code that creates and generates creates and generates creates and generates this knowledge graph on its own this knowledge graph on its own this knowledge graph on its own . So, we see, . So, we see, . So, we see, and I'll try to make and I'll try to make and I'll try to make it as big as possible it as big as possible it as big as possible without cutting it down. I would without cutting it down. I would without cutting it down. I would like to do a like to do a like to do a word wrap.

  38. word wrap. word wrap. I think you can I think you can I think you can hide the left hide the left hide the left part. part. part. Absolutely. Perfectly. Absolutely. Perfectly. Absolutely. Perfectly. OK. So, we OK. So, we OK. So, we see that here we see that here we see that here we import all the import all the import all the necessary part. necessary part. necessary part. So, OpenAI LLM, So, OpenAI LLM, So, OpenAI LLM, OpenAI embedding, a OpenAI embedding, a OpenAI embedding, a simple KG pipeline, simple KG pipeline, simple KG pipeline, which is our simple which is our simple knowledge graph pipeline, and a fixed-size splitter. fixed-size splitter. But here we have our But here we have our But here we have our Neo4j driver, which is Neo4j driver, which is Neo4j driver, which is practically your practically your practically your core, and when we core, and when we core, and when we say driver, we say driver, we say driver, we actually actually actually mean driver. That's what mean driver. That's what mean driver. That's what generates all this, generates all this, generates all this, right? So, we right? So, we right? So, we connect to connect to connect to our our our graph database using graph database using graph database using this Neo4j driver. This is the this Neo4j driver. This is the this Neo4j driver. This is the easiest way easiest way easiest way to connect, but to connect, but to connect, but then we see here then we see here then we see here that we have an LLM. We that we have an LLM. We that we have an LLM. We say that this LLM say that this LLM say that this LLM is actually the OpenAI LLM is actually the OpenAI LLM is actually the OpenAI LLM that we have here. We that we have here. We that we have here. We also have our also have our also have our embeds here, which is these embeds here, which is these embeds here, which is these OpenAI embeds, and OpenAI embeds, and OpenAI embeds, and then of course we're then of course we're then of course we're going to going to going to use this use this fixed-size text separator, fixed-size text separator, and we have a and we have a and we have a chunk size of 500, and then chunk size of 500, and then chunk size of 500, and then overlapping overlapping overlapping chunks in chunks in chunks in case we case we case we miss something from those miss something from those miss something from those particular particular particular chunks. And then chunks. And then chunks. And then we have some sample we have some sample we have some sample node types. So these node types. So these node types. So these types of nodes here, types of nodes here, types of nodes here, remember, nodes are remember, nodes are remember, nodes are circles, and then we have circles, and then we have circles, and then we have connections, but the nodes here connections, but the nodes here are technology, are technology, are technology, concept, example, concept, example, concept, example, process, challenge, and process, challenge, and process, challenge, and benefit. And then we benefit. And then we benefit. And then we have the types of relationships that have the types of relationships that have the types of relationships that we think are we think are we think are really important really important really important to this knowledge graph to this knowledge graph . So, these are the types of . So, these are the types of . So, these are the types of connections we connections we connections we fill in, but we fill in, but we fill in, but we want these connections want these connections want these connections to focus on to focus on to focus on this, which is about the this, which is about the this, which is about the part part part used in, used in, used in, etc. And then we can

  39. etc. And then we can etc. And then we can see that these see that these see that these patterns, these patterns, patterns, these patterns, patterns, these patterns, this is the node pattern this is the node pattern this is the node pattern that we that we that we see here. And so see here. And so see here. And so we have, for example, we have, for example, we have, for example, technology related technology related technology related to a certain technology, to a certain technology, to a certain technology, right? Or an example right? Or an example used used used in a certain, uh, in a certain, uh, in a certain, uh, technology. So, technology. So, technology. So, after we after we after we put all this put all this put all this sample information in, sample information in, sample information in, we can see we can see we can see that this that this that this knowledge graph builder takes this knowledge graph builder takes this knowledge graph builder takes this knowledge graph pipeline knowledge graph pipeline knowledge graph pipeline and all the information and all the information and all the information to create the knowledge graph itself to create the knowledge graph itself to create the knowledge graph itself . . I mean, that's the I mean, that's the really cool really cool really cool part: it's that, part: it's that, part: it's that, of course, we've made the of course, we've made the of course, we've made the Graph Academy data here and Graph Academy data here and Graph Academy data here and the schema appropriate for the schema appropriate for the schema appropriate for that. But most that. But most that. But most of you of you of you will be using a will be using a will be using a bunch of documents from bunch of documents from bunch of documents from your business or your business or your business or something else, and you something else, and you something else, and you can use an can use an can use an LLM to determine the LLM to determine the LLM to determine the right schema. right schema. right schema. Once you Once you Once you have it, have it, have it, using this using this using this scheme will be a scheme will be a scheme will be a guideline for the LLM. guideline for the LLM. guideline for the LLM. So it won't just So it won't just So it won't just create new create new create new types of nodes and types of nodes and types of nodes and connections, it connections, it connections, it will stick to will stick to will stick to it. it. it. Yes, yes. Perfectly. So, Yes, yes. Perfectly. So, Yes, yes. Perfectly. So, we see that we we see that we we see that we take these, um, CSVs; we take these, um, CSVs; we take these, um, CSVs; we also have various CSV files also have various CSV files also have various CSV files in our data, right in our data, right in our data, right under the data and another CSV under the data and another CSV file, and all the file, and all the file, and all the general PDF files from general PDF files from general PDF files from this lesson, and then this lesson, and then this lesson, and then it's going to it's going to it's going to parse that CSV parse that CSV , and then create and , and then create and , and then create and generate this generate this generate this knowledge graph, in general. So, knowledge graph, in general. So, knowledge graph, in general. So, these are the prerequisites for these are the prerequisites for these are the prerequisites for this constructor, this constructor, this constructor, this this this knowledge graph constructor, which knowledge graph constructor, which knowledge graph constructor, which uses GraphRAG on the uses GraphRAG on the uses GraphRAG on the backend backend backend to create the to create the to create the knowledge graph that we saw knowledge graph that we saw knowledge graph that we saw in, um, Aura. Perfectly.

  40. in, um, Aura. Perfectly. in, um, Aura. Perfectly. Good. Yes. Hmm, that's what Good. Yes. Hmm, that's what Good. Yes. Hmm, that's what we wanted to show we wanted to show we wanted to show you all today. Hmm, you all today. Hmm, you all today. Hmm, Forge and AI. I'll close with Forge and AI. I'll close with Forge and AI. I'll close with a few slides and a a few slides and a a few slides and a few calls few calls few calls to action. Here are some to action. Here are some to action. Here are some recent benefits of recent benefits of recent benefits of using GraphRAG. I using GraphRAG. I using GraphRAG. I mentioned higher mentioned higher mentioned higher accuracy, easier accuracy, easier accuracy, easier development, and development, and development, and clarity, but clarity, but clarity, but overall the best overall the best overall the best place to learn place to learn place to learn more about graphs and more about graphs and more about graphs and GraphRAG is Graph Academy, where GraphRAG is Graph Academy, where GraphRAG is Graph Academy, where you'll find all these you'll find all these you'll find all these different resources different resources different resources for for for free and free and free and hands-on courses. hands-on courses. hands-on courses. Cypher basics if you Cypher basics if you Cypher basics if you want to become an want to become an want to become an expert in Cypher, and expert in Cypher, and expert in Cypher, and building building building knowledge graphs and context knowledge graphs and context knowledge graphs and context graphs. And then on graphs. And then on graphs. And then on Tuesday, or yeah, Tuesday, or yeah, Tuesday, or yeah, Tuesday of this week, Tuesday of this week, Tuesday of this week, we'll actually be, we'll actually be, we'll actually be, or Wednesday. But on or Wednesday. But on or Wednesday. But on July 1st, we will be hosting a July 1st, we will be hosting a July 1st, we will be hosting a meetup at the Digital Garage in meetup at the Digital Garage in meetup at the Digital Garage in San Francisco from 5:00 PM to San Francisco from 5:00 PM to San Francisco from 5:00 PM to 8:00 PM. Please 8:00 PM. Please 8:00 PM. Please join us and join us and please don't please don't please don't hesitate hesitate hesitate to register. to register. to register. Just make sure Just make sure you visit you visit you visit our booth if our booth if our booth if you want to you want to you want to register for register for register for this meeting. We will have this meeting. We will have this meeting. We will have incredible incredible incredible experts in the field of experts in the field of experts in the field of graphs and graphs and graphs and knowledge graphs, including knowledge graphs, including knowledge graphs, including our founder and our founder and CEO Emil CEO Emil Efron, who will be there, Efron, who will be there, Efron, who will be there, and you will be able to and you will be able to and you will be able to ask him various ask him various ask him various questions about questions about questions about building building building knowledge graphs. In addition to the knowledge graphs. In addition to the knowledge graphs. In addition to the technical team, myself, technical team, myself, technical team, myself, Jeremy, Zach, we Jeremy, Zach, we Jeremy, Zach, we will all be there to will all be there to will all be there to answer your answer your answer your questions about your questions about your use cases. But this use cases. But this particular talk is particular talk is particular talk is dedicated to dedicated to dedicated to teaching the why behind the teaching the why behind the teaching the why behind the decisions. So, decisions. So, decisions. So, decisions decisions decisions made made made based on context based on context based on context graphs. And then, graphs. And then, graphs. And then, please visit please visit please visit us at stand P3, which us at stand P3, which us at stand P3, which is right is right is right next to the Microsoft stand. We next to the Microsoft stand. We next to the Microsoft stand. We will be there to will be there to will be there to answer answer any questions you may have. And any questions you may have. And any questions you may have. And thank you very much for thank you very much for thank you very much for coming today. We

  41. coming today. We coming today. We appreciate it. Thank you.

No summary available yet.

View original episode ↗