AI Engineer World's Fair 2025

The Knowledge Graph Mullet: Trimming GraphRAG Complexity

Loading slides…

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.Open full source frame
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.”Open full source frame
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.Open full source frame
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.Open full source frame
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.Open full source frame
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.Open full source frame
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.

Transcript download
Full transcript

Loading transcript…