MCP + Memgraph: Building a Reliable RAG Pipeline
Blog post from Memgraph
Orbis Holding's journey in developing a natural language Q&A system over a Memgraph database with nearly 100 million nodes highlights the challenges and advancements in transforming user queries into Cypher-driven answers. Initially, the system faced significant issues with the traditional LLM to Cypher workflow, which often failed due to misinterpretation of data formats and multi-hop relationships, leading to silent failures. To address these limitations, Orbis adopted the Model Context Protocol (MCP) by Anthropic, which offers a more flexible and iterative approach, allowing for dynamic tool discovery, iterative reasoning loops, and value inspection during query construction. This transition from a rigid, one-shot execution to an adaptive and inspectable system significantly improved query success rates, resolving around ninety out of a benchmark of one hundred questions compared to the old pipeline's twenty. While the new MCP-based architecture proves more reliable, ongoing improvements aim to enhance efficiency and reduce query resolution times, ensuring the system's robustness and scalability in handling complex data scenarios.