RankedDocument

data class RankedDocument<Document>(val document: Document, val similarity: Double)(source)

Represents a document ranked by its similarity score.

This data class encapsulates a document of generic type Document along with a similarity score, which quantifies the relevance of the document according to a given query or context. The higher the similarity score, the more relevant the document is considered to be.

Parameters

Document

The type of the document being ranked.

Constructors

Link copied to clipboard
constructor(document: Document, similarity: Double)

Properties

Link copied to clipboard

The document instance being ranked.

Link copied to clipboard

A double value representing the similarity or relevance score of the document.