VectorStoreSearchType class sealed

Vector store search type.

In general, we provide support two types of search:

  • Similarity search.
  • Maximal Marginal Relevance (MMR) search.

But it depends on the actual implementation of the vector store whether these are supported or not. Vector stores may also provide their own subclasses of this class to support additional configuration options. For example, VertexAIMatchingEngine provides VertexAIMatchingEngineSimilaritySearch which is a subclass of VectorStoreSimilaritySearch. Check the documentation of the vector store you are using for more information.

Constructors

VectorStoreSearchType.mmr({int k = 4, Map<String, dynamic>? filter, int fetchK = 20, double lambdaMult = 0.5})
Maximal Marginal Relevance (MMR) search.
factory
VectorStoreSearchType.similarity({int k = 4, Map<String, dynamic>? filter, double? scoreThreshold})
Similarity search.
factory

Properties

filter Map<String, dynamic>?
The filter to apply to the search.
final
hashCode int
The hash code for this object.
no setterinherited
k int
The number of documents to return.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited