docsearch.as_retriever(search_type="mmr") # Retrieve more documents with higher diversity- useful if your dataset has many similar documents docsearch.as_retriever(search_type="mmr", search_kwargs={'k': 6, 'lambda_mult': 0.25}) # Fetch more documents for the MMR algorithm to consider, but only return the top 5 docsearch.as_retriever(search_type="mmr", search_kwargs={'k': 5, 'fetch_k': 50}) # Only retrieve documents that have a relevance score above a certain threshold docsearch.as_retriever(search_type="similarity_score_threshold", search_kwargs={'score_threshold': 0.8}) # Only get the single most similar document from the dataset docsearch.as_retriever(search_kwargs={'k': 1}) # Use a filter to only retrieve documents from a specific paper docsearch.as_retriever(search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}})
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter