Smart Retrieval
Smart retrieval combines multiple search techniques for optimal relevance: keyword prefiltering, semantic search, and reranking.Overview
The SmartRetriever provides:- Hybrid search combining keyword (BM25) and semantic search
- Keyword prefiltering for efficient candidate selection
- Semantic reranking for improved relevance
- Score normalization across different search methods
Quick Start
Hybrid Search
Combining Keyword and Semantic Search
How Hybrid Search Works
- Keyword Search (BM25) - Fast lexical matching
- Semantic Search - Embedding-based similarity
- Score Fusion - Weighted combination of scores
- Deduplication - Remove duplicate results
Reranking
Using the Reranker
Custom Reranker
Retrieval Results
RetrievalResult Structure
Working with Results
CLI Usage
Integration with Agents
Best Practices
- Use hybrid search for diverse corpora with technical terms
- Enable reranking for improved relevance at slight latency cost
- Adjust weights based on your content type
- Set min_score to filter low-quality results

