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
Copy file name to clipboardExpand all lines: README.md
+59-20Lines changed: 59 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,53 @@
1
1
<divalign="center">
2
2
3
-
# ConDB
3
+
<imgsrc="assets/banner.png"alt="ConDB Banner" />
4
4
5
-
<palign="center"><b>Context Database for Hierarchical Document Trees</b></p>
5
+
<br/>
6
+
7
+
# ConDB: The KV-Cache Native Context Database
6
8
7
9
<palign="center">
8
-
Store, navigate, and query hierarchical document structures with LLM-powered reasoning retrieval.
10
+
A new type of database optimized for reasoning-driven tree search — fast, context-aware retrieval at scale with up to 70% less token cost.
9
11
</p>
10
12
11
13
</div>
12
14
13
15
---
14
16
15
-
## What is ConDB?
17
+
## 🌲 What is ConDB?
18
+
19
+
**ConDB** (Context Database) is a tree-structured context database that uses LLM-powered **reasoning-based retrieval** via tree search instead of vector similarity — no vector DB, no chunking. It accepts [PageIndex](https://github.com/VectifyAI/PageIndex)-compatible document trees, [ChatIndex](https://github.com/VectifyAI/ChatIndex) conversation trees, filesystem trees, and custom hierarchical JSON — with no runtime dependency on either. The LLM reasons over the tree, like a human expert using a table of contents, to locate relevant content.
20
+
21
+
### Why not vector search?
22
+
23
+
-**Similarity ≠ relevance** — vector search retrieves what looks similar, not what is truly relevant. Similar-looking chunks may differ in intent (low accuracy), while truly relevant information may be expressed in very different language and get missed entirely (low recall). True relevance requires reasoning
24
+
-**Chunking breaks semantic continuity** — documents must be split into fixed-size segments to fit embedding models, causing context fragmentation that destroys their natural structure and cross-section relationships
25
+
-**Retrieval is blind to context** — embedding models encode the query alone, ignoring conversational history, user intent, and other contextual signals
26
+
27
+
ConDB replaces this with **reasoning-based tree search**: the LLM performs node-level relevance classification over a hierarchical index, incorporating full context — making retrieval adaptive, explainable, and traceable.
16
28
17
-
**ConDB** stores hierarchical document trees in a SQLite database and provides LLM-powered **reasoning-based retrieval** to query them — no vector DB, no chunking. It accepts pageindex-compatible trees, chat trees, and custom hierarchical JSON without taking a runtime code dependency on PageIndex itself.
29
+
### What makes ConDB different
18
30
19
-
**Key capabilities:**
31
+
-**Fast tree search at scale** — reasoning-driven tree search with block partitioning and parallel processing, supporting complex, context-aware retrieval over large hierarchical structures
32
+
-**KV-cache native** — the first database designed around LLM KV-cache reuse. By caching intermediate results during tree search, ConDB reduces token usage by up to 70% with no loss in accuracy. The same efficiency gains extend to memory systems for long-context reasoning at scale
33
+
-**Unified long-context infrastructure** — a single system for both static and dynamic long-context workloads
20
34
21
-
-**Hierarchical storage** — store document trees, chat trees, and custom hierarchical JSON in SQLite
22
-
-**Reasoning-based retrieval** — LLM navigates the tree to find relevant content, like a human expert
35
+
### Static long context
36
+
Structured, persistent knowledge — documents (via [PageIndex](https://github.com/VectifyAI/PageIndex)), file systems, and codebases. Scalable retrieval within large, organized hierarchies.
37
+
38
+
### Dynamic long context
39
+
Evolving, runtime context — agent memory, long conversations (via [ChatIndex](https://github.com/VectifyAI/ChatIndex)), and autoresearch. Systems can continuously update, retrieve, and reason over newly generated information.
40
+
41
+
### Key capabilities
42
+
43
+
-**Hierarchical storage** — document trees, chat trees, and custom hierarchical JSON in SQLite
23
44
-**Multiple retrieval strategies** — beam search for small trees, block retrieval for large documents
24
-
-**Multi-provider LLM support** — works with Anthropic (Claude) and OpenAI (GPT) out of the box
45
+
-**Multi-provider LLM support** — Anthropic (Claude) and OpenAI (GPT) out of the box
25
46
-**Extensible** — plug in custom storage backends, LLM providers, or retrieval strategies
ConDB automatically selects the best retrieval strategy based on tree size:
99
120
100
121
| Strategy | Best for | How it works |
101
122
|----------|----------|--------------|
102
123
|**Beam**| Small trees (< 50 nodes) | LLM evaluates and selects promising branches at each depth level |
103
-
|**Block**| Large documents (50+ nodes) | Splits tree into token-bounded blocks, LLM reasons over each block |
124
+
|**Block**| Large documents (50+ nodes) | Splits tree into token-bounded blocks, LLM reasons over each block. KV-cache native — caches intermediate block results to cut token usage by up to 70%|
104
125
105
126
You can also specify a strategy explicitly:
106
127
@@ -110,7 +131,7 @@ result = db.query(tree_id, "question", strategy="block", beam_size=3)
110
131
111
132
---
112
133
113
-
## Benchmark Snapshot
134
+
## 📈 Benchmark Snapshot
114
135
115
136
Current filesystem benchmark summary lives in [bench/fs_block_beam_vertical.md](bench/fs_block_beam_vertical.md).
116
137
@@ -130,7 +151,7 @@ These numbers are benchmark snapshots, not hard guarantees; exact cost and laten
-[**PageIndex**](https://github.com/VectifyAI/PageIndex) — one possible external producer of pageindex-compatible document trees
218
+
-[**PageIndex**](https://github.com/VectifyAI/PageIndex) — vectorless, reasoning-based RAG that builds hierarchical tree indexes from long documents
219
+
-[**ChatIndex**](https://github.com/VectifyAI/ChatIndex) — tree indexing for long conversations, enabling reasoning-based retrieval over chat histories
198
220
-[**AgentFS**](https://github.com/anthropics/agentfs) — filesystem for AI agents
0 commit comments