Class EmbeddingSearchRequest

java.lang.Object
dev.langchain4j.store.embedding.EmbeddingSearchRequest

public class EmbeddingSearchRequest extends Object
Represents a request to search in an EmbeddingStore.
  • Constructor Details

    • EmbeddingSearchRequest

      public EmbeddingSearchRequest(Embedding queryEmbedding, Integer maxResults, Double minScore, Filter filter)
      Creates an instance of an EmbeddingSearchRequest.
      Parameters:
      queryEmbedding - The embedding used as a reference. Found embeddings should be similar to this one. This is a mandatory parameter.
      maxResults - The maximum number of embeddings to return. This is an optional parameter. Default: 3
      minScore - The minimum score, ranging from 0 to 1 (inclusive). Only embeddings with a score >= minScore will be returned. This is an optional parameter. Default: 0
      filter - The filter to be applied to the Metadata during search. Only TextSegments whose Metadata matches the Filter will be returned. Please note that not all EmbeddingStores support this feature yet. This is an optional parameter. Default: no filtering
  • Method Details