← All AI Engineer talks

AI Engineer World's Fair 2025

The Knowledge Graph Mullet: Trimming GraphRAG Complexity

Read the talk

The Knowledge Graph Mullet: Trimming GraphRAG Complexity

Combine property graph modeling with RDF triples, use search to enter a connected news graph, and expose that graph to agents through DQL and MCP.

From a talk by William Lyon

Before you start: Familiarity with basic database queries, JSON and embedding-based retrieval will help; no prior Dgraph or RDF experience is required.

Property graph in front, RDF triples in back

The mullet promises a practical combination: short hair in front, long hair in back, with little maintenance and enough versatility for different settings. William Lyon carries that familiar 1980s–1990s haircut into database architecture: property graph in the front, RDF triples in the back. The question is whether a graph system can offer a convenient model for developers while organizing its underlying data differently.

Illustrated mullet with graph nodes over the short hair and triple labels down the long hair, beside the property graph and RDF tagline.
The Knowledge Graph Mullet: property graph in the front, RDF triples in the back.

The two graph traditions usually arrive with different vocabularies and tools:

TraditionCore conceptsTypical query approach
Property graphNodes, relationships, key-value propertiesPattern matching with Cypher
RDFSubject–predicate–object triples, ontologiesSPARQL in the semantic web and linked data ecosystem

The hybrid keeps the property graph as the way developers model and query their domain, while using triples underneath. Lyon presents this as a way to combine ease of use with RDF-based scalability; the walkthrough explains the architecture rather than measuring a scaling advantage.

0:140:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:14 · section reference included

Give the things in the graph an identity

Dgraph is the open source implementation used throughout the walkthrough. Start with Lyon’s working definition of a knowledge graph: an instance of a property graph. Nodes have one or more labels that identify their kinds, somewhat as tables group records in a relational database. Relationships have a type and direction, and the general property graph model permits key-value properties on both nodes and relationships.

A useful graph says more than that two records are related. A talk has a topic or was presented at a conference: the relationship encodes the meaning of the connection. This leads to the “things, not strings” framing Lyon recalls from Google’s 2012 Knowledge Graph introduction. A canonical entity gives multiple references to the same thing a shared destination, so traversals can follow its connections instead of merely matching its name.

Dgraph slide linking Topic, Talk, Conference, Person and Company nodes, with the phrase “Things, not strings.”
A knowledge graph connects typed entities through explicit relationships.
2:412:56
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:41 · section reference included

Represent connections as triples

The D in Dgraph stands for distributed, reflecting its early emphasis on handling large volumes of graph data. Lyon dates its initial open source release to 2017 and describes former Google engineers drawing inspiration from “Google Spanner Graph.” The historical distinction is that Dgraph’s 2017 release announcement dates version 0.1 to December 2015 and identifies 2017 as the first production-ready release; it names Bigtable and Spanner as influences. Google’s named Spanner Graph offering arrived in 2024.

Dgraph combines property graph modeling with RDF interchange, treating a triple as the smallest unit of record. Each triple has a subject, predicate and object. The subject identifies a node. The predicate names either a relationship or a property. The object is another node for a relationship, or a literal value for a property.

Assigning each node a unique identifier, or UID, makes that representation concrete. Consider an illustrative article with two topics:

ntriples

<0x1> <title> "City news" .
<0x1> <topic> <0x2> .
<0x1> <topic> <0x3> .
<0x2> <name> "Housing" .
<0x3> <name> "Transit" .

Here, 0x1 identifies the article. Its title predicate leads to a value; its topic predicate leads to other UIDs. Lyon describes a UID as a pointer mapping to an on-disk offset. Treat that as an intuition for locating a node, rather than a literal description of the documented key-value storage layout.

The storage optimization is a posting list. For the example above, the list for (0x1, topic) contains 0x2 and 0x3, allowing traversal to follow the article’s topic connections together. More precisely, Dgraph’s posting-list documentation groups entries by both subject UID and predicate; grouping posting lists across subjects by predicate forms a tablet. A posting list can contain target UIDs or literal values. This is the concrete organization behind the talk’s explanation of grouping connected nodes for efficient traversal.

4:234:43
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:23 · section reference included

A DQL query describes where to start and what to follow

Dgraph’s query language, DQL, takes inspiration from GraphQL, which Facebook open sourced shortly before Dgraph emerged. Its nested syntax describes a graph traversal, not just a collection of fields. Every traversal begins with explicit root criteria, often backed by an index that finds the starting nodes. The selection set then specifies both properties to return and relationships to follow.

Using the same illustrative article and predicates, a UID supplies the starting point directly:

graphql

{
  article(func: uid(0x1)) {
    uid
    title
    topic {
      uid
      name
    }
  }
}

The outer selection returns the article’s UID and title; the nested topic selection follows its topic edges and returns each topic’s UID and name. DQL returns JSON shaped like that selection set, so the query structure also describes the structure the application receives.

7:387:57
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

7:38 · section reference included

Turn a news article into a connected data model

A New York Times article provides the next modeling exercise. Its text mentions people, organizations and topics. It also has an author and images. Those elements can become nodes, while the unstructured text needs a chunking strategy. Semantic structure could guide the boundaries; for this demonstration, each paragraph becomes a chunk node.

The article node holds its URL, publication date, title and abstract. Edges connect it to authors, topics, organizations, people, geographic areas and images, alongside its text chunks. Shared entities make the graph useful beyond a single document: follow an article to a topic and then to other articles on that topic, or use a geographic area to connect reporting about the same place.

News article beside a graph with a central Article node connected to Author, Topic, Organization, Person, Geo, Image and three Chunk nodes.
A news article connects to entities, images, geography and text chunks.
9:019:22
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:01 · section reference included

Search is the entry point, traversal supplies more context

Calculate an embedding for each paragraph chunk and store it as a node property. A query embedding can then retrieve nearby chunks in vector space. Lyon calls this the lexical graph: the document-and-chunk side of retrieval. In a basic vector RAG workflow, those retrieved chunks become prompt context.

GraphRAG continues beyond the initial matches. From a retrieved chunk, traverse to its article, then to relevant topics or organizations, and onward to other articles connected to those entities. These additional articles can contribute context even when their text was not among the initial vector matches. The domain graph makes explicit relationships available to retrieval.

Vector similarity is only one possible starting point:

  • Geospatial search: Find geographic areas within a region or near the user, then follow their connections to news articles.
  • Image similarity: Use an image embedding to locate a relevant image, then traverse its connections.
  • Text similarity: Enter through embedded chunks and continue through the article’s domain relationships.

The common mechanism is an indexed entry into a subgraph followed by traversal that gathers model context. Choosing the entry point and choosing the traversal are separate parts of retrieval design.

10:4111:01
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:41 · section reference included

Explore the retrieval paths in Ratel

Ratel is Dgraph’s query workbench: it executes DQL and displays both graph visualizations and query results. The demonstration begins with an article count, then retrieves the first ten articles and follows their topic connections. The visualization makes the shared topics visible. A subsequent query filters articles by publication date before traversing to the geographic areas they mention.

The geographic query searches within 50 kilometers of New York City, then follows connections to articles; Lyon points out Manhattan and Brooklyn in the results. The next query enters through vector similarity using an embedding Lyon tentatively identifies as the phrase money laundering. From the matches, the query retrieves connected topics, geographic regions and organizations.

Adding another traversal through shared topic nodes retrieves further articles that may not have appeared in the vector search. This is the earlier GraphRAG mechanism expressed as a database query: initial similarity narrows the starting set, and graph relationships expand the context. Ratel’s graph view supports exploration, while its JSON view exposes the selection-set-shaped data an application would consume.

12:5013:09
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:50 · section reference included

Expose database operations through MCP

After the query walkthrough, Lyon reports that the release being presented brings Dgraph’s enterprise features into a single open source release. The next feature is its MCP server. He introduces Model Context Protocol with a diagram from an Anthropic and DeepLearning.AI course recommended for learning to build and deploy MCP servers. For this database workflow, MCP exposes tools through which a model can interact with data.

MCP Client and MCP Server boxes connected by a two-way arrow above columns describing tools, resources and prompt templates.
MCP connects clients and servers through tools, resources and prompt templates.

The demonstrated Dgraph integration separates access into two interfaces:

InterfaceOperations described in the talk
Read-onlyInspect schema and execute queries
FullQuery and inspect, plus mutate data and alter schema

That distinction determines whether a model can inspect an existing graph or also change it. Lyon describes a server associated with each Dgraph instance. In coding environments such as Windsurf or Cursor, schema and data access can inform generated CRUD endpoints and DQL queries. In Claude Desktop, the same connection supports exploratory analysis through generated queries and retrieved results.

15:2815:40
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:28 · section reference included

Create data, query it back, repair the missing edges

The hosted setup in the recording proceeds through Hypermode and Claude Desktop:

  1. Create a Hypermode graph, which deploys a Dgraph cluster with an MCP endpoint.
  2. Copy the MCP configuration shown alongside the Dgraph connection string.
  3. Paste it into Claude Desktop’s developer configuration.
  4. Restart Claude Desktop to expose the Dgraph tools.

These are the interfaces shown in the recording; current availability of the hosted workflow is not established by the present Hypermode homepage.

The task is to create fictitious e-commerce customers, products and orders. Claude first inspects the schema and finds an empty database. It then generates the graph schema connecting those entities and issues mutations to populate it with customer information, products and orders. The division of responsibility matters: the model writes the database operations, and MCP tools execute them.

Creation is followed by verification. Claude generates DQL queries to inspect the resulting data, discovers missing relationships, and adds a corrective mutation. That visible loop—inspect, generate, execute, query back, repair—also makes the interaction useful for learning a database. The schema, mutations and queries remain available to study even though the user did not have to write them first.

18:0718:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

18:07 · section reference included

Inspect the graph and compare recommendation strategies

Next, Claude generates a query to fetch graph data and JavaScript to visualize it. The interface offers a schema view, customer-and-order views, and product inspection. These views let the user move between the kinds of entities in the model and their concrete connections.

Dgraph Schema & Data Visualization in Schema Only mode, connecting Customer Entity, Order Entity, Order Item Entity and Product Entity nodes.
Claude’s generated visualization shows the e-commerce schema.

The generated visualization offers force-directed, hierarchical and radial layouts. Lyon stays with the force-directed layout and asks for personalized product recommendations. Several graph traversals can support that task:

  • Collaborative filtering: Find similar users, then identify products they bought that the target user has not bought.
  • Content-based recommendations: Use the target user’s purchase history to identify product attributes that may interest them.
  • Demographic recommendations: Use demographic relationships or groupings to inform suggestions.

Claude generates queries for the different approaches and explores combining them into a single database query.

The first approach produces a query error, and Claude iterates until results return as expected. The final deliverable is an HTML report showing the recommendation approaches, their results and the DQL used for each. Keeping the query beside the output gives the user a way to inspect how each recommendation was produced.

21:0721:23
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

21:07 · section reference included

Add orchestration and a runtime

A graph stores the data, and MCP exposes operations to a model. Building an agent application also requires orchestration: logic that coordinates models, data, tools and ongoing work. Hypermode’s open source Modus framework supplies that layer in the demonstration. Lyon describes both SDK abstractions and a runtime intended for many stateful, long-running agents. The public repository was subsequently archived on September 11, 2025.

Modus lets developers write logic in Go or AssemblyScript and compile it to WebAssembly. Application types and function signatures are used to generate a unified GraphQL schema and API. The runtime executes the compiled logic in a sandbox, while hiding the WebAssembly mechanics from the application developer. The SDK defines how application code interacts with models and data; the runtime provides the execution environment.

24:0624:15
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

24:06 · section reference included

Configure an agent with a prompt and connections

Hypermode Agents brings together the Modus orchestration layer and Dgraph with a prompt-based setup. In the final demonstration, Lyon opens the Threads tab and creates Bob Loblaw, a social media intern for the marketing department. The prompt gives Bob a specific job: explain technical tooling and concepts to developers through short social media snippets.

Lyon selects GPT-4.1 to orchestrate the agent. Although he calls it a reasoning model, OpenAI classifies GPT-4.1 as non-reasoning; selecting tools does not change that classification. He then connects GitHub, Notion and company documentation through Ref. These MCP connections expose service tools authorized to act on his behalf, giving the prompt-defined agent access to its working environment.

26:1526:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

26:15 · section reference included

Ground the posts in source files, then save the drafts

Bob’s task is to analyze the HyperNews repository, which contains tooling for importing, building and querying the news graph shown earlier, and turn its implemented features into social media posts. The repository’s current README places embeddings on Article nodes, so it should not be read as an exact reconstruction of the paragraph-chunk model in the recording.

The visible GitHub MCP calls first search for the repository and then retrieve specific file contents. Bob uses those files to draft posts explaining the repository’s features. Lyon asks for relevant code snippets, prompting another round of source inspection. The updated posts include DQL queries, Go code using the Modus SDK and terminal commands where appropriate. The follow-up request changes both the output and the evidence the agent retrieves to produce it.

Lyon then asks Bob to save the posts to Notion so they can be queued for later use on Twitter. He supplies the destination: his private scratchpad page. Through the authorized Notion MCP connection, Bob updates that page, and Lyon switches to Notion to show the saved posts and code snippets. The demonstrated delivery is a set of drafts in Notion, not publication to Twitter.

28:1628:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

28:16 · section reference included

Continue from the prompt into code

The prompt and MCP connections establish the first working agent, but they do not define the limit of its behavior. Lyon shows an eject-to-code path that exposes the Modus code running the agent. Developers can then add more complex logic or additional connections using the underlying open source tooling. Hypermode Agents was presented as an early-access offering at the time of the recording.

Slide showing a team agent panel beside a code example, labeled “Publish to your team” and “Eject to code,” with an early-access QR code and link.
Hypermode Agents offers publishing to a team or ejecting to code.

This completes the progression from graph representation to an agent application: property graph concepts describe the domain, triples organize its data, traversals retrieve connected context, and tools let a model work with that data and other services. The closing slide points to early access, while Lyon directs viewers to the slides and video-description resources for continuing the examples.

31:0231:26
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

31:02 · section reference included

Resources

From the talk

  • News knowledge graph example with Dgraph schemas, sample RDF, Modus integration and a news exploration interface.

  • Configuration examples for Dgraph's read-only and read-write MCP endpoints and Claude Desktop integration.

  • WebAssembly-based framework for AI applications in Go and AssemblyScript. The repository was archived in September 2025.

Read the complete timestamped transcript
  1. 0:00

    Hey everyone, my name is Will, and in this talk we're gonna be learning all about the Knowledge Graph Mullet and how it can trim graph RAG complexity. Uh, let's jump right in.

  2. 0:14

    So bear with me a little bit in this analogy, uh, but if you're famar- familiar with the mullet haircut, this is a classic business in the front, party in the back, uh, sort of short up front, long in the back, uh, hairstyle that, uh, was popular in the, in the '80s and '90s.

  3. 0:33

    And if we think of like, what are the benefits of the mullet haircut, it's really all about low maintenance, easy to work with, but versatile and adaptable in different environments.

  4. 0:46

    And if we extend that analogy to knowledge graphs, that gives us the Knowledge Graph Mullet, which is all about property graph in the front and RDF triples in the back.

  5. 1:00

    So really what this talk is about is combining concepts from the property graph world and the RDF world to have a hybrid and versatile approach for working with knowledge graphs.

  6. 1:18

    So if you're familiar with the graph ecosystem at all, you've probably heard some of this terminology, but property graph and RDF are typically thought of as two totally different paradigms for working with graphs.

  7. 1:35

    Uh, in the property graph world, we're thinking about nodes, relationships, key value pair properties. We're thinking about traversing the graph using pattern matching, uh, often with a query language called Cypher.

  8. 1:52

    In the RDF world, we're typically talking about, uh, ontologies using a query language called SPARQL, thinking about triples. Uh, RDF comes from the semantic web and linked data world.

  9. 2:10

    And what I wanna show today is that really these concepts can be used together, where we can really leverage the benefits and sort of best of both worlds, uh, to again expose a property graph model for how we want to think about and query the data, but leverage the scalability

  10. 2:34

    of RDF triples, uh, in our knowledge graph system.

  11. 2:41

    We're going to take a look at an open source project called Dgraph to, uh, work with our knowledge graphs. Um, let's talk about really like a working definition of knowledge graph, first of all.

  12. 2:56

    So we're gonna say that a knowledge graph is really just an instance of a property graph. So the property graph model is all about nodes. Nodes can have one or more labels, which is a way to, uh, tell us what type of node, uh, we're talking about, a way to group nodes.

  13. 3:17

    You can think of labels as kinda similar to like tables from the relational database world. Uh, and then we have relationships that have a single type and direction, then we can store arbitrary key value pair properties on nodes and relationships.

  14. 3:37

    And the, the semantics, right, so how our entities are connected is encoded in the data model. We don't just say that two nodes are related to each other. We say that this talk has, uh, a certain topic, or this talk was presented at a conference, right?

  15. 3:59

    We're talking about things, not strings, which was the, the title of Google's blog post in 2012 introducing the Google Knowledge Graph. But I think that's, I think that's right.

  16. 4:11

    I think that's one of the most important pieces of thinking about knowledge graphs, is that we have a canonical representation of the thing.

  17. 4:23

    Dgraph was first open sourced and released in 2017, and, uh, initially was really optimizing for large scale graph data, so the, the D is for distributed, and scale in terms of volume.

  18. 4:43

    Uh, so the original Dgraph team came from, uh, ex-folks from Google that were inspired by, uh, Google Spanner Graph. Dgraph is this really interesting sort of hybrid in this world of graph databases where we use the property graph model for, uh, data modeling and querying, uh, but we use RDF,

  19. 5:08

    uh, for data interchange, and we work with triples as the smallest unit of record. So if we take a look at these two paradigms that we're talking about, the property graph model, uh, where nodes, node labels, relationship types, and key value pair properties are sort of the, the core fundamentals of the data model.

  20. 5:33

    And if we compare that with RDF, which is all about triples, so subject, predicate, object, which we can think of as like a sentence. Uh, the subject, this is always going to be a node.

  21. 5:47

    A predicate can be a relationship or a property. And then an object in the case where, uh, the predicate is a relationship, is a node, or the value of a property

  22. 6:02

    Let's look at how Dgraph works with both property graphs and triples. So the first thing we need to do to model a property graph as an RDF triple is to have a unique ID for each node.

  23. 6:18

    The unique ID maps to some offset in disk so that we're able to traverse the graph very quickly and efficiently.

  24. 6:30

    Then the next piece is, again, to, uh, think of our node as the value of our unique ID. So the subject we said is always gonna be a node, and, uh, really specifically, it's always going to be a unique ID.

  25. 6:48

    That's like a pointer to the node. Then the predicate is going to be, uh, a relationship or a property. And in the case where it's a relationship, then our object is going to be another, uh, node ID.

  26. 7:06

    So this is going to be a predicate that connects two nodes as a relationship, or it's gonna be the value of our property. Dgraph uses an important optimization called a posting list, where we are, uh, grouping by predicate and, uh, using a list of the unique node IDs of all the nodes that this node

  27. 7:30

    is connected to by that predicate. So this allows us to traverse the graph, uh, very efficiently.

  28. 7:38

    DQL, uh, we said, is the query language that we use with Dgraph. Uh, DQL was very much inspired by GraphQL. GraphQL was, uh, open sourced by Facebook shortly, uh, before Dgraph, uh, was released.

  29. 7:57

    And, uh, at that time, there was a lot of interest in, uh, exploring GraphQL beyond its intention as an API query language. So we can see some similar concepts from DQL.

  30. 8:12

    Uh, we start every DQL graph traversal with a well-defined starting point, so that's our root criteria here, where we're often using an index to find the nodes as the starting point for our traversal.

  31. 8:27

    Then we use a selection set structure, which is this nested structure that, uh, specifies both the properties that we want to return to our query, uh, but also this nested structure represents a traversal in the graph.

  32. 8:47

    Similar to GraphQL, the data returned from a DQL query is JSON that matches the structure of our selection set. Let's take a look at an example, uh, using news data.

  33. 9:01

    Uh, so how would we create a knowledge graph of news articles? So here's an example from The New York Times. Uh, so we have, uh, a news article, and if we think of what sort of graph model we would build from this, well, we would think of the, uh, entities that are mentioned, like what are the organizations,

  34. 9:22

    the, uh, people, the topics that are mentioned. We might model those as nodes in the graph. We also have, uh, the author. We have images to think of. And we also have unstructured data to work with in the graph.

  35. 9:37

    Now, there are different approaches for how we might chunk and embed unstructured data, uh, maybe using the semantic structure of the article. In this example, we're just gonna say every paragraph is a chunk, uh, and we're going to model those chunks as nodes in the graph.

  36. 9:59

    So here's a graph model, uh, that we're gonna use to represent our news knowledge graph. We have an article node that represents the article itself. It u-- It has a, a URL, a publish date, a title, an abstract.

  37. 10:13

    But then we have, uh, the author of the article, topics that may be mentioned in the article, organizations that may be mentioned. Uh, we also have geographic areas that might be mentioned in the article, uh, and images, uh, as well.

  38. 10:29

    So you can see how we can traverse from the article to the topic node to then other articles that have the same topic or that mention the same geographic location.

  39. 10:41

    Now, we mentioned, uh, chunking and embedding earlier. Uh, what we're gonna do is calculate an embedding of each chunk and store that as a node property. This will allow us to use vector search as an entry point for our graph.

  40. 11:01

    So, uh, vector similarity search gives us an entry point into the graph. We can think of this as the lexical graph, where we're identifying chunks of a document that are, uh, close to vector space, uh, of a embedding of our query.

  41. 11:20

    But that's just the start in GraphRAG. Uh, in a naive RAG approach, we would do the vector search to find these chunks. That document would th- then be injected into the prompt to add, uh, context.

  42. 11:33

    But in GraphRAG, that's just the starting point. Then we traverse through the graph to the article nodes, to the topics that are relevant for this article, to other articles that have the same topic or that mention the same organization.

  43. 11:50

    Um, and again, that's just one entry point. The, uh, other entry points might be using a geospatial index. Maybe we want to find all of the, uh, news about, uh- Areas within a certain region or find news articles, uh, near me, and then traverse the graph to find other relevant

  44. 12:15

    articles that become context for, uh, for our model. Similarly, we might have, uh, an image embedding model where we're doing, uh, image similarity search as well, again, just as an entry point.

  45. 12:30

    So I like to think of GraphRAG really being all about different subgraph entry points, where we have this concept of the lexical graph for vector search with unstructured data, uh, the domain graph that we're sort of traversing through to find relevant context for the model.

  46. 12:50

    Let's take a look at a hands-on example of actually using this data, uh, with Dgraph. This is a tool called Ratel, which is a query workbench for Dgraph. Uh, we can execute DQL queries and work with and visualize the results.

  47. 13:09

    Our initial query was just a simple count of the number of articles. Let's look at a more complex query, uh, where we are searching for the first ten articles, then traversing the graph to find topics connected to those articles.

  48. 13:25

    So we can, uh, inspect the graph in this graph visualization to have an idea of how these topics are connected to articles. Let's look at a more complex example.

  49. 13:38

    Uh, so here we are filtering for articles that are published after a certain date and then traversing to the geographic areas mentioned in those articles.

  50. 13:53

    Let's see how we can use the, uh, geographic distance search in Dgraph. So here we're looking for geographic areas in the news that are within fifty kilometers of New York City and then traversing to find the articles connected to those geographic regions.

  51. 14:15

    And we can see things like Manhattan and Brooklyn. Uh, let's look at a vector search example. So using the, uh, vector similarity search functionality in Dgraph, we're passing a embedding.

  52. 14:29

    Uh, I think this is an embedding of the phrase money laundering, and looking for articles that are close in vector space, and then traversing to find, uh, topics, geographic regions, organizations connected to these, uh, these articles.

  53. 14:52

    We can then add a more complex traversal to then search from those articles that, uh, were a match for our vector similarity search to traverse through the topic nodes to find other articles that have overlapping topics, but that may not have shown up through our vector similarity search.

  54. 15:14

    And this gives us, uh, a way to, in this case, visually explore, uh, the graph. But of course, we can look at the JSON representation, uh, of the data return that matches our selection set.

  55. 15:28

    Okay, that was a quick look at using DQL to query our Dgraph instance. Um, I want to talk about some of the features in the latest release of Dgraph.

  56. 15:40

    Uh, the first interesting bit is that, uh, all of the enterprise features of Dgraph have been moved into a single open source release, uh, and we're continuing to add new features.

  57. 15:55

    Uh, the interesting one I want to dive into in this case is Model Context Protocol, so the MCP server for Dgraph. Uh, so let's talk a little bit about MCP, and then we'll look specifically at the Dgraph MCP server.

  58. 16:13

    Uh, so this is a screenshot from the Anthropic DeepLearning.AI course, uh, which is linked here. This is, um, I think a really good course if you're interested in not just learning about the concepts of MCP, but how do you actually build and deploy MCP servers.

  59. 16:33

    Fundamentally, MCP is a way of exposing tools to models. In the context of databases, this means we're giving, uh, the database, uh, we're giving the model rather a way to interact with our database.

  60. 16:51

    With Dgraph, uh, each Dgraph instance serves a MCP server. There's a, uh, read-only instance, which will only expose, uh, the ability to execute queries or inspect the schema. Uh, and then the full endpoint also exposes functionality for mutations, so adding data and also tool for altering the

  61. 17:16

    schema. So some of the use cases for the Dgraph MCP server are in agentic coding assistant, uh, environments, so tools like Windsurf or Cursor, uh, where we're able to do things like leveraging the schema or the data that are retrieved the MCP server

  62. 17:40

    to, um, auto-generate writing, uh, CRUD endpoints in our app or other way generating, uh, DQL queries in our app. Another use case might be more exploratory data analysis, uh, which we might do in a tool like Claude Desktop, where we're actually generating DQL queries, uh, and

  63. 18:07

    Fetching data from the database to understand, uh, what data is in our graph. [lips smack] Let's take a look at using the Dgraph MCP server, uh, with Claude Desktop. So the first thing I'm gonna do is sign into, uh, Hypermode and create a new graph.

  64. 18:28

    Hypermode graphs are, uh, powered by Dgraph, so this is going to deploy a Dgraph cluster, including the MCP server endpoint. So we can see the MCP configuration, uh, in addition to the Dgraph connection string. [lips smack]

  65. 18:45

    So we'll copy the MCP configuration, and in Claude Desktop, we'll edit the developer config and paste in that MCP configuration, uh, and then restart Claude, which will give us access to the MCP server tools for Dgraph.

  66. 19:06

    Uh, let's load some sample data into Dgraph. So let's, uh, create fictitious customer, product, and order data for, say, uh, for an e-commerce use case. And so the first thing that Claude is gonna do is update the schema.

  67. 19:24

    Uh, I should say, actually, the first thing it's gonna do is inspect the schema, uh, and see that our database is empty, then generate a graph schema that represents the data model that we're going to work with, so orders and how they're connected to products and customers.

  68. 19:42

    Uh, then Claude is gonna generate a series of mutations to actually create data in the graph, generating, uh, fictitious customer names, customer information, uh, products, and so on. Now, it's important to, to point out here that with database MCP servers, it's the model that is generating the database query and then

  69. 20:07

    using the tools defined in the MCP server to execute those queries against the database. And Claude is smart enough to verify that the data created in the database matches its expectations.

  70. 20:23

    So here we can see, uh, that Claude is generating DQL queries to verify, uh, the data was actually created, uh, as expected.

  71. 20:36

    Uh, in this case, it found missing relationships, uh, and so it's adding a mutation to add those relationships to the graph. Now, this is a really interesting way for learning new developer tooling.

  72. 20:50

    So here we've, uh, created, uh, a graph schema. We've added data to the graph without really having to, uh, to worry about the specific query language. But it's a great way to learn that query language, learn how to use these developer tools.

  73. 21:07

    Uh, now let's generate a graph visualization to understand the data in the graph. So here Claude generates a query to fetch data from the graph and generates the JavaScript to render a graph visualization.

  74. 21:23

    Um, so this is a helpful way to understand the connections in our graph. Uh, and we have ways for viewing the schema, uh, zeroing in on customers and orders, or just inspecting, uh, product information.

  75. 21:42

    We have different layout options in addition to the typical force-directed layout. Uh, hierarchical or radial layouts can be useful for interpreting graphs. Uh, but let's stick with the force-directed layout, and let's explore using Dgraph for generating product recommendations for a specific user.

  76. 22:06

    So this is a, a typical graph database use case, uh, generating personalized recommendations by traversing the graph. Uh, you can think of the different approaches we could take here from collaborative filtering, uh, which could be find similar users in the graph.

  77. 22:24

    What are those users purchasing that, uh, our user is not? Those may be good items to recommend to the user. To content-based recommendations based on the purchase history of our user, uh, what are attributes that they may be interested in, uh, demographic approaches as well.

  78. 22:46

    And here Claude is generating, uh, queries that show us using these different approaches, uh, and then how these can be combined to generate a single database query.

  79. 23:02

    Now, Claude doesn't always get the, the queries right. So this example, uh, we can see there's an error with the first approach, and so Claude is gonna iterate a bit, uh, until we get back results as expected.

  80. 23:18

    Again, really useful tool, I think, for understanding some of these concepts. Uh, now our final deliverable here is going to be a HTML report that Claude is gonna generate that allows us to explore the different approaches for implementing these, uh, recommendations and show us the results as well as the DQL query used for

  81. 23:43

    each of these. So that was a look at the Dgraph MCP server. If we zoom out a little bit, so far we've seen how to work with knowledge graphs, uh, how to expose tools to a model for interacting with that knowledge graph, uh, through Dgraph.

  82. 24:06

    Uh, but there's a piece that's missing here, which is the agent orchestration. Uh, and so to enable building, uh, agentic apps-

  83. 24:15

    At Hypermode, we've created the Modus Agent Orchestration Framework, which is an open source framework for creating AI agents, uh, really for bringing

  84. 24:29

    data to models and exposing tools, uh, and abstractions for working, uh, with agentic flows. So Modus is an open source project. Uh, you can find this on GitHub.

  85. 24:44

    Really, the functionality we think of, uh, in Modus is abstractions not only for working with models and data, but a runtime for, uh, working with large scale number of agents that are stateful and long-running, uh, which is why we think it's important to have a

  86. 25:09

    runtime, uh, as well as an SDK library for working with agents. Modus does some interesting things with WebAssembly. So we use WebAssembly to target multiple languages, uh, for different SDKs.

  87. 25:27

    So you're able to write your logic in languages like Go or AssemblyScript, and then under the hood, that is compiled to WebAssembly, and a single unified GraphQL API is generated that leverages, uh, the types that you've defined in your Modus app and the signature, uh, of the functions you've defined to stitch a single

  88. 25:52

    GraphQL schema, uh, together. Uh, the Modus runtime, uh, leveraging WebAssembly gives us some advantages as well for security and a sandbox environment for your AI agents to run in.

  89. 26:08

    Uh, but all of that WebAssembly aspect is abstracted away from, uh, from the user.

  90. 26:15

    So leveraging now these open source components, so the Mo- Modus Orchestration, uh, Framework, leveraging Dgraph for building knowledge graphs, uh, let's take a look at building domain-specific agents starting with a prompt.

  91. 26:33

    Uh, so this is, uh, the core for Hypermode agents, where we think it's really important to be able, uh, to get up and running with a domain-specific agent by writing a prompt and exposing tools via MCP server.

  92. 26:51

    Uh, so, uh, for my final demo, we'll take, uh, a quick look at, uh, Hypermode agents.

  93. 27:00

    I'm gonna switch back to Hypermode, and we're gonna go to the Threads tab, uh, which is our, uh, area for building agents. Uh, let's create a new agent. We'll give him a name, Bob Loblaw, works in our marketing department as a social media intern.

  94. 27:19

    Uh, we're gonna define a prompt which gives our agent a, a bit of background. He's going to be a social media expert, uh, who's really good at, uh, creating short snippets that are showing developers how to use, uh, deep technical tooling and explain technical concepts.

  95. 27:39

    Uh, we'll choose a reasoning model. Uh, we'll use the GPT 4.1, uh, model to orchestrate this agent. Uh, and the next thing we need to do is add connections.

  96. 27:51

    Our agent needs to be able to, uh, interact with its environment, so we'll give him access to GitHub, Notion, uh, and our company docs through Ref. These are all MCP servers that are, uh, exposing tools that, uh, allow the agent to interact, uh, with those services, uh, and authorized, uh, on our behalf.

  97. 28:16

    So let's give him a task to analyze, uh, a specific GitHub repo, in this case, the Hypernews repo, which has, uh, the tooling for importing, building, querying, and working with that news knowledge graph that, uh, I showed earlier.

  98. 28:33

    And we're gonna generate, uh, social media posts that explain how to use some of the concepts explained in that GitHub repo. So at the beginning, we can see the tool calls that our agent made.

  99. 28:48

    So first, he's searching for the Hypernews GitHub repo using, uh, tools from the GitHub MCP server, then getting, uh, specific file contents to use, uh, to generate social media posts, uh, that show how to use specific features, uh, explained in, uh, or I should say implemented in this GitHub repo.

  100. 29:13

    So this is a good start, um, but let's ask our agent to update these posts to include some relevant code snippets. Uh, and so our agent is now going to choose, uh, what tools to call here, uh, going back to GitHub, looking at, uh, source files

  101. 29:38

    that may be relevant, and adding code snippets here. So now you can see our social media posts have, uh, code snippets where appropriate, and this is a mix of DQL queries when we're talking about Dgraph, some Go code from, uh, the Modus SDK, some terminal commands.

  102. 29:58

    Uh, this looks good. Uh, let's ask our agent to save this to our, uh, Notion workspace so that we can queue these up, uh, to post on, uh, our Twitter account.

  103. 30:12

    And, uh, we need to tell our agent, uh, what page, uh, to use. So we'll say, uh, "Let's post these to my private scratchpad." And again, we've authorized, uh, the agent to have access to our Notion workspace through the Notion MCP server.

  104. 30:35

    Uh, so that's how our agent is able to access my scratchpad page. Uh, and we can see the Notion tools that our agent used to update our Notion page.

  105. 30:50

    And if we switch over to Notion, we can see my scratchpad that includes our updated code snippets for our social media posts.

  106. 31:02

    So that's really cool. We, uh, built an agent just from a prompt, gave him access to actually interact with GitHub and Notion, uh, on my behalf. One thing that's really neat, uh, about Hypermode Agents is I can now eject to code, uh, to have the Modus code that, uh, we're

  107. 31:26

    using to actually run this agent. So I can then add more complex logic, other connections, uh, to enhance my agent using Modus. So that was a quick look at Hypermode Agents, being able to create an agent from a prompt and access to

  108. 31:51

    MCP-powered connections, uh, while also being able to eject to code leveraging, uh, our open source tooling.

  109. 32:03

    Hypermode Agents is in early access now, uh, so there's a link there on the screen if you'd like to, uh, sign up to give this a try for early access.

  110. 32:15

    Great. Well, that was a look at the Knowledge Graph Mullet, uh, how we can leverage tools from the property graph and RDF ecosystems, uh, to build powerful GraphRAG workflows as the foundation for building AI agents.

  111. 32:34

    Uh, I hope you found that useful. Uh, feel free to, uh, use that link on the screen to check out the slides, and also look at the resources, uh, that we've added in the video description.

  112. 32:48

    Uh, thanks a lot for watching. Cheers.