How It Works
Large Context Knowledge Handling
Overview
The large context handling system includes:Quick Start
1
Create an agent with knowledge
2
Index and search via CLI
Architecture
CLI Commands
Configuration
RetrievalConfig
Examples
Context-Required Q&A
Large Corpus Handling
Scope Isolation
Performance
The system is designed for zero performance impact when not in use:- Lazy imports - Heavy dependencies loaded only when needed
- Incremental indexing - Only changed files re-indexed
- Automatic strategy - Simpler strategies for smaller corpora
- Token budgeting - Prevents context overflow
Best Practices
Use incremental indexing
Use incremental indexing
Re-index only changed files in large, frequently updated corpora to save time and cost.
Set token budgets per model
Set token budgets per model
Match budgets to your model window so retrieval and history share space safely.
Enable reranking for relevance
Enable reranking for relevance
Hybrid search plus reranking improves answer quality on noisy document sets.
Use hierarchical summaries at scale
Use hierarchical summaries at scale
For corpora above ~100k tokens, summarise in layers instead of stuffing raw chunks into context.
Related
Token Budgeting
Dynamic budget management
Smart Retrieval
Hybrid search with reranking
Context Compression
Compress retrieved context to fit budgets
Hierarchical Summaries
Multi-level summaries for large corpora

