Search Tutorials
--Ads--Retrieval Techniques
From basic top-k search to hybrid, diverse, self-querying and structured-data retrieval.
- 1Top-k Similarity SearchThe basic retrieval step, choosing k, and using similarity thresholds.
- 2Hybrid Search with BM25 and Reciprocal Rank FusionCombine keyword and semantic search for the best of both.
- 3Maximal Marginal Relevance (MMR)Return results that are relevant and also different from each other.
- 4Self-Query RetrievalLet the LLM turn a natural-language question into a search query plus metadata filters.
- 5Multi-Vector RetrievalIndex summaries and hypothetical questions for each chunk, then return the original chunk.
- 6Contextual RetrievalPrepend LLM-written context to every chunk before embedding and BM25 indexing.
- 7Retrieving from SQL Databases (Text-to-SQL)Answer questions over structured data by generating and running safe SQL queries.