Quick Start
How It Works
Basic Retrieval
Retrieval Strategies
Similarity Search
MMR (Maximal Marginal Relevance)
Hybrid Search
Query Enhancement
Use QueryRewriterAgent for better retrieval:Best Practices
Pick the strategy that matches the query type
Pick the strategy that matches the query type
Use
similarity for semantic questions, hybrid when exact keywords matter, and mmr when you need diverse rather than near-duplicate passages.Balance diversity with MMR
Balance diversity with MMR
diversity=0.3 trades a little relevance for broader coverage. Raise it when top results repeat the same point.Rewrite vague queries before retrieval
Rewrite vague queries before retrieval
QueryRewriterAgent reshapes short or ambiguous questions into retrieval-friendly form, improving recall without changing the user’s intent.Tune top_k and threshold together
Tune top_k and threshold together
A high
top_k with a low similarity_threshold floods the context; a low top_k with a high threshold can starve it. Adjust both when tuning quality.Related
Knowledge Module
Full API reference
QueryRewriterAgent
Query optimisation

