org.llm4s.vectorstore.elasticsearch.ElasticsearchSimilarity
See theElasticsearchSimilarity companion object
The similarity an Elasticsearch dense_vector field is indexed with, fixed when the index is created.
Elasticsearch turns each similarity into a non-negative _score of its own: (1 + cosine) / 2 for ElasticsearchSimilarity.Cosine and, for unit-length vectors, (1 + dot) / 2 for ElasticsearchSimilarity.DotProduct, both in [0, 1]; 1 / (1 + l2_norm^2) for ElasticsearchSimilarity.L2Norm, in (0, 1]. ElasticsearchSimilarity.MaxInnerProduct can score above 1. A org.llm4s.vectorstore.ScoredRecord score must lie in [0, 1], so the store clamps it.
Value parameters
- wireName
-
the value of the mapping's
similarityparameter
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article