Skip to main content

Amazon Neptune

Graph and AI

Why graph?

Every organization wants to get value from their data which requires them to query the relationships in their data. If you ever ran a SQL query with a JOIN, you have queried a relationship which defines how data in one part of the system relates to data in another (e.g., customer ID and order number). Relationships can be one-to-one, one-to-many, and many-to-many.

The more data is connected and as the size and complexity of the connected data increases, the relationships become more complex to store and query. Attempting to use SQL to query connected data is futile as multiple JOINs result in performance degradation. Graphs, however, are uniquely designed to query connected data.

If you want to build and deploy generative AI or agentic AI, using connected data is imperative. With generative AI, querying connected data is vital to improve AI accuracy and explainability. For agentic AI, connected data provides the essential contextual information that enables agentic AI to perform complex, multi-step tasks autonomously.

We will dive into knowledge graphs, which are foundational for both generative AI and agentic AI. Then, we will review additional graph types such as fraud graphs for fraud detection, security graphs for cybersecurity, and identity graphs for customer 360. Before we dive, some definitions:

  • Nodes are data points representing entities such as people, products, transactions, and more.
  • Edges are connections between nodes which represent the relationships between the data points.
  • Properties are key-value pairs that store additional information about nodes and edges.
Missing alt text value

Why graph databases?

The most effective way to build and store a graph is to use a graph model and a graph database. Graph databases are designed to store and navigate connected data. They make it easier to model and manage highly connected data, treat relationships as “first class citizens”, have flexible schemas, and provide higher performance for graph traversal queries.