Table of Contents

Namespace LMKit.Embeddings

Classes

Embedder

A class designed for generating embeddings from text and image. It facilitates execution of tasks related to natural language and coding, such as semantic search, clustering, topic modeling, and classification. Supports embeddings from:

  • Plain text strings
  • Tokenized text
  • File attachments (e.g. images like PNG, JPEG, TIFF, and documents like TXT, HTML) when the underlying model provides image-embedding capabilities.
Reranker

Computes embedding-based similarity scores and reorders/reranks documents or text partitions based on their relevance to a given query. Useful for selecting the most relevant items from a set by comparing embedding distances or similarity metrics.

Enums

EmbeddingRole

Which side of a retrieval pair a text is being embedded as. Modern embedding models are trained asymmetrically: a query and the passage that answers it are prefixed differently, and the model only places them in one comparable representation space when each side gets its own prefix. Embedding a passage as if it were a query, or either side with no prefix at all, costs recall.

Share