The query embedding.
The list of embeddings to select from.
Optional
lambda: number = 0.5The trade-off parameter between relevance and diversity.
Optional
k: number = 4The maximum number of embeddings to select.
The indexes of the selected embeddings in the embeddingList.
Generated using TypeDoc
This function implements the Maximal Marginal Relevance algorithm to select a set of embeddings that maximizes the diversity and relevance to a query embedding.