Tips for Building Better Enterprise GraphRAG Pipelines with Memgraph CTO Marko Budiselić
The journey into production-grade Retrieval-Augmented Generation (RAG) is exciting, but it often brings a few surprises! In a recent GraphGeeks Live Stream, Amy Hodler sat down with Marko Budiselić, Co-founder and CTO of Memgraph, to hear his hard-won experience and gain a few tips. The discussion highlighted where basic RAG often falls short and how clever use of graph technology provides the robust structure and control enterprises truly need.
Why We All Pivot to GraphRAG: When Context Goes Missing
Marko confirmed what many technical teams discover: GraphRAG often steps in after basic vector search RAG has been deployed. Why? Because while simple vector search is easy to start with, it hits a critical wall when users ask complex, multi-hop, or highly contextual questions based on proprietary data.
There’s often a realization that finding information isn't the same as truly discovering knowledge. And Marko and Amy embraced the use of "Hybrid RAG," agreeing that the most successful systems integrate the power of semantic similarity (vector search) with the critical precision of structural context (graph traversal).
-
Vector search excels at finding data chunks that are linguistically similar to your question—a great starting point. But it struggles to connect those chunks to the broader business context, like who reports to whom, or what event preceded another. GraphRAG introduces knowledge discovery, using explicit relationships to build a comprehensive, reasoned answer.
Understanding the GraphRAG Toolbox
Marko also broke down the GraphRAG toolkit into three powerful approaches, each best suited for a different type of question:
Text2Cypher: Your best friend for specific, analytical questions (like "How many departments use this legacy system?"). We can translate the question into a precise graph query, ensuring a deterministic, factual answer.
Pivot Search and Relevance Expansion: The hybrid workflow starts with a broad search of various kinds (Memgraph calls that’s Pivot Search) to find the initial data points, then uses graph logic to expand traversal and explore the connected relationships for a complete, more relevant answer (hence Relevance Expansion).
Query-Focused Summarization: This concept from the Microsoft GraphRAG paper, is perfect for open-ended questions. This approach uses graph analysis (like finding communities) to identify and synthesize summaries across large, interconnected clusters of knowledge.
Navigating Enterprise Roadblocks: Tips from the Field
Marko shared two crucial areas where teams often struggle in production, along with practical advice to overcome them.
1. The Schema Challenge: LLMs as Great Assistants, Not Architects
Mapping huge amounts of unstructured data or hundreds of SQL tables to a useful graph schema (ontology) is often the primary bottleneck.
The Problem: While tempting, relying solely on an LLM to generate your enterprise schema is risky. Marko pointed out that semantic meaning in companies often lies in undocumented tribal knowledge (e.g., abbreviations only the DBAs understand). An LLM won't know that "FOB" means "Fruit on Bottom" instead of "Freight on Board"!
The Solution: Most practitioners agree that schema development must be iterative and collaborative. Marko shared hypothetical graph modeling and the conversation teased the idea of turning a schema definition process into a continuous feedback loop. (Next Time!)
2. The Scaling and Performance Balancing Act
GraphRAG is generally more complex than basic RAG, driven by the costs of entity extraction and the memory required to store embeddings alongside the graph structure.
Marko’s advice on that was clear: Keep it simple to start. Adopt an Occam's Razor approach by initially choosing smaller models and simpler embeddings. Why? This not only saves money and latency but also immediately establishes a quality baseline. Teams burn time and resources when they build a massive, complex system without knowing if the foundation works.
Observability is also key to driving quality because the RAG process has multiple steps and you need to trace failure. GraphRAG (or Hybrid RAG) with more explicit steps is inherently more traceable. By following the query's computational path, engineers can isolate whether a failure occurred in the vector search, the ranking algorithm, or the final LLM prompt, making the system highly tunable.
The Technical Edge: Unifying Logic in One Query
Marko also shared a directional approach that fosters executing the entire Hybrid RAG pipeline within a single Cypher query - an Atomic GraphRAG.
This isn't just a cool idea—it's strategically important for simplifying development:
Composability: You can easily swap out components (e.g., changing the ranking function) without touching fragile scripts.
Integrity: Error handling and processing is built-in with this approach, treating the whole retrieval as one robust operation.
Agent Efficiency: A concise, self-contained query is much easier for an LLM agent to generate reliably when performing Text2Cypher tasks.
The real challenge is making the rich context and structural benefits of a graph as easy to leverage as a basic vector store. When you achieve that, you unlock powerful, domain-specific AI, perfect for complex use cases like supply chain optimization and internal knowledge mapping.
Marko also ran through a live demonstration of how Memgraph implements its one-query GraphRAG pipeline and answered audience questions on data modeling. You want to see that in action, you can watch the entire Live Stream session on-demand!
Got more questions about integrating graphs into your AI strategy within your Enterprise? Memgraph’s rolled out a JumpStart programme that can help you get started. Register your interest here.