一種 [[Reranking]] 方式 MMR 最大邊際相關性, 目的是增加多樣性 diverse https://medium.com/tech-that-works/maximal-marginal-relevance-to-rerank-results-in-unsupervised-keyphrase-extraction-22d95015c7c5 迭代加入每一個 chunk 時,都會加入一個和前一個 chunk 有多相似的 penalty https://chat.openai.com/share/e/d1e3e9f9-834e-435c-b0e8-42968a268ebc ## langchain [[LangChain Chat with Your Data]] 有提到 max_marginal_relevance_search ## llamaindex https://gpt-index.readthedocs.io/en/latest/examples/vector_stores/SimpleIndexDemoMMR.html