Memgraph logo
Back to blog
Welcome SQL2Graph + Unstructured2Graph: Your New RAG Tools in Memgraph’s AI Toolkit

Welcome SQL2Graph + Unstructured2Graph: Your New RAG Tools in Memgraph’s AI Toolkit

By Memgraph
5 min readNovember 11, 2025

Over the past year, context engineering has emerged as the single biggest challenge for nearly every AI team we talk to. The question asked most often: How to retrieve the right context?

No matter how powerful the model or how elegant the prompt, the hardest part of building intelligent systems isn’t the LLM itself. It’s how you structure, retrieve and reason over your data. And that is where GraphRAG shines.

However, most data doesn’t start as a graph. It lives in SQL tables, PDFs, and unstructured documents. And until now, turning this raw data to a working GraphRAG pipeline required deep graph expertise, custom ETL code, and hours of trial and error (or learning how to build a Knowledge Graph).

With SQL2Graph and Unstructured2Graph, we are closing that gap. Together, these tools make it easier than ever to transform data, structured or unstructured, into graph-ready knowledge that fuels agentic reasoning.

Let’s dive into what we're launching today to accelerate the developers journey.

Why GraphRAG Needs These Tools

GraphRAG (Graph-based Retrieval-Augmented Generation) combines retrieval methods like vector search or text search with graph structure so a model doesn’t just know what is relevant, but how things are related. It gives structure to meaning.

But GraphRAG is only as good as the data you feed it. Most enterprise data still lives in relational databases or unstructured formats. Converting those documents into a connected, queryable graph has traditionally required deep expertise in graph modeling and a great deal of manual work.

This barrier to get started is what the Memgraph AI Toolkit is here to remove. It lets you start fast, turning structured and unstructured data into a graph model. This provides LLMs the structure they need to operate over connected knowledge rather than isolated chunks.

SQL2Graph: From Tables to Graphs in Minutes

Enterprises want to ask questions about their data. Yet, SQL is the format where most enterprise knowledge is locked away.

SQL2Graph is a migration agent that automatically converts SQL schemas from MySQL or PostgresSQL into production-grade property graphs inside Memgraph. It is an agent that bridges the gap between relational data and graph data.

From SQL to graph model in minutes

Under the hood, SQL2Graph is powered by Memgraph’s Hypothetical Graph Model (HyGM). It analyzes your SQL schema, proposes an initial graph model based on it, and lets you iteratively refine it before performing a seamless migration to Memgraph.

You can use it in two ways:

  • Automatic Mode: One-shot migration for straightforward schemas.
  • Incremental Mode: Table-by-table review with interactive refinement for complex databases.

Either way, the results are validated before the final migration.

Simply put, you can use SQL2Graph to generate a graph model from your data in MySQL or PostgresSQL to quickly get started on your GraphRAG journey.

Try SQL2Graph in Memgraph Cloud | Run it Locally via Docker

HyGM: The Engine Powering SQL2Graph

So, what’s this HyGM that powers SQL2Graph?

If you’ve worked with GraphRAG before, you know that the data model is just half of the battle. So, we’ve built HyGM (pronounced Hi-Jim) to make the process systematic.

HyGM is effectively HyDE for knowledge graphs - instead of generating hypothetical documents, it generates hypothetical graph models.

How does that work? Instead of requiring humans to be graph experts from day one, HyGM lets you work with an intelligent system that:

  1. Hypothesizes an initial graph model from your data
  2. Explains its reasoning in human terms
  3. Accepts your feedback and domain knowledge
  4. Refines the model based on your input
  5. Validates that the result makes sense

How does HyGM work?

With HyGM, graph design becomes a measurable and iterative process rather than a guessing game.

While currently embedded within SQL2Graph, HyGM will soon be available as a standalone MCP server, enabling composable, multi-agent collaboration across systems.

Interested in trying HyGM as a standalone modeling agent?

Join The Waitlist!

Unstructured2Graph: Turning Documents into Graph Context

Finally, for teams drowning in unstructured documents and needing to retrieve the most relevant context from them, we’ve built Unstructured2Graph pipeline. It is a fast and efficient pipeline for turning unstructured text into a connected knowledge graph.

Unstructured2Graph is a unified approach that lets teams bring data from unstructured data in formats like PDFs, DOCx and TXT into Memgraph where they are automatically transformed into a connected graph.

From unstructured text to graph model in minutes.

The latest addition, LightRAG integration, powers LLM-based entity extraction. It identifies each document page as a node with the extracted entity automatically linked to it and forms a navigable graph of your unstructured corpus.

You were already able to do it before through Memgraph's integrations with LangChain and LlamaIndex, but Unstructured2Graph makes it easier than ever to turn unstructured text into structured, graph-ready data for your GraphRAG projects.

In short, whether you’re working with research papers, documentation, or enterprise files, Unstructured2Graph helps you bring that data to Memgraph, ready for retrieval and reasoning.

Try Unstructured2Graph in Memgraph Cloud | Run it Locally via Docker

What’s Next?

With the SQL2Graph and Unstructured2Graph live, Memgraph takes broader steps into enabling every AI Engineer and data scientist to take their data into the graph domain and start building AI apps with GraphRAG.

It also sets the stage for our upcoming MCP Client in Memgraph Lab, which will extend these capabilities into a collaborative environment where agents and developers can interact with multiple MCP servers in real time.

Get Started

Getting started on the GraphRAG journey has never been easier.

You can simply start by trying all AI Toolkit components directly in Memgraph Cloud, or exploring the AI Toolkit repository to run them locally via Docker.

Explore your data, follow how relationships evolve, and watch Memgraph connect scattered information into a structured reasoning graph.

Join us on Discord!
Find other developers performing graph analytics in real time with Memgraph.
© 2025 Memgraph Ltd. All rights reserved.