GraphRAG with ArcadeDB

Next-generation Retrieval Augmented Generation combining knowledge graphs, vector embeddings, full-text search, and temporal context — all in a single database query.

Published Last updated

Vector-Only RAG Is Hitting a Wall

Retrieval Augmented Generation transformed how LLMs access knowledge. But the first generation of RAG — chunk documents, embed them, retrieve by cosine similarity — has fundamental limitations. When you treat documents as isolated vectors, you lose the structure: the relationships between entities, the hierarchy of concepts, the temporal evolution of facts.

The result: hallucinations, incomplete answers, and an inability to reason across connected information. Ask a vector-only system "Which researchers at Stanford published papers on the technique used by the company that acquired our competitor?" and it falls apart — that's a 4-hop graph traversal, not a similarity search.

Research consistently shows 20-35% improvement in retrieval precision and up to 65% reduction in hallucinations when knowledge graph context supplements vector similarity. Cedars-Sinai's ESCARGOT system achieved 94.2% accuracy on multi-hop medical reasoning versus 49.9% with standard RAG — nearly doubling performance by adding graph structure.

The industry has a name for this: Graph RAG. But most implementations require stitching together 3-5 separate databases plus ETL pipelines. ArcadeDB handles the entire pipeline in a single engine.

Where Vector-Only RAG Falls Short

No relationship awareness
Can't traverse entity connections between documents
Single-hop only
Unable to perform multi-hop reasoning through entity networks
Flat retrieval
Treats all text as isolated vectors without semantic organization
No temporal context
Can't answer "what changed since last quarter?"
Infrastructure sprawl
Separate vector DB + graph DB + search engine + sync pipelines
Stale context
ETL delays mean the LLM reasons over outdated data
ArcadeDB Graph RAG

How Graph RAG Connects the Dots

User Query Vector Search Full-Text Search Graph Traversal Doc Chunk A Doc Chunk B Person Alice Concept RAG works_at Org Acme Keyword Exact Match ArcadeDB Enriched Context → LLM → Answer Single query, single database

One Database for the Entire RAG Pipeline

Graph RAG enhances traditional vector retrieval by adding structured knowledge graph context. Instead of retrieving isolated chunks, you retrieve chunks and their connected entities, relationships, and community structure — giving the LLM far richer context for reasoning.

ArcadeDB is the only database that handles the entire Graph RAG pipeline natively in a single engine:

  • Vector search (JVector): DiskANN + HNSW hybrid with SIMD acceleration
  • Graph traversal: Multi-hop reasoning through knowledge graph relationships in constant time per hop
  • Full-text search: Keyword matching, fuzzy search, and entity name resolution alongside semantic search
  • Document storage: Raw chunks, metadata, and embeddings as first-class objects
  • Time-series context: Track when facts were added, modified, or superseded — unique to ArcadeDB

No ETL pipelines between systems. No synchronization delays. No consistency gaps. One query, one database, one result.

Building the Knowledge Graph

Every Graph RAG system starts with knowledge graph construction. The pipeline: chunk your documents, generate embeddings via an LLM, extract entities and relationships, and store everything in the database. Neo4j, Memgraph, and ArangoDB all offer this — but each requires separate systems for vectors, full-text, or documents.

With ArcadeDB, the entire knowledge model — document chunks with embeddings, entity vertices, relationship edges, and full-text indexes — lives in a single transactional database. New documents are searchable across all models immediately. No batch reindexing, no sync pipelines.

  • Document chunks with vector embeddings indexed via JVector
  • Entity vertices (Person, Concept, Organization) with typed relationships
  • MENTIONS edges linking chunks to the entities they reference
  • Full-text indexes on entity names and chunk content
  • Timestamps on every record for temporal-aware retrieval

Define the Knowledge Graph Schema

-- Document chunks with embeddings
CREATE DOCUMENT TYPE Chunk;
CREATE PROPERTY Chunk.content STRING;
CREATE PROPERTY Chunk.source STRING;
CREATE PROPERTY Chunk.embedding
  VECTOR(1536);
CREATE VECTOR INDEX ON Chunk(embedding)
  LSM TYPE COSINE;

-- Knowledge graph entities
CREATE VERTEX TYPE Entity;
CREATE VERTEX TYPE Person EXTENDS Entity;
CREATE VERTEX TYPE Concept EXTENDS Entity;
CREATE VERTEX TYPE Organization
  EXTENDS Entity;

-- Semantic relationships
CREATE EDGE TYPE MENTIONS;
CREATE EDGE TYPE RELATES_TO;
CREATE EDGE TYPE WORKS_AT;
CREATE EDGE TYPE AUTHORED;

Hybrid Vector + Graph Retrieval

Find semantically similar chunks, then enrich with entity context through graph traversal — in one query:

-- Vector search + graph traversal in one query
SELECT content, source,
       out('MENTIONS').name AS entities
FROM Chunk
ORDER BY vectorNeighbors('Chunk[embedding]',
  [0.9, 0.2, 0.1, 0.1], 5) DESC
LIMIT 5

One query returns: similar chunks + their entities through graph traversal — all the context an LLM needs.

Hybrid Retrieval: Best of Both Worlds

The power of Graph RAG lies in combining two complementary retrieval strategies. Vector search finds semantically similar content — great for "what does this mean?" questions. Graph traversal finds structurally connected content — essential for "how is this related to that?" questions.

In ArcadeDB, these aren't separate systems with a merge layer in between. They're a single Cypher query that executes in the same transaction, on the same data, with results composed at the database level — not in application code.

The query on the left demonstrates hybrid retrieval: it starts with vector similarity to find relevant document chunks, then enriches each chunk with entities discovered through graph traversal, and finally finds related chunks that share entities with the original results (multi-hop). The LLM receives not just similar text, but structured context about what entities appear, how they're connected, and what other documents discuss the same entities.

Industry benchmarks show hybrid retrieval improves accuracy by 15-25% on domain-specific corpora compared to vector-only or keyword-only approaches.

Multi-Hop Reasoning: Following the Chain

The most valuable questions require connecting information across multiple documents. "Which researchers at Stanford have published papers on the technique used by the company that acquired our competitor?" requires traversing 4+ hops through the knowledge graph. Vector search alone cannot answer this.

ArcadeDB's graph engine makes multi-hop reasoning a first-class operation. Each hop takes constant time regardless of database size — O(1) per hop. A 5-hop traversal across 10 million entities completes in milliseconds — see the LDBC and LSQB benchmark results for measured numbers against Neo4j, Kuzu, Memgraph, and others.

  • Entity-bridge retrieval: Find documents connected through shared entities even when they have low vector similarity
  • Community detection: Discover clusters of related entities for global summarization
  • Path explanation: Return the exact traversal path so the LLM can explain how information is connected
  • Depth control: Adjust traversal depth per query — shallow for speed, deep for thoroughness

Multi-Hop Entity-Bridge Query

-- Find documents connected through
-- shared entities (multi-hop)
MATCH (direct:Chunk)-[:MENTIONS]->(entity)
      <-[:MENTIONS]-(related:Chunk)
WHERE direct.source =
  'Getting Started with GraphRAG'
  AND related.source <> direct.source
RETURN direct.source AS source_doc,
       entity.name AS bridge_entity,
       related.content AS connected_content,
       related.source AS connected_doc
LIMIT 20

Discovers documents you'd never find through vector similarity — because they share an entity, not vocabulary.

Agentic RAG: One Connection, All Models

-- Step 1: Vector search
SELECT content, source
FROM Chunk
ORDER BY vectorNeighbors('Chunk[embedding]',
  [0.9, 0.2, 0.1, 0.1], 5) DESC
LIMIT 5

-- Step 2: Graph expansion
MATCH (c:Chunk {source:
  'Getting Started with GraphRAG'})
      -[:MENTIONS]->(e)
      -[:RELATES_TO]->(related)
RETURN e.name, related.name
LIMIT 10

-- Step 3: Full-text lookup
SELECT content, source
FROM Chunk
WHERE content CONTAINSTEXT 'knowledge graph'
LIMIT 5

-- Step 4: Authorship
MATCH (p:Person)-[:AUTHORED]->(c:Chunk)
RETURN p.name, c.source, c.chunkIndex
LIMIT 10

Same connection — Cypher for graphs, SQL for analytics. The agent picks the right tool for each reasoning step.

Agentic RAG: AI Agents That Think and Retrieve

RAG is evolving from static "retrieve-and-respond" pipelines to Agentic RAG — AI agents that plan reasoning steps, dynamically choose retrieval strategies, and iteratively refine context. 57% of organizations are now deploying agents for multi-stage workflows.

An agent might start with a vector search, discover an entity, traverse the graph to find related documents, run a full-text search for a specific term, then check time-series data to see how a metric changed. With separate databases, each step requires a different connection, query language, and data format.

With ArcadeDB, the agent uses one connection and one query language. Cypher for graph patterns, SQL for analytics and full-text, and both can access vectors — all in the same session. This dramatically simplifies agent tool definitions and reduces latency per reasoning step.

ArcadeDB is compatible with LangChain, LlamaIndex, and other agent frameworks through its HTTP API, Postgres wire protocol, and JDBC driver.

Temporal Context: When Facts Change

Knowledge isn't static. Policies get updated, products evolve, organizational structures change, research is superseded. A RAG system that can't distinguish current from outdated information will confidently present stale facts as truth.

ArcadeDB's native time-series capabilities add a temporal dimension that no other Graph RAG platform offers:

  • Recency filtering: Retrieve only chunks indexed after a specific date
  • Version tracking: Both old and new versions stored — the LLM can see how information changed
  • Chunk ordering: Track chunk sequences within documents for contextual retrieval
  • Freshness scoring: Weight more recent chunks higher in retrieval ranking
  • Change detection: Alert when entity relationships change significantly

For enterprise RAG dealing with compliance documents, product specs, or policy manuals, temporal awareness isn't a nice-to-have — it's essential for avoiding costly mistakes.

Latest Chunk Per Document

-- Retrieve latest chunks per document
MATCH (c:Chunk)
RETURN c.content, c.source, c.chunkIndex
ORDER BY c.source, c.chunkIndex DESC
LIMIT 10

Triple Hybrid: Vector + Graph + Full-Text

-- Composite scoring: vector + graph + full-text
SELECT content, source,
       out('MENTIONS').size()
         AS entity_count
FROM Chunk
WHERE content CONTAINSTEXT 'knowledge graph'
ORDER BY vectorNeighbors('Chunk[embedding]',
  [0.9, 0.2, 0.1, 0.1], 10) DESC
LIMIT 10

Full-Text Search: Precision When Semantics Aren't Enough

Vector search excels at semantic similarity but struggles with exact matches. "What does section 4.2.1 of the compliance manual say?" — semantic search returns chunks about compliance in general. Full-text search finds the exact section.

ArcadeDB's built-in full-text search engine complements vector retrieval:

  • Keyword + semantic: Combine CONTAINSTEXT with vector distance in the same query
  • Entity name matching: Instant lookup by name, abbreviation, or synonym
  • Fuzzy matching: Find "Retrieval Augmented Generation" even when the user types "retreival augmented gen"
  • Composite scoring: Weight vector, full-text, and entity-count signals for optimal retrieval

The combination of vector similarity (semantic), full-text (keyword), and graph traversal (structural) creates a retrieval system that handles every type of question — vague exploratory queries, precise factual lookups, and complex relational questions.

Graph RAG Applications

Enterprise Knowledge Base

Internal documentation, policies, and tribal knowledge made searchable through graph-connected retrieval. Agents answer employee questions with traced, verifiable sources.

Legal & Compliance

Regulations, case law, and contracts interlinked through entity graphs. Multi-hop traversal reveals how regulatory changes cascade across related documents and obligations.

Healthcare & Biomedical

Medical literature, drug interactions, and clinical guidelines linked through biomedical ontologies. Cedars-Sinai achieved 94.2% accuracy on multi-hop medical reasoning with Graph RAG.

Customer Support AI

Product docs, support tickets, and KB articles connected through product entities. Agents resolve tickets using the full relationship context of the customer's situation.

Scientific Research

Papers, authors, institutions, and methods connected in a research knowledge graph. Discover related work through author networks, shared methodologies, and citation chains.

Financial Intelligence

Earnings reports, SEC filings, and news connected through company and executive entity graphs. Temporal context tracks how financial narratives evolve quarter over quarter.

Platform Comparison for Graph RAG

Capability Neo4j Memgraph ArangoDB ArcadeDB
Native graph
Vector search Bolt-on New (3.0) Basic JVector
Full-text search Basic Built-in
Document store
Time-series
Cypher support AQL only
SQL support AQL only
ETL needed Yes (ext. vector) Yes Partial None
License AGPL BSL SSPL Apache 2.0

Why ArcadeDB for Graph RAG

Neo4j pioneered Graph RAG but requires external vector databases (Pinecone, Weaviate) for production-grade search. Memgraph added vector search only in v3.0. ArangoDB uses a proprietary query language (AQL). TigerGraph uses GSQL and has no native full-text search.

ArcadeDB is the only platform that delivers the complete Graph RAG stack in a single engine:

  • Zero data movement: No ETL pipelines, no sync delays, no consistency gaps
  • Single-query retrieval: Vector similarity + graph traversal + full-text matching in one Cypher/SQL statement
  • Real-time indexing: New documents immediately searchable across all models
  • Standard languages: Cypher (latest OpenCypher 25 grammar), SQL, Gremlin — not a proprietary language
  • Lower cost: One system instead of five, with no commercial license fees

Apache 2.0 — Forever

RAG systems are becoming the backbone of enterprise AI. You need to trust that the database powering them won't change its licensing terms. Neo4j is AGPL. Memgraph is BSL. ArangoDB switched from Apache 2.0 to SSPL. ArcadeDB is Apache 2.0 forever — no bait-and-switch, no source-available restrictions. Deploy it anywhere, embed it in your product, fork it if you want.

Production Success Story

"We migrated our RAG system from a separate vector database + Elasticsearch setup to ArcadeDB. The ability to combine document vectors with entity relationships in a single query transformed our AI assistant's accuracy. Our LLM can now reason about how documents relate through shared entities, dramatically reducing nonsensical answers. We've consolidated 4 database systems into 1, cutting infrastructure costs by 70% while achieving better results."

— Chief Data Officer, Enterprise AI Company
(Details limited by confidentiality agreement)

Results Achieved:

  • 92% improvement in answer accuracy vs. vector-only RAG
  • 65% reduction in hallucinations through graph context
  • Sub-50ms query latency for hybrid retrieval (10M documents)
  • 4 database systems consolidated into 1
  • 70% reduction in infrastructure costs

Industries Using Graph RAG

  • Enterprise AI: Internal knowledge assistants, document Q&A, process automation
  • Legal & Compliance: Contract analysis, regulatory tracking, case research
  • Healthcare: Clinical decision support, drug discovery, medical literature review
  • Financial Services: Research analysis, risk assessment, compliance monitoring
  • Education: Intelligent tutoring, curriculum-aware Q&A, research assistants
  • Customer Support: Context-aware ticket resolution, product knowledge agents

Does ArcadeDB Have Built-In Vector Search?

Yes. Vector search is native to the engine, not a plugin or a companion service. You store embeddings in a property, create an HNSW index over that property, and query it with the vector.neighbors() function in SQL. Because the index lives in the same database as your graph, a retrieval query can rank chunks by embedding similarity and traverse to the entities they mention without leaving the engine or crossing a network boundary.

Three statements are all it takes: declare the property, index it, and query it.

-- 1. A property to hold the embedding
CREATE PROPERTY Chunk.embedding LIST OF FLOAT;

-- 2. An HNSW index over it
CREATE INDEX ON Chunk (embedding) LSM_VECTOR
  METADATA { dimensions: 1536, similarity: 'COSINE' };

-- 3. Nearest-neighbour search
SELECT content, distance FROM (
  SELECT expand(vector.neighbors('Chunk[embedding]', ?, 5))
);

COSINE is the default similarity metric; EUCLIDEAN and DOT_PRODUCT are also supported. An optional fourth argument to vector.neighbors() sets efSearch, trading recall against latency.

GraphRAG in Python: An End-to-End Walkthrough

This is a complete GraphRAG pipeline running in-process, with no server to start. The arcadedb-embedded package bundles a Java runtime, so pip install is the only prerequisite. Bring your own embedding model; the example below assumes a function embed(text) returning a 1536-dimension list of floats.

pip install arcadedb-embedded
import arcadedb_embedded as arcadedb

DIM = 1536  # must match your embedding model

with arcadedb.create_database("./graphrag") as db:

    # ---- 1. Schema: chunks, entities, and the edge between them ----
    with db.transaction():
        db.command("sql", "CREATE VERTEX TYPE Chunk")
        db.command("sql", "CREATE PROPERTY Chunk.content STRING")
        db.command("sql", "CREATE PROPERTY Chunk.embedding LIST OF FLOAT")
        db.command("sql", "CREATE VERTEX TYPE Entity")
        db.command("sql", "CREATE PROPERTY Entity.name STRING")
        db.command("sql", "CREATE EDGE TYPE MENTIONS")

        # HNSW index over the embedding property
        db.command("sql",
            f"CREATE INDEX ON Chunk (embedding) LSM_VECTOR "
            f"METADATA {{ dimensions: {DIM}, similarity: 'COSINE' }}")

    # ---- 2. Ingest: a chunk, its embedding, and the entities it mentions ----
    docs = [
        ("ArcadeDB stores graph and vector data in one engine.", ["ArcadeDB"]),
        ("JVector provides the HNSW index used for similarity search.", ["JVector", "ArcadeDB"]),
    ]

    with db.transaction():
        for text, entities in docs:
            db.command("sql",
                "CREATE VERTEX Chunk SET content = ?, embedding = ?",
                text, embed(text))

            for name in entities:
                # UPSERT keeps one vertex per distinct entity
                db.command("sql",
                    "UPDATE Entity SET name = ? UPSERT WHERE name = ?",
                    name, name)
                db.command("sql",
                    "CREATE EDGE MENTIONS "
                    "FROM (SELECT FROM Chunk WHERE content = ?) "
                    "TO (SELECT FROM Entity WHERE name = ?)",
                    text, name)

    # ---- 3. Retrieve: vector similarity, then expand through the graph ----
    q = embed("how does ArcadeDB do similarity search?")

    # 3a. Pure vector search
    for row in db.query("sql",
            "SELECT content, distance FROM ("
            "  SELECT expand(vector.neighbors('Chunk[embedding]', ?, 3))"
            ")", q):
        print(row.get("distance"), row.get("content"))

    # 3b. Hybrid: the same chunks, plus what they connect to
    for row in db.query("sql",
            "SELECT content, distance, out('MENTIONS').name AS entities FROM ("
            "  SELECT expand(vector.neighbors('Chunk[embedding]', ?, 3))"
            ")", q):
        print(row.get("content"), "->", row.get("entities"))

Step 3a is what a vector database gives you. Step 3b is the difference: the same ranked chunks, each carrying the entities it mentions, retrieved in one statement against one copy of the data. Adding a second hop (the other chunks that mention those entities) is another traversal in the same query rather than another round trip to another system.

Prefer a server to an embedded process? The same SQL runs unchanged over the HTTP/JSON API or any supported wire protocol, and the official LangChain integration exposes ArcadeDB as a LangChain GraphStore if you would rather drive it from an existing chain.

How Fast Is Retrieval?

Retrieval speed is what decides whether a GraphRAG pipeline can expand context at request time or has to precompute it. On the LDBC Graphalytics suite, run on identical hardware against seven other graph engines, ArcadeDB completes PageRank in 0.10s, WCC in 0.08s, CDLP in 1.11s, and LCC in 2.35s, winning 5 of the 6 standard algorithms. On the LSQB pattern-matching benchmark, query Q6, a two-hop traversal counting 1.67 billion rows, finishes in 110ms, which is 473 times faster than Neo4j on the same host.

Those are traversal numbers, and traversal is the half of GraphRAG that a vector store cannot do at all. Every figure above is reproducible from the open-source harness: see the full benchmark results and methodology.

How ArcadeDB Compares for GraphRAG

The realistic alternatives are Neo4j, Memgraph, FalkorDB, Kuzu, and JanusGraph. Two of them deserve a straight answer: Memgraph and FalkorDB both ship a vector index in the same store as the graph, so the “one engine instead of two” argument is not unique to ArcadeDB and we are not going to pretend it is. Where ArcadeDB does differ is licensing and breadth. Memgraph Community is BSL and FalkorDB is SSPL, both source-available rather than open source; ArcadeDB is Apache 2.0, which matters if you distribute software built on it. ArcadeDB also stores documents and time series alongside the graph and vectors, and runs embedded in your JVM or Python process rather than only as a server.

That argument does not win everywhere, and the honest version, including where each alternative is the better choice, is in our comparison of open-source knowledge graph and GraphRAG databases. If you are building agent memory specifically, see building memory for LLM agents with ArcadeDB.

Frequently Asked Questions

What is the best database for GraphRAG?

There is no single answer, but the shortlist is small. Memgraph, FalkorDB, and ArcadeDB all index vectors in the same store as the graph, so none of them forces a separate vector database. ArcadeDB differs on licensing, Apache 2.0 rather than BSL or SSPL, and on embedded mode.

What is the difference between GraphRAG and vector RAG?

Vector RAG retrieves the top-k text chunks whose embeddings are closest to the query, treating each chunk as independent. GraphRAG also retrieves the entities and relationships those chunks connect to, so the model receives structure as well as similarity. That makes multi-hop questions answerable and the retrieved context explainable.

Do I need a separate vector database for GraphRAG?

No. ArcadeDB stores the knowledge graph, the vector embeddings, the source documents, and the full-text indexes in one engine under a single ACID transaction. A hybrid query ranks by vector similarity, filters by keyword, and traverses relationships in one statement, removing the application-level join a separate vector store forces on you.

How does graph retrieval reduce hallucination?

Hallucination rises when the retrieved context is incomplete or contradictory. Graph retrieval returns facts along explicit, typed relationships rather than whatever happened to be semantically nearby, so the model sees the chain connecting entities instead of inferring it. Because every returned fact has a traceable path, answers can also be cited.

Can I run GraphRAG embedded, without a server?

Yes. ArcadeDB runs in-process inside your JVM, and in Python through the embedded package with a bundled JRE. Vector search with JVector also runs in-process, so an entire GraphRAG pipeline can execute with no server, no network hop, and no external vector service to deploy.

What is multi-hop reasoning, and why does vector search struggle with it?

Multi-hop reasoning chains several facts together, such as linking a customer to a component defect through an order, a product, and a supplier. Vector search cannot express it because no single chunk contains the whole chain. Each hop is an edge traversal, which a graph query returns directly.

Does ArcadeDB work with LangChain and LlamaIndex?

Yes. ArcadeDB integrates with LangChain and LlamaIndex, and is reachable from any language through the HTTP/JSON REST API or in-process from Python using the embedded package. That lets it serve as the retrieval backend for an existing RAG or agent pipeline without rewriting the orchestration layer.

How does hybrid retrieval combine vector and full-text search?

Vector search answers “what does this mean?” and finds semantically similar passages. Full-text search answers “where exactly does it say this?” and finds an exact clause such as section 4.2.1. ArcadeDB runs both alongside graph traversal in one query, so precision and semantics are not traded off.

Can one database store the knowledge graph and the embeddings?

Yes. In ArcadeDB the embeddings live in a property on the same records that carry the graph, indexed with HNSW. One transaction writes a chunk, its vector, and its relationships together, so the graph and the index cannot drift apart the way two separate systems can.

Is GraphRAG on ArcadeDB free to use?

Yes. ArcadeDB is Apache 2.0 licensed and free in production, including JVector vector search, full-text indexing, graph traversal, and clustering. There is no separate paid edition for AI workloads, no node or core limit, and no feature gating between an open-source and a commercial build.

Ready to Build Graph RAG Applications?

Start building advanced RAG systems today with ArcadeDB. Combine knowledge graphs, vector search, full-text matching, and temporal context in a single unified database. No infrastructure sprawl — just intelligent retrieval.