类 EmbeddingMatch<Embedded>
java.lang.Object
dev.langchain4j.store.embedding.EmbeddingMatch<Embedded>
- 类型参数:
Embedded- The class of the object that has been embedded. Typically, it isTextSegment.
Represents a matched embedding along with its relevance score (derivative of cosine distance), ID, and original embedded content.
-
构造器概要
构造器构造器说明EmbeddingMatch(Double score, String embeddingId, Embedding embedding, Embedded embedded) Creates a new instance. -
方法概要
修饰符和类型方法说明embedded()Returns the original content that was embedded.Returns the embedding that has been matched.The ID of the embedding assigned when adding this embedding to the store.booleaninthashCode()score()Returns the relevance score (derivative of cosine distance) of this embedding compared to a reference embedding during a search.toString()
-
构造器详细资料
-
EmbeddingMatch
Creates a new instance.- 参数:
score- The relevance score (derivative of cosine distance) of this embedding compared to a reference embedding during a search.embeddingId- The ID of the embedding assigned when adding this embedding to the store.embedding- The embedding that has been matched.embedded- The original content that was embedded. Typically, this is aTextSegment.
-
-
方法详细资料
-
score
Returns the relevance score (derivative of cosine distance) of this embedding compared to a reference embedding during a search. The current implementation assumes that the embedding store uses cosine distance when comparing embeddings.- 返回:
- Relevance score, ranging from 0 (not relevant) to 1 (highly relevant).
-
embeddingId
The ID of the embedding assigned when adding this embedding to the store.- 返回:
- The ID of the embedding assigned when adding this embedding to the store.
-
embedding
Returns the embedding that has been matched.- 返回:
- The embedding that has been matched.
-
embedded
Returns the original content that was embedded.- 返回:
- The original content that was embedded. Typically, this is a
TextSegment.
-
equals
-
hashCode
public int hashCode() -
toString
-