| mmr_rerank | R Documentation |
Maximal Marginal Relevance (MMR) reranking
mmr_rerank(
query_vector,
doc_vectors,
doc_ids,
scores,
lambda = 0.7,
limit = 10
)
query_vector |
Query embedding |
doc_vectors |
Matrix of document embeddings |
doc_ids |
Vector of document IDs |
scores |
Initial relevance scores |
lambda |
Diversity parameter (0-1) |
limit |
Number of results to return |
Data frame with reranked results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.