Skip to content

RAG vs. GraphRAG Architecture Comparison

Scaffold

This MicroSim has been scaffolded from its specification. The interactive implementation has not been built yet.

Learning Objective

TBD

  • Bloom Level: TBD
  • Bloom Verb: TBD
  • Library: vis-network

Preview

Run MicroSim in Fullscreen

Specification

The full specification below is extracted from Chapter 17: AI and Machine Learning System Architecture.

Type: Interactive architecture comparison
**sim-id:** rag-architecture-explorer<br/>
**Library:** vis-network<br/>
**Status:** Specified

**Purpose:** Side-by-side animated comparison of flat RAG and GraphRAG architectures showing the complete request flow from user query through retrieval to LLM generation.

**Left panel (RAG):** User query → Embedding model → Vector DB (similarity search) → Top-K documents → LLM prompt assembly → LLM → Response

**Right panel (GraphRAG):** User query → Entity extraction → Knowledge Graph (graph traversal) → Related entities + Vector DB (semantic search) → Combined context → LLM prompt → LLM → Response

**Interactions:**
- Click each component to see: purpose, latency contribution, quality risks
- "Show Latency Budget" mode: animate request flow with per-step timing
- Toggle "Complex reasoning query" vs. "Simple factual query" to see when GraphRAG advantage is most pronounced