knowledge parameter — one surface for sources, chunking, reranking, and retrieval policy.
Quick Start
How It Works
The user asks a question; the agent embeds the query, retrieves the top-k chunks, then generates an answer with citations.Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
sources | List[str] | [] | Files, directories, or URLs to index |
embedder | str | "openai" | Embedding provider |
chunking_strategy | str | "semantic" | Chunking method |
chunk_size | int | 1000 | Target chunk size in tokens |
chunk_overlap | int | 200 | Overlap between chunks |
retrieval_k | int | 5 | Number of chunks to retrieve |
retrieval_threshold | float | 0.0 | Minimum relevance score (0.0–1.0) |
rerank | bool | False | Enable reranking |
rerank_model | str | None | Custom rerank model |
auto_retrieve | bool | True | Inject context automatically |
vector_store | dict | None | Vector store provider config |
Agent Methods
agent.start() / agent.chat()
Conversation with automatic retrieval when auto_retrieve=True:
agent.query()
Structured answer with citations:
agent.retrieve()
Retrieval only — no LLM generation:
Multi-Agent Shared Knowledge
Best Practices
Set retrieval_threshold for noisy corpora
Set retrieval_threshold for noisy corpora
Use
retrieval_threshold=0.3 or higher when low-scoring chunks pollute answers.Retrieve more, rerank down
Retrieve more, rerank down
For large bases, set
retrieval_k=20 with rerank=True — cast a wide net, then keep the best chunks.Use skip_retrieval for non-RAG prompts
Use skip_retrieval for non-RAG prompts
Arithmetic, greetings, and meta questions do not need retrieval — pass
skip_retrieval=True.Related
Retrieval Strategies
Auto-select strategy by corpus size
CLI Retrieval
Run retrieval from the command line

