About this talk
This talk explores the integration of AI agents with knowledge graphs, emphasizing why they complement each other effectively. The speaker discusses Neo4j, a graph database technology, and its applications across various sectors, including finance and manufacturing. They delve into the structure of graphs, highlighting how nodes and edges represent entities and their relationships, respectively. The importance of context and domain knowledge for AI agents is underscored, along with advancements in context graphs, which enhance decision-making capabilities by incorporating policies and rules. The session also introduces Aura Agents, a tool for building AI applications using knowledge graphs, showcasing a practical demonstration based on crime data. Attendees are encouraged to participate in a global hackathon to further explore these technologies.
Full transcript
Excited to share with you one of the very close to uh topics to my heart which is uh agents and knowledge graphs. So, we'll be exploring today actually why uh AI agents love knowledge graphs. So, how do these two things two stories plug and play together? I would like also to give a big shout out to my peer Alex here in the back who made this all
possible. So, so yeah, let's kick it off. So, uh I would like to start first um for those um here with us today, who has heard of Neo4j? Okay, quite some some people. That's amazing. So, uh for the for the for the newcomers, um we say always that uh that um graphs are everywhere. So, basically here we have a graph of an organization. Um we see in
every organization, there is an opportunity to apply a graph there. So, this is a perfect replica of a digital twin of an organization where you can see you can have a graph for employees. If the company has a supply chain engagements, um you have of course um a finance department. And there and if you'd like to to better dive more into the the the interaction between your
between your employees and then the products and so on and so forth. A very exciting um customer engagements we have with Neo4j is also uh the fi- the finance sector. So, a lot of our customers come usually from the the banking space. So, they they are banks. So, usually they they deal with with anti-fraud, with with anti-money laundering, and fraud detection. So, it's really exciting to basically
the the deeper you get um into the graphs, like you can you can uh you can you can see all the the transactions um and the suspicion the the potential suspicious transactions banks can can can untie with with graphs. For suppliers, it's very exciting also like we work a lot with with aircraft manufacturers. you know, like an aircraft manufacturer builds aircrafts that have different components, systems. Um
airports, they need to work with engines, you name it, um and so on and so forth. So, the deeper we get basically, the more complex the data gets. um the deeper the data gets, we want always then to explore more and more how these components um connect and interact with each other. Okay, hopefully good. As everyone as every company on the planet is talking about AI, Neo4j
has its own piece of cake um in the AI um in the AI era where we can where we perfectly plug into. So, we realize when we start developing LLMs or AI agents that these systems are very good in their own creativity. They can Yeah, they are very good in in like language human language interaction, and they give you good good good reasoning. But one big gap
here we realize that our big challenge is that today's agents or they lack the the right domain knowledge, the right tools, and the context. So that's why we would plug a knowledge graph into these so that you would be able plugging a knowledge graph, plugging a graph into your AI system, agent, LLM, you name it, you would be able to enrich more the the provide the the
right tools, and provide the the right context. So it's exactly plug and play. That's why we are we have this metaphor of a brain. basically the right side of the um of the brain um the left side, sorry, it's is is responsible for creativity, and the right side is for like yeah, uh for for for uh cognition. What is a graph made of? Um so what are
the the core components basically of a graph? Um personally when I used to to learn back in the days about graphs, it's was one of the big big and most challenging topics I used to uh to learn about in in in in data data structures and algorithm class in university. Who identifies with this? Okay. Neo4j makes this very easy and handy to learn. Basically a graph is
easy made of of nodes and edges. Edges are in this case relationships, and nodes represent uh things, facts, and objects. And we want basically to connect these nodes together and see then how these relate with each other. We can then store in every of these stages also properties like data. You can also store vector embeddings. You see here like how how Don is connected to a car.
So he he drives a car but his girlfriend Anne owns the car. So there's a very example how you can yeah, bring a graph to life. And this is the core a knowledge graph. So in a knowledge graph basically it would be then storing all um necessary data about uh the domain knowledge, the all the things we we discussed before like uh places, events, and facts, and
so on and so forth. And so because we are interacting with a similar very simple, let's say, efficient and data structure, it's very easy to learn to to interact and understand and read content from. And then a knowledge graph at the end of the day represents a digital twin of an So for the last um 6 months we have been talking always, we also have been hearing
about the big momentum um of Cortex engineering. In Cortex engineering, when we talk about Cortex engineering, it's basically the best practices we we explore to to build the AI systems that have the right knowledge basically um and tools to help basically users uh achieve their their their tasks and goals. And this basically incorporates we need to build uh we have we need to have a rag in
uh a rag component so an opportunity where the AI agent can retrieve the the the data from the data source in this case. Uh we need to um have um a way to to store uh the history and memory. There's also different kind of memories where we can we speak about short-term memory and length long-term memory. So in a short-term memory we we store all things short-term
uh conversations uh and sessions you when you when you talk and with an agent. And also long-term memory in this case um you are storing global uh global data like about in uh about employees, about organization. generalized data that an AI agent can that can retrieve. And also of course uh you need to um to master a bit prompt engineering. So basically crafting in an uh in
a very nice precise way a good um good prompt to shoot it to the agent to offer it and uh um task. And then last but not least structured this is basically we need to to identify the right tools to help us basically retrieve then the right uh results, right outcomes, and right out. So we've been like uh also hearing about a lot of MCP tools, MCP
servers where you can populate tools that you can achieve certain tasks uh with. But now since uh February, we have been there has been also a new momentum called context graphs. I would personally I would see this as extension to our story we have been talking about in in context engineering. So, in the context graph, you would be basically storing of data related to to decision-making, policies
and rules. So, that then the AI agent can really have an option to reason and make decisions when it want to um achieve certain uh tasks. So, we are not only storing knowledge and retrieving knowledge, but also like we're storing an additional layer of of data made of policies and rules to help agents basically Yeah. Um decisions, basically. And of course, all based on on the fundamental
model of of a graph made of relationships um and nodes. And we realized um until now when we have been also talking about context engineering, moving then to context graphs, um we are basically solving the missing why. So, it's good and nice to give um agents the right knowledge, but when we give them all of these rules and policies, basically, the agent can do decisions, basically. So,
it based on these reasonings um we are solving the basically why an agent need to to approve, for example, a credit for for a person XYZ in a bank. Uh which was which is not possible if you are like only uh populating knowledge on the on the graph. So, we need policies, we need rules of an organization, basically, to help agents to to drive right decisions. And
the connected uh reasoning to these. And a very good example of applying context graphs is also like memory. So, um um you would also then uh build a knowledge graph that uh that saves memory here, like populates the short-term memory, long-term memory, and then accordingly, based on the previous interactions and agent uh can have been have been doing with the with the user, it then can predict
and do then the right engagements. another very uh very interesting aspect here when we start building um our uh AI applications, we need to we are we are also moving into route rag into agentic graph rag in this case. So, in this case, um this is a fundamental approach if you would like to start building an agentic application. Neo4j with um um exactly. So, it's it's everything's
basically starts with a user that shoots a prompt to the NLM, to the agent, to the agent starts looking if that um if it has the the right content in its knowledge base. That's the case, it's great. Then we don't need to to jump to to the to the graph data to the graph database. If if we need then we could go then to if it didn't
find the right content, we jump basically to to the tools we provided on the speed server. So in this case we have varieties of of tools like like text to Cypher. that would allow us to to interact with the database. So basically translating the the user human language to um to Cypher, which is our query language. Um to to retrieve then the right content, and then we
go back and then hopefully provide the user with a more qualitative um um yeah. answer. So earlier earlier this year also Neo4j um released something called um Aura Agents. So you've been If you're coming, I don't know, maybe from the Microsoft ecosystem you've been hearing from Foundry Agents or Foundry Agent service. So we also have our own story in Agents for Agents. So um Neo4j uh or
on the Neo4j console you can also out of the box build Agents So one of the big challenges um developers usually have, okay, they start building the knowledge graph uh somehow. they need also then to to start learning uh to to interact and retrieve and write data into How much? Sorry, again. Okay. Uh uh and retrieve the the data from from the agent from from the graph.
So an Aura agent basically to plug into a knowledge graph uh and then retrieve the right content based on the on the architecture that we saw before. We provided the right um the the right Neo4j and CP tools. Uh it develops also the ontology basically the um the schema according to to the knowledge graph. And then starts basically um interacting with a graph and retrieving the uh
the right content. You can give also the agent so for the agent you also give different tools. So we can provide it also uh Cypher templates um and takes Cypher similarity search uh tools so to basically help the agent retrieve then the the right task. So very interesting here is auto also the the Cypher template so you uh it can also out of the box translate let's
say a human language to Cypher which also already works very well out but providing additionally a Cypher example Cypher template um would would help the agent basically extend the the the the reasoning the reasoning to become much better. So uh another cool example here in in Aura agents um we'll have on it I would I would say let's jump directly to uh to the demo quickly. So,
the case I choose for today is something called Paul. So, it stands for person, object, location, and events. So, this is one of basically um fundamental um schemas uh that let's say police departments and that usually used to to anti crimes, basically. So, these are like the core components if you'd like to identify criminals. And we built a knowledge graph based on this. So, we have this
um repository where we have example data of crimes that happened in in London. So, out of the out of this we um built load. This So, this is the Aura console. um our cloud hosted version of Neo4j, which allows you So, you start your journey with Neo4j by kicking off an instance, which you can get um for free. Uh you you host it somewhere um on the
on the planet of depending also on your cloud provider. We also basically work together with all the hyperscalers, Azure, Google, and and Amazon. So, I created my Yeah, my my my data set, dumped it into into the instance. And then connecting to it. So, see. Connected. Okay. It's running. So, this is our Bloom tool that visualizes the the graphs. On the right side, you would see all
the that we got from from the data set. From area, crime, email, location, object, and so on and so forth. And then, okay. So, now we built the the I'm just getting started with graphs. I want to to explore or plug an agent into it to help me basically retrieve the the right So, I already created here my Aura agent. Let's have a closer look how this
looks like behind the scenes. We provided it Yeah, this is assistant message what it should do. Basically, I describe the case here that it's an agent that needs to retrieve certain details from um the the knowledge graph. So, here we have internal um internal use that you can basically prototype and test things here in the in the console directly. And And very cool approach here is also
you can publish your Aura agent as an as an FCP server or as um as a REST API. So, you can use in further production with your agent frameworks. And here are basically the the tools. So, I would just give it here a simple ask, give me the schema of So, here it recognized also the right uh the right tool. So, translated the my ask to um
to uh to Uh so, next question would be what's highest in London basically. Okay. So, we can like you I can always go deeper and deeper according to um to the um yeah, to the tools I have and to the to the system prompt. Cuz of time purposes, I start need I need to start uh wrapping up. So, all of these things you can start today exploring
for free. Uh depending on your case, we also explored what's what's possible on the on the seven grounds of Neo4j. So, I would recommend you just start building today. So, we also have um at the moment an ongoing um hackathon, global hackathon uh for Aura agents. It's very easy to join. So, you can start exploring the the the the Aura agents uh course. You would receive uh
credits if you uh if you if you finish the um the course immediately. And if you submit um a hackathon project, you would win a t-shirt. So, um it's very easy the the course is also on our long, I think, 1 or 2 hours. So, plug and play, start building today. And if you would like to stay connected to learn more about Neo4j and graph technology, start
further start building on your knowledge, um start exploring Graph Academy. It's our in-house school that is built by the the biggest graph experts um at Neo4j. So, it's for free, you get free certificates or free certifications, free knowledge to basically scale your knowledge. Thank you so much.
More from this event
See all 126 talks →
AI Is Not the Risk. Architectural Drift Is - Sunil Kalkunte
17:39
Breaking the Monolith: Tesco’s Journey to Federated GraphQL with xAPI - Vishwas Chandrashekar
29:13
A Practical Introduction to LangChain4j - Venkat Subramaniam
1:01:28
Beyond the AI Models: How Lowe’s is Building the Store That Knows - Swaroop Shivaram
13:59