You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add design philosophy, use cases, and enrich documentation
- Add design philosophy: no graph DB, single-pass LLM reranking,
knowledge-intensive domain focus
- Add use cases page with domain examples (legal, finance, medical,
literature, academic)
- Update README features to highlight key differentiators
- Enrich getting-started with collection_prefix and milvus_db usage
- Add comparison table with other RAG approaches
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/how-it-works.md
+54-8Lines changed: 54 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,46 @@
1
1
# How It Works
2
2
3
-
## Overview
3
+
## Design Philosophy
4
4
5
-
Vector Graph RAG builds a knowledge graph stored entirely in a vector database (Milvus). It uses vector similarity search instead of graph traversal to find relevant entities and relations, eliminating the need for a separate graph database.
5
+
Vector Graph RAG is built on three key principles:
6
6
7
-
## Indexing Pipeline
7
+
### 1. No Graph Database
8
+
9
+
Traditional Graph RAG systems store knowledge in a graph database (Neo4j, ArangoDB, etc.) and use graph traversal queries (Cypher, Gremlin) to retrieve relevant subgraphs. This adds operational complexity: another database to deploy, a query language to learn, schema to maintain.
10
+
11
+
We store the entire knowledge graph — entities, relations, and passages — as vectors in Milvus. Retrieval becomes vector similarity search, which is simple, scalable, and requires no additional infrastructure.
12
+
13
+
### 2. Single-Pass LLM Reranking
14
+
15
+
Many RAG systems use iterative, agentic retrieval — the LLM decides what to retrieve next, reflects on results, and repeats. For example:
16
+
17
+
-**IRCoT** (Interleaving Retrieval with Chain-of-Thought) alternates between retrieval and reasoning over multiple rounds
18
+
-**Self-RAG** uses the LLM to critique and re-retrieve documents
19
+
-**Agentic RAG** gives the LLM tools to search iteratively
20
+
21
+
These approaches are powerful but expensive — each iteration costs an LLM call, adding latency and cost.
22
+
23
+
Vector Graph RAG uses a **single LLM reranking pass**. After vector search and subgraph expansion produce candidate relations, the LLM scores them once. This is sufficient because the vector search + subgraph expansion already provides high-quality candidates, and a single reranking step can effectively filter the best results.
24
+
25
+
### 3. Knowledge-Intensive Domains
26
+
27
+
Vector Graph RAG is especially effective for **knowledge-intensive content** — documents where dense factual relationships are the core value:
28
+
29
+
| Domain | Why Graph RAG Helps |
30
+
|--------|-------------------|
31
+
|**Legal**| Statutes reference other statutes, precedents cite precedents — graph captures these cross-references |
32
+
|**Finance**| Company relationships, ownership chains, transaction flows form natural graphs |
33
+
|**Medical**| Drug interactions, symptom-disease-treatment pathways are inherently relational |
34
+
|**Literature**| Character relationships, plot connections, thematic links across chapters |
In these domains, naive RAG often fails because the answer requires connecting facts across multiple documents. The knowledge graph captures these connections explicitly.
38
+
39
+
---
40
+
41
+
## Architecture
42
+
43
+
### Indexing Pipeline
8
44
9
45
```mermaid
10
46
flowchart LR
@@ -18,7 +54,7 @@ flowchart LR
18
54
2.**Entity & Relation Storage** — Entities and relations are stored as vectors in Milvus collections.
19
55
3.**Embedding** — All text is embedded for vector similarity search.
20
56
21
-
## Query Pipeline
57
+
###Query Pipeline
22
58
23
59
```mermaid
24
60
flowchart LR
@@ -32,7 +68,7 @@ flowchart LR
32
68
1.**Entity Extraction** — Extract key entities from the user's question.
33
69
2.**Vector Search** — Find similar entities and relations in Milvus.
34
70
3.**Subgraph Expansion** — Collect candidate relations by expanding around matched entities.
35
-
4.**LLM Reranking** — Use an LLM to score and filter the most relevant relations.
71
+
4.**LLM Reranking** — Use an LLM to score and filter the most relevant relations (single pass).
36
72
5.**Answer Generation** — Generate the final answer from the selected context.
37
73
38
74
## Worked Example
@@ -57,13 +93,23 @@ flowchart TD
57
93
VS --> SE["Subgraph expansion → candidate relations"]
58
94
SE --> R1["(Einstein, developed, theory of relativity)"]
59
95
SE --> R2["(Einstein, worked at, Princeton)"]
60
-
R1 --> LLM["LLM reranking"]
96
+
R1 --> LLM["LLM reranking (single pass)"]
61
97
R2 --> LLM
62
-
LLM --> A["✅ Einstein developed the theory of relativity."]
98
+
LLM --> A["Einstein developed the theory of relativity."]
63
99
```
64
100
65
101
1. Extract entity: `Einstein`
66
102
2. Vector search finds similar entities and relations
Copy file name to clipboardExpand all lines: docs/index.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,25 @@
1
1
# Vector Graph RAG
2
2
3
-
A Graph RAG implementation using pure vector search with [Milvus](https://milvus.io/).
3
+
Graph RAG with pure vector search — no graph database needed, single-pass LLM reranking, optimized for knowledge-intensive domains.
4
+
5
+
## Why Vector Graph RAG?
6
+
7
+
Most Graph RAG systems require a dedicated graph database (Neo4j, etc.) and complex multi-step retrieval with iterative LLM calls. Vector Graph RAG takes a fundamentally different approach:
8
+
9
+
-**No graph database** — The entire knowledge graph lives in Milvus as vectors. No extra infrastructure, no schema management, no graph query language.
10
+
-**Single-pass reranking** — Unlike agentic approaches (IRCoT, multi-step reflection), we call the LLM just once to rerank candidate relations. This is simpler, faster, and cheaper.
11
+
-**Knowledge-intensive friendly** — Designed for domains where dense factual knowledge matters: legal documents, financial reports, medical literature, novels, and more.
4
12
5
13
## Features
6
14
7
-
-**No Graph Database Required** — Pure vector search approach, no need for Neo4j or other graph databases
8
-
-**Zero Configuration** — Uses Milvus Lite by default, works out of the box with a single file
9
-
-**High Accuracy** — LLM-based reranking for precise relation filtering
Vector Graph RAG is designed for **knowledge-intensive domains** where documents contain dense factual relationships and answers often require connecting information across multiple sources.
4
+
5
+
## When to Use Graph RAG vs Naive RAG
6
+
7
+
**Use Naive RAG when:**
8
+
9
+
- Questions can be answered from a single passage
10
+
- Content is self-contained (e.g., FAQ, product docs)
11
+
- Low latency is critical and accuracy trade-off is acceptable
12
+
13
+
**Use Vector Graph RAG when:**
14
+
15
+
- Answers require connecting facts across multiple documents
16
+
- Content has rich entity relationships (people, organizations, concepts)
17
+
- Multi-hop reasoning is needed ("Who worked with X at Y?")
18
+
- Domain has dense factual knowledge
19
+
20
+
## Domain Examples
21
+
22
+
### Legal
23
+
24
+
Legal documents are full of cross-references: statutes cite other statutes, court opinions reference precedents, contracts refer to defined terms across sections.
0 commit comments