Memgraph
Reference Architecture

End-to-End GraphRAG Architecture

Vector and text search find relevant content. Graph queries add connected context and provenance.

Memgraph holds the knowledge graph alongside vector and text indexes in one engine, so retrieval can combine them. An agent reads the question, picks a retrieval strategy, and Memgraph runs it as a single query. Four steps:

  1. 1

    Build the knowledge graph

    Documents and records become entities and relationships. Every node keeps a reference back to its source.

    PDFs, SQL, apps, KBs

    Modelling + entity resolution

    Unstructured2Graph, SQL2Graph

    Memgraph

    graph, vector and text indexes, source refs

  2. 2

    Route the question and pick a strategy

    Agentic GraphRAG

    The agent classifies the question and picks a strategy. Each one is a single Cypher query that Memgraph executes. Combine freely, or add your own.

    Semantic retrieval

    vector or text search

    What does the leave policy say? Vector search for meaning, text search for exact terms and identifiers. No traversal needed.

    Structured analysis

    Text2Cypher

    How many policies have open exceptions? A validated, read-only Text2Cypher query counts, filters and traverses relationships without semantic search.

    Local graph search

    search + traversal

    Which rules apply to this employee? Search finds the entry point, the graph expands to what's connected, then ranking trims it.

    Global approach

    query focused summarization

    What changed across last year's revisions? Retrieve relevant precomputed community summaries and synthesize an answer across them.

  3. 3

    Return context the answer can cite

    The query returns a bounded result rather than a pile of chunks, and each fact still carries where it came from.

    Retrieved context + sources

    document, page, system, record

    LLM

    reasons over what it was given

  4. 4

    Answer, with the evidence attached

    Return source identifiers with the retrieved context, require the model to cite them, and validate that cited evidence supports the generated claims.

Production controls to design

Access control

Enforce role-, label-, and property-based access controls to keep restricted data hidden.

Freshness

Graph and embeddings update together, or retrieval returns stale answers.

Evaluation

Score retrieval on its own, because a wrong answer usually starts there.

Reliability

Monitoring, backups, high availability with automatic failover, and resource limits.

Try it on your own data

Memgraph engineers build the graph and the retrieval layer with your team.

© 2026 Memgraph Ltd. All rights reserved.