Skip to main content
PraisonAI picks the best retrieval strategy from your indexed corpus size — from direct loading for tiny folders to hierarchical search for massive libraries.
The user asks a question; PraisonAI selects the best retrieval strategy for the indexed corpus size.

How It Works

Quick Start

1

Simple Usage

Strategy selection is automatic when you attach knowledge to an agent:
2

With Configuration

Override the auto-selected strategy via KnowledgeConfig.config:

Strategy Selection


Configuration Options


CLI Usage


Best Practices

Let the SDK pick the strategy from corpus size unless you have measured latency or quality requirements.
Set rerank=True when retrieval_k is high — reranking improves relevance on noisy result sets.
Technical docs with exact identifiers benefit from strategy="hybrid" or hybrid=True.
Run a few queries with auto-selection first; only pin a strategy when benchmarks show a clear win.

Retrieval Configuration

Configure retrieval behaviour on agents

Vector Store

Pluggable embedding store with namespace support