Key Features
Process PDFs, documents, spreadsheets, images, and web content
Multiple strategies for optimal text segmentation
Vector-based search with optional reranking
User, agent, and run-specific knowledge scoping
Optional relationship extraction and storage
Automatic quality assessment for stored knowledge
Quick Start
1
Level 1 — List of sources (simplest)
Pass a list of files or URLs and the agent answers from them.
2
Level 2 — Dict (inline config)
Use a dict to pick a vector store while still passing sources inline.
3
Level 3 — Config class (full control)
Use
KnowledgeConfig for typed control over chunking, retrieval, and reranking.How It Works
Configuration Options
KnowledgeConfig SDK Reference
Full parameter reference for KnowledgeConfig
Basic Configuration
Set
vector_store.provider explicitly and a fallback (e.g. to SQLite) is logged at WARNING level with Retrieval quality may be reduced so you notice it. Rely on the default (no explicit provider) and a fallback stays at DEBUG, because that path is expected (PR #2982).If your configured backend seems ignored
Configure amem0 or mongodb vector store on a release before 2026-07-14 and find that searches feel like keyword matching? Your Knowledge instance may have been silently falling back to SQLite. This was a bug (fixed in PR #2982) where the adapter constructors rejected an internal verbose keyword and the resulting TypeError was swallowed.
Check which adapter you actually got:
main after commit 69d7ecf to fix it. An explicitly-configured backend that fails to initialise now emits a WARNING log — no more silent degradation:
69d7ecf; before that, the same code silently ran on SQLite.
Advanced Configuration with Graph Store
Choosing Sources and Chunking
Pick a source type, then a chunking strategy that matches your content.Chunking Strategies
Document Processing
Supported File Types
- PDF (.pdf)
- Word (.doc, .docx)
- Text (.txt)
- Markdown (.md)
- RTF (.rtf)
- Excel (.xls, .xlsx)
- CSV (.csv)
- JSON (.json)
- XML (.xml)
- Images (OCR)
- HTML pages
- Web URLs
- YouTube videos
Processing Options
Handling indexing failures
Indexing errors are surfaced, not swallowed. When the embedding call fails, the CLI exits non-zero and the Python API raises.ChromaKnowledgeAdapter.add() returns an AddResult instead of raising:
WARNING and the call returns an empty SearchResult rather than raising, so an embedding outage cannot bring down the calling agent.
Search Features
Basic Search
Advanced Search Options
Memory Integration
When used with agents, knowledge automatically integrates with memory:Graph Store Features
Graph stores add relationship extraction and connection queries on top of semantic search.Configuration
Relationship Queries
Best Practices
Match chunk size to your query complexity
Match chunk size to your query complexity
Use smaller chunks (100-200 tokens) for precise fact retrieval. Use larger chunks (500-1000 tokens) when answers need more context. Semantic chunking works best for research papers and long-form documents.
Separate collections by domain
Separate collections by domain
Use a different
collection_name per knowledge domain (e.g., product_docs, legal_contracts). This prevents cross-contamination and allows targeted filtering by domain.Use metadata for filtering
Use metadata for filtering
Add
metadata when indexing documents to enable filters= in searches. Filter by category, year, or author to narrow results without changing query text.Enable reranking for higher precision
Enable reranking for higher precision
Set
rerank=True in kb.search() when you need top-quality results. Reranking retrieves more candidates then scores them for relevance — best for Q&A and research assistants.Example: Research Assistant
Troubleshooting
Related
RAG
Build retrieval-augmented generation pipelines
Vector Store
Store and query embeddings with a pluggable, namespace-aware backend

