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
@@ -120,8 +117,8 @@ ConDB automatically selects the best retrieval strategy based on tree size:
120
117
121
118
| Strategy | Best for | How it works |
122
119
|----------|----------|--------------|
123
-
|**Beam**| Small trees (< 50 nodes) | LLM evaluates and selects promising branches at each depth level |
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% |
120
+
|**Beam**| Small trees <br/> (< 50 nodes) | LLM evaluates and selects promising branches at each depth level |
121
+
|**Block**| Large documents <br/> (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% |
125
122
126
123
You can also specify a strategy explicitly:
127
124
@@ -151,7 +148,9 @@ These numbers are benchmark snapshots, not hard guarantees; exact cost and laten
151
148
152
149
---
153
150
154
-
## 🧩 Architecture
151
+
## 🧩 Learn More
152
+
153
+
### Architecture
155
154
156
155
```
157
156
contextdb/
@@ -170,12 +169,9 @@ contextdb/
170
169
└── prompts/ # Jinja2 prompt templates
171
170
```
172
171
173
-
---
174
-
175
-
## 🔌 Extending
172
+
### Extending
176
173
177
-
<details>
178
-
<summary><b>Custom Storage Backend</b></summary>
174
+
**Custom Storage Backend**
179
175
180
176
```python
181
177
from contextdb import StorageProtocol
@@ -187,10 +183,8 @@ class MyStorage:
187
183
188
184
ct = ContextTree(storage=MyStorage())
189
185
```
190
-
</details>
191
186
192
-
<details>
193
-
<summary><b>Custom LLM Provider</b></summary>
187
+
**Custom LLM Provider**
194
188
195
189
```python
196
190
from contextdb import LLMProtocol
@@ -201,43 +195,32 @@ class MyLLM:
201
195
202
196
ct = ContextTree("db.sqlite", llm=MyLLM())
203
197
```
204
-
</details>
205
198
206
-
---
207
-
208
-
## 🧪 Testing
199
+
### Testing
209
200
210
201
```bash
211
202
./run_tests.sh all
212
203
```
213
204
214
205
---
215
206
216
-
## 🧭 Related Projects
207
+
## 💬 Community
208
+
209
+
### Related Projects
217
210
218
211
-[**PageIndex**](https://github.com/VectifyAI/PageIndex) — vectorless, reasoning-based RAG that builds hierarchical tree indexes from long documents
219
212
-[**ChatIndex**](https://github.com/VectifyAI/ChatIndex) — tree indexing for long conversations, enabling reasoning-based retrieval over chat histories
220
213
-[**AgentFS**](https://github.com/anthropics/agentfs) — filesystem for AI agents
0 commit comments