java.lang.Object
com.hw.langchain.vectorstores.utils.Utils

public class Utils extends Object
Utility functions for working with vectors and vectorStores.
Author:
HamaWhite
  • Method Details

    • maximalMarginalRelevance

      public static List<Integer> maximalMarginalRelevance(org.nd4j.linalg.api.ndarray.INDArray queryEmbedding, List<List<Float>> embeddingList, int k, float lambdaMult)
      Calculate maximal marginal relevance.