Enum Class CouchbaseSimilarityFunction
java.lang.Object
java.lang.Enum<CouchbaseSimilarityFunction>
org.springframework.ai.vectorstore.CouchbaseSimilarityFunction
- All Implemented Interfaces:
Serializable
,Comparable<CouchbaseSimilarityFunction>
,Constable
Choose the method to calculate the similarity between the vector embedding in a Vector
Search index and the vector embedding in a Vector Search query. See
https://docs.couchbase.com/server/current/search/child-field-options-reference.html for
more details.
- Since:
- 1.0.0
- Author:
- Laurent Doguin
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDot product similarity is commonly used by Large Language Models (LLMs).It’s best to use l2_norm similarity when your embeddings contain information about the count or measure of specific things, and your embedding model uses the same similarity metric. -
Method Summary
Modifier and TypeMethodDescriptionstatic CouchbaseSimilarityFunction
Returns the enum constant of this class with the specified name.static CouchbaseSimilarityFunction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
l2_norm
It’s best to use l2_norm similarity when your embeddings contain information about the count or measure of specific things, and your embedding model uses the same similarity metric. -
dot_product
Dot product similarity is commonly used by Large Language Models (LLMs). Use dot_product to get the best results with an embedding model that uses dot product similarity.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-